mirror of
https://github.com/MontFerret/ferret.git
synced 2025-01-18 03:22:02 +02:00
549b4abd3b
Implemented COLLECT key word
19 lines
451 B
Go
19 lines
451 B
Go
package collections
|
|
|
|
import (
|
|
"github.com/MontFerret/ferret/pkg/runtime/core"
|
|
)
|
|
|
|
var (
|
|
ErrExhausted = core.Error(core.ErrInvalidOperation, "iterator has been exhausted")
|
|
ErrResultSetMismatch = core.Error(core.ErrInvalidArgument, "count of values in result set is less that count of variables")
|
|
)
|
|
|
|
func ValidateDataSet(set DataSet, variables Variables) error {
|
|
if len(variables) > len(set) {
|
|
return ErrResultSetMismatch
|
|
}
|
|
|
|
return nil
|
|
}
|