cosmium/query_executors/memory_executor/misc_functions.go

19 lines
423 B
Go
Raw Normal View History

2024-02-24 15:26:16 +00:00
package memoryexecutor
import (
"github.com/pikami/cosmium/parsers"
)
func (c memoryExecutorContext) misc_In(arguments []interface{}, row RowType) bool {
value := c.getFieldValue(arguments[0].(parsers.SelectItem), row)
2024-02-24 15:26:16 +00:00
for i := 1; i < len(arguments); i++ {
compareValue := c.getFieldValue(arguments[i].(parsers.SelectItem), row)
2024-02-24 15:26:16 +00:00
if compareValues(value, compareValue) == 0 {
return true
}
}
return false
}