Added support for object selects

This commit is contained in:
Pijus Kamandulis
2024-02-13 22:42:18 +02:00
parent 5d2b21dc46
commit b780e8c228
6 changed files with 613 additions and 336 deletions

View File

@@ -87,6 +87,16 @@ func Test_Documents(t *testing.T) {
)
})
t.Run("Should query VALUE object", func(t *testing.T) {
testCosmosQuery(t, collectionClient,
"SELECT VALUE { id: c.id, _pk: c.pk } FROM c",
[]interface{}{
map[string]interface{}{"id": "12345", "_pk": "123"},
map[string]interface{}{"id": "67890", "_pk": "456"},
},
)
})
t.Run("Should query document with single WHERE condition", func(t *testing.T) {
testCosmosQuery(t, collectionClient,
`select c.id