mirror of
https://github.com/pikami/cosmium.git
synced 2026-11-01 05:55:36 +00:00
Support parameter in bracket #8
This commit is contained in:
1 parent
39cd9e2357
commit
928ca29fe4
6 files changed
+1405
-1306
No files matched your search
@@ -147,6 +147,21 @@ func Test_Documents(t *testing.T) {
|
||||
)
|
||||
})
|
||||
|
||||
t.Run("Should query document with query parameters as accessor", func(t *testing.T) {
|
||||
testCosmosQuery(t, collectionClient,
|
||||
`select c.id
|
||||
FROM c
|
||||
WHERE c[@param]="67890"
|
||||
ORDER BY c.id`,
|
||||
[]azcosmos.QueryParameter{
|
||||
{Name: "@param", Value: "id"},
|
||||
},
|
||||
[]interface{}{
|
||||
map[string]interface{}{"id": "67890"},
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
t.Run("Should query array accessor", func(t *testing.T) {
|
||||
testCosmosQuery(t, collectionClient,
|
||||
`SELECT c.id,
|
||||
|
||||
Reference in new issue
Block a user