Skip to content

Commit 9ae763e

Browse files
authored
added start_after for document snapshot (#45)
1 parent 25ca4c5 commit 9ae763e

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"tests": [
3+
{
4+
"description": "query: StartAfter with document snapshot",
5+
"comment": "Cursor methods are allowed to use document snapshots with start_after. It should result in the document's data in the query.",
6+
"query": {
7+
"collPath": "projects/projectID/databases/(default)/documents/C",
8+
"clauses": [
9+
{
10+
"orderBy": {
11+
"path": {
12+
"field": [
13+
"a"
14+
]
15+
},
16+
"direction": "asc"
17+
}
18+
},
19+
{
20+
"startAt": {
21+
"jsonValues": [
22+
"{\"a\": \"b\"}"
23+
]
24+
}
25+
}
26+
],
27+
"query": {
28+
"from": [
29+
{
30+
"collectionId": "C"
31+
}
32+
],
33+
"orderBy": [
34+
{
35+
"field": {
36+
"fieldPath": "a"
37+
},
38+
"direction": "ASCENDING"
39+
}
40+
],
41+
"startAt": {
42+
"values": [
43+
{
44+
"mapValue": {
45+
"fields": {
46+
"a": {
47+
"stringValue": "b"
48+
}
49+
}
50+
}
51+
}
52+
],
53+
"before": true
54+
}
55+
}
56+
}
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)