Added support for object selects

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

No files matched your search

+10
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