Implement IIF function; Fix empty object select

This commit is contained in:
Pijus Kamandulis
2025-05-14 18:48:20 +03:00
parent 30195fae96
commit 7e0c10479b
10 changed files with 1865 additions and 1581 deletions

View File

@@ -205,4 +205,27 @@ func Test_Execute_Select(t *testing.T) {
},
)
})
t.Run("Should execute SELECT empty object", func(t *testing.T) {
testQueryExecute(
t,
parsers.SelectStmt{
SelectItems: []parsers.SelectItem{
{
Alias: "obj",
Type: parsers.SelectItemTypeObject,
SelectItems: []parsers.SelectItem{},
},
},
Table: parsers.Table{SelectItem: testutils.SelectItem_Path("c")},
},
mockData,
[]memoryexecutor.RowType{
map[string]interface{}{"obj": map[string]interface{}{}},
map[string]interface{}{"obj": map[string]interface{}{}},
map[string]interface{}{"obj": map[string]interface{}{}},
map[string]interface{}{"obj": map[string]interface{}{}},
},
)
})
}