mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-19 08:50:46 +00:00
Add support for subqueries
This commit is contained in:
@@ -4,11 +4,11 @@ import (
|
||||
"github.com/pikami/cosmium/parsers"
|
||||
)
|
||||
|
||||
func (c memoryExecutorContext) misc_In(arguments []interface{}, row RowType) bool {
|
||||
value := c.getFieldValue(arguments[0].(parsers.SelectItem), row)
|
||||
func (r rowContext) misc_In(arguments []interface{}) bool {
|
||||
value := r.resolveSelectItem(arguments[0].(parsers.SelectItem))
|
||||
|
||||
for i := 1; i < len(arguments); i++ {
|
||||
compareValue := c.getFieldValue(arguments[i].(parsers.SelectItem), row)
|
||||
compareValue := r.resolveSelectItem(arguments[i].(parsers.SelectItem))
|
||||
if compareValues(value, compareValue) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user