+1
@@ -0,0 +1 @@
|
||||
SHA1(/usr/local/google/home/jba/go/src/github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/testdata/test-suite.binproto)= 1502b0250a2ecd854b80509e3e456e46ade89ea7
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A simple call, resulting in a single update operation.
|
||||
|
||||
description: "create: basic"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A call to a write method with complicated input data.
|
||||
|
||||
description: "create: complex"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
array_value: <
|
||||
values: <
|
||||
integer_value: 1
|
||||
>
|
||||
values: <
|
||||
double_value: 2.5
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "b"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "c"
|
||||
value: <
|
||||
array_value: <
|
||||
values: <
|
||||
string_value: "three"
|
||||
>
|
||||
values: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "d"
|
||||
value: <
|
||||
boolean_value: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a field. Deletes are implemented by
|
||||
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
|
||||
# support array indexing.
|
||||
|
||||
description: "create: Delete cannot be anywhere inside an array value"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, {\"b\": \"Delete\"}]}"
|
||||
is_error: true
|
||||
>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a field. Deletes are implemented by
|
||||
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
|
||||
# support array indexing.
|
||||
|
||||
description: "create: Delete cannot be in an array value"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2, \"Delete\"]}"
|
||||
is_error: true
|
||||
>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
|
||||
description: "create: creating or setting an empty map"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel cannot be used in Create, or in Set without a Merge option.
|
||||
|
||||
description: "create: Delete cannot appear in data"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
|
||||
is_error: true
|
||||
>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Create and Set treat their map keys literally. They do not split on dots.
|
||||
|
||||
description: "create: don\342\200\231t split on dots"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{ \"a.b\": { \"c.d\": 1 }, \"e\": 2 }"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a.b"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "c.d"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "e"
|
||||
value: <
|
||||
integer_value: 2
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Create and Set treat their map keys literally. They do not escape special
|
||||
# characters.
|
||||
|
||||
description: "create: non-alpha characters in map keys"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{ \"*\": { \".\": 1 }, \"~\": 2 }"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "*"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "."
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "~"
|
||||
value: <
|
||||
integer_value: 2
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If the only values in the input are ServerTimestamps, then no update operation
|
||||
# should be produced.
|
||||
|
||||
description: "create: ServerTimestamp alone"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "a"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A document can have more than one ServerTimestamp field. Since all the
|
||||
# ServerTimestamp fields are removed, the only field in the update is "a".
|
||||
|
||||
description: "create: multiple ServerTimestamp fields"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
field_transforms: <
|
||||
field_path: "c.d"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A ServerTimestamp value can occur at any depth. In this case, the transform
|
||||
# applies to the field path "b.c". Since "c" is removed from the update, "b"
|
||||
# becomes empty, so it is also removed from the update.
|
||||
|
||||
description: "create: nested ServerTimestamp field"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b.c"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# There cannot be an array value anywhere on the path from the document root to
|
||||
# the ServerTimestamp sentinel. Firestore transforms don't support array indexing.
|
||||
|
||||
description: "create: ServerTimestamp cannot be anywhere inside an array value"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}"
|
||||
is_error: true
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The ServerTimestamp sentinel must be the value of a field. Firestore transforms
|
||||
# don't support array indexing.
|
||||
|
||||
description: "create: ServerTimestamp cannot be in an array value"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2, \"ServerTimestamp\"]}"
|
||||
is_error: true
|
||||
>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A key with the special ServerTimestamp sentinel is removed from the data in the
|
||||
# update operation. Instead it appears in a separate Transform operation. Note
|
||||
# that in these tests, the string "ServerTimestamp" should be replaced with the
|
||||
# special ServerTimestamp value.
|
||||
|
||||
description: "create: ServerTimestamp with data"
|
||||
create: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
current_document: <
|
||||
exists: false
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Delete supports an exists precondition.
|
||||
|
||||
description: "delete: delete with exists precondition"
|
||||
delete: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
precondition: <
|
||||
exists: true
|
||||
>
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
delete: "projects/projectID/databases/(default)/documents/C/d"
|
||||
current_document: <
|
||||
exists: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# An ordinary Delete call.
|
||||
|
||||
description: "delete: delete without precondition"
|
||||
delete: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
delete: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
>
|
||||
>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Delete supports a last-update-time precondition.
|
||||
|
||||
description: "delete: delete with last-update-time precondition"
|
||||
delete: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
precondition: <
|
||||
update_time: <
|
||||
seconds: 42
|
||||
>
|
||||
>
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
delete: "projects/projectID/databases/(default)/documents/C/d"
|
||||
current_document: <
|
||||
update_time: <
|
||||
seconds: 42
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A call to DocumentRef.Get.
|
||||
|
||||
description: "get: get a document"
|
||||
get: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
request: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# You can only compare NaN for equality.
|
||||
|
||||
description: "query: where clause with non-== comparison with NaN"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "<"
|
||||
json_value: "\"NaN\""
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# You can only compare Null for equality.
|
||||
|
||||
description: "query: where clause with non-== comparison with Null"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: ">"
|
||||
json_value: "null"
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
Generated
Vendored
+68
@@ -0,0 +1,68 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# When a document snapshot is used, the client appends a __name__ order-by clause
|
||||
# with the direction of the last order-by clause.
|
||||
|
||||
description: "query: cursor methods with a document snapshot, existing orderBy"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "b"
|
||||
>
|
||||
direction: "desc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_after: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "b"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
values: <
|
||||
integer_value: 8
|
||||
>
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+76
@@ -0,0 +1,76 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If there is an existing orderBy clause on __name__, no changes are made to the
|
||||
# list of orderBy clauses.
|
||||
|
||||
description: "query: cursor method, doc snapshot, existing orderBy __name__"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "desc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "__name__"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_at: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_at: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
before: true
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Where clause using equality doesn't change the implicit orderBy clauses.
|
||||
|
||||
description: "query: cursor methods with a document snapshot and an equality where clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "=="
|
||||
json_value: "3"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_at: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
field_filter: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
op: EQUAL
|
||||
value: <
|
||||
integer_value: 3
|
||||
>
|
||||
>
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+72
@@ -0,0 +1,72 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If there is an OrderBy clause, the inequality Where clause does not result in a
|
||||
# new OrderBy clause. We still add a __name__ OrderBy clause
|
||||
|
||||
description: "query: cursor method, doc snapshot, inequality where clause, and existing orderBy clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "desc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "<"
|
||||
json_value: "4"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_at: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
field_filter: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
op: LESS_THAN
|
||||
value: <
|
||||
integer_value: 4
|
||||
>
|
||||
>
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
before: true
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Where clause with an inequality results in an OrderBy clause on that clause's
|
||||
# path, if there are no other OrderBy clauses.
|
||||
|
||||
description: "query: cursor method with a document snapshot and an inequality where clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "<="
|
||||
json_value: "3"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_before: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
field_filter: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
op: LESS_THAN_OR_EQUAL
|
||||
value: <
|
||||
integer_value: 3
|
||||
>
|
||||
>
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
before: true
|
||||
>
|
||||
>
|
||||
>
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# When a document snapshot is used, the client appends a __name__ order-by clause.
|
||||
|
||||
description: "query: cursor methods with a document snapshot"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
start_at: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D"
|
||||
>
|
||||
before: true
|
||||
>
|
||||
>
|
||||
>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a cursor method with a list of values is provided, there must be at least as
|
||||
# many explicit orderBy clauses as values.
|
||||
|
||||
description: "query: cursor method without orderBy"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
start_at: <
|
||||
json_values: "2"
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Cursor methods take the same number of values as there are OrderBy clauses.
|
||||
|
||||
description: "query: StartAt/EndBefore with values"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_at: <
|
||||
json_values: "7"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_before: <
|
||||
json_values: "9"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
before: true
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
integer_value: 9
|
||||
>
|
||||
before: true
|
||||
>
|
||||
>
|
||||
>
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Cursor methods take the same number of values as there are OrderBy clauses.
|
||||
|
||||
description: "query: StartAfter/EndAt with values"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_after: <
|
||||
json_values: "7"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_at: <
|
||||
json_values: "9"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
integer_value: 9
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Cursor methods take the same number of values as there are OrderBy clauses.
|
||||
|
||||
description: "query: Start/End with two values"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "b"
|
||||
>
|
||||
direction: "desc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_at: <
|
||||
json_values: "7"
|
||||
json_values: "8"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_at: <
|
||||
json_values: "9"
|
||||
json_values: "10"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "b"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 7
|
||||
>
|
||||
values: <
|
||||
integer_value: 8
|
||||
>
|
||||
before: true
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
integer_value: 9
|
||||
>
|
||||
values: <
|
||||
integer_value: 10
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Cursor values corresponding to a __name__ field take the document path relative
|
||||
# to the query's collection.
|
||||
|
||||
description: "query: cursor methods with __name__"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "__name__"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_after: <
|
||||
json_values: "\"D1\""
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_before: <
|
||||
json_values: "\"D2\""
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D1"
|
||||
>
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
reference_value: "projects/projectID/databases/(default)/documents/C/D2"
|
||||
>
|
||||
before: true
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+60
@@ -0,0 +1,60 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# When multiple Start* or End* calls occur, the values of the last one are used.
|
||||
|
||||
description: "query: cursor methods, last one wins"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_after: <
|
||||
json_values: "1"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
start_at: <
|
||||
json_values: "2"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_at: <
|
||||
json_values: "3"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_before: <
|
||||
json_values: "4"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
start_at: <
|
||||
values: <
|
||||
integer_value: 2
|
||||
>
|
||||
before: true
|
||||
>
|
||||
end_at: <
|
||||
values: <
|
||||
integer_value: 4
|
||||
>
|
||||
before: true
|
||||
>
|
||||
>
|
||||
>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Sentinel values are not permitted in queries.
|
||||
|
||||
description: "query: Delete in cursor method"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_before: <
|
||||
json_values: "\"Delete\""
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Sentinel values are not permitted in queries.
|
||||
|
||||
description: "query: Delete in Where"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "=="
|
||||
json_value: "\"Delete\""
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The != operator is not supported.
|
||||
|
||||
description: "query: invalid operator in Where clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "!="
|
||||
json_value: "4"
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The path has an empty component.
|
||||
|
||||
description: "query: invalid path in OrderBy clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "*"
|
||||
field: ""
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
Generated
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The path has an empty component.
|
||||
|
||||
description: "query: invalid path in Where clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
select: <
|
||||
fields: <
|
||||
field: "*"
|
||||
field: ""
|
||||
>
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The path has an empty component.
|
||||
|
||||
description: "query: invalid path in Where clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "*"
|
||||
field: ""
|
||||
>
|
||||
op: "=="
|
||||
json_value: "4"
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
Generated
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# With multiple Offset or Limit clauses, the last one wins.
|
||||
|
||||
description: "query: multiple Offset and Limit clauses"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
offset: 2
|
||||
>
|
||||
clauses: <
|
||||
limit: 3
|
||||
>
|
||||
clauses: <
|
||||
limit: 4
|
||||
>
|
||||
clauses: <
|
||||
offset: 5
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
offset: 5
|
||||
limit: <
|
||||
value: 4
|
||||
>
|
||||
>
|
||||
>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Offset and Limit clauses.
|
||||
|
||||
description: "query: Offset and Limit clauses"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
offset: 2
|
||||
>
|
||||
clauses: <
|
||||
limit: 3
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
offset: 2
|
||||
limit: <
|
||||
value: 3
|
||||
>
|
||||
>
|
||||
>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Multiple OrderBy clauses combine.
|
||||
|
||||
description: "query: basic OrderBy clauses"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "b"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "desc"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "b"
|
||||
>
|
||||
direction: ASCENDING
|
||||
>
|
||||
order_by: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
direction: DESCENDING
|
||||
>
|
||||
>
|
||||
>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# An empty Select clause selects just the document ID.
|
||||
|
||||
description: "query: empty Select clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
select: <
|
||||
>
|
||||
>
|
||||
query: <
|
||||
select: <
|
||||
fields: <
|
||||
field_path: "__name__"
|
||||
>
|
||||
>
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
>
|
||||
>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The last Select clause is the only one used.
|
||||
|
||||
description: "query: two Select clauses"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
select: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
fields: <
|
||||
field: "b"
|
||||
>
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
select: <
|
||||
fields: <
|
||||
field: "c"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
select: <
|
||||
fields: <
|
||||
field_path: "c"
|
||||
>
|
||||
>
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
>
|
||||
>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# An ordinary Select clause.
|
||||
|
||||
description: "query: Select clause with some fields"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
select: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
fields: <
|
||||
field: "b"
|
||||
>
|
||||
>
|
||||
>
|
||||
query: <
|
||||
select: <
|
||||
fields: <
|
||||
field_path: "a"
|
||||
>
|
||||
fields: <
|
||||
field_path: "b"
|
||||
>
|
||||
>
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
>
|
||||
>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Sentinel values are not permitted in queries.
|
||||
|
||||
description: "query: ServerTimestamp in cursor method"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
order_by: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
direction: "asc"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
end_before: <
|
||||
json_values: "\"ServerTimestamp\""
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Sentinel values are not permitted in queries.
|
||||
|
||||
description: "query: ServerTimestamp in Where"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "=="
|
||||
json_value: "\"ServerTimestamp\""
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Multiple Where clauses are combined into a composite filter.
|
||||
|
||||
description: "query: two Where clauses"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: ">="
|
||||
json_value: "5"
|
||||
>
|
||||
>
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "b"
|
||||
>
|
||||
op: "<"
|
||||
json_value: "\"foo\""
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
composite_filter: <
|
||||
op: AND
|
||||
filters: <
|
||||
field_filter: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
op: GREATER_THAN_OR_EQUAL
|
||||
value: <
|
||||
integer_value: 5
|
||||
>
|
||||
>
|
||||
>
|
||||
filters: <
|
||||
field_filter: <
|
||||
field: <
|
||||
field_path: "b"
|
||||
>
|
||||
op: LESS_THAN
|
||||
value: <
|
||||
string_value: "foo"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Where clause that tests for equality with NaN results in a unary filter.
|
||||
|
||||
description: "query: a Where clause comparing to NaN"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "=="
|
||||
json_value: "\"NaN\""
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
unary_filter: <
|
||||
op: IS_NAN
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Where clause that tests for equality with null results in a unary filter.
|
||||
|
||||
description: "query: a Where clause comparing to null"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: "=="
|
||||
json_value: "null"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
unary_filter: <
|
||||
op: IS_NULL
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A simple Where clause.
|
||||
|
||||
description: "query: Where clause"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
where: <
|
||||
path: <
|
||||
field: "a"
|
||||
>
|
||||
op: ">"
|
||||
json_value: "5"
|
||||
>
|
||||
>
|
||||
query: <
|
||||
from: <
|
||||
collection_id: "C"
|
||||
>
|
||||
where: <
|
||||
field_filter: <
|
||||
field: <
|
||||
field_path: "a"
|
||||
>
|
||||
op: GREATER_THAN
|
||||
value: <
|
||||
integer_value: 5
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a document snapshot is passed to a Start*/End* method, it must be in the same
|
||||
# collection as the query.
|
||||
|
||||
description: "query: doc snapshot with wrong collection in cursor method"
|
||||
query: <
|
||||
coll_path: "projects/projectID/databases/(default)/documents/C"
|
||||
clauses: <
|
||||
end_before: <
|
||||
doc_snapshot: <
|
||||
path: "projects/projectID/databases/(default)/documents/C2/D"
|
||||
json_data: "{\"a\": 7, \"b\": 8}"
|
||||
>
|
||||
>
|
||||
>
|
||||
is_error: true
|
||||
>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A simple call, resulting in a single update operation.
|
||||
|
||||
description: "set: basic"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A call to a write method with complicated input data.
|
||||
|
||||
description: "set: complex"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
array_value: <
|
||||
values: <
|
||||
integer_value: 1
|
||||
>
|
||||
values: <
|
||||
double_value: 2.5
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "b"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "c"
|
||||
value: <
|
||||
array_value: <
|
||||
values: <
|
||||
string_value: "three"
|
||||
>
|
||||
values: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "d"
|
||||
value: <
|
||||
boolean_value: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Delete sentinel can appear with a merge option. If the delete paths are the
|
||||
# only ones to be merged, then no document is sent, just an update mask.
|
||||
|
||||
description: "set-merge: Delete with merge"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "b"
|
||||
field: "c"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "b.c"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Delete sentinel can appear with a merge option.
|
||||
|
||||
description: "set-merge: Delete with merge"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
fields: <
|
||||
field: "b"
|
||||
field: "c"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
field_paths: "b.c"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A Delete sentinel can appear with a mergeAll option.
|
||||
|
||||
description: "set: Delete with MergeAll"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
all: true
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
field_paths: "b.c"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a field. Deletes are implemented by
|
||||
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
|
||||
# support array indexing.
|
||||
|
||||
description: "set: Delete cannot be anywhere inside an array value"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, {\"b\": \"Delete\"}]}"
|
||||
is_error: true
|
||||
>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a field. Deletes are implemented by
|
||||
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
|
||||
# support array indexing.
|
||||
|
||||
description: "set: Delete cannot be in an array value"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2, \"Delete\"]}"
|
||||
is_error: true
|
||||
>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The client signals an error if the Delete sentinel is in the input data, but not
|
||||
# selected by a merge option, because this is most likely a programming bug.
|
||||
|
||||
description: "set-merge: Delete cannot appear in an unmerged field"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
|
||||
is_error: true
|
||||
>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a Delete is part of the value at a merge path, then the user is confused:
|
||||
# their merge path says "replace this entire value" but their Delete says "delete
|
||||
# this part of the value". This should be an error, just as if they specified
|
||||
# Delete in a Set with no merge.
|
||||
|
||||
description: "set-merge: Delete cannot appear as part of a merge path"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "h"
|
||||
>
|
||||
>
|
||||
json_data: "{\"h\": {\"g\": \"Delete\"}}"
|
||||
is_error: true
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Without a merge option, Set replaces the document with the input data. A Delete
|
||||
# sentinel in the data makes no sense in this case.
|
||||
|
||||
description: "set: Delete cannot appear unless a merge option is specified"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
|
||||
is_error: true
|
||||
>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
|
||||
description: "set: creating or setting an empty map"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A merge with fields that use special characters.
|
||||
|
||||
description: "set-merge: Merge with FieldPaths"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "*"
|
||||
field: "~"
|
||||
>
|
||||
>
|
||||
json_data: "{\"*\": {\"~\": true}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "*"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "~"
|
||||
value: <
|
||||
boolean_value: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "`*`.`~`"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A merge option where the field is not at top level. Only fields mentioned in the
|
||||
# option are present in the update operation.
|
||||
|
||||
description: "set-merge: Merge with a nested field"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "h"
|
||||
field: "g"
|
||||
>
|
||||
>
|
||||
json_data: "{\"h\": {\"g\": 4, \"f\": 5}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "h"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "g"
|
||||
value: <
|
||||
integer_value: 4
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "h.g"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a field path is in a merge option, the value at that path replaces the stored
|
||||
# value. That is true even if the value is complex.
|
||||
|
||||
description: "set-merge: Merge field is not a leaf"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "h"
|
||||
>
|
||||
>
|
||||
json_data: "{\"h\": {\"f\": 5, \"g\": 6}, \"e\": 7}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "h"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "f"
|
||||
value: <
|
||||
integer_value: 5
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "g"
|
||||
value: <
|
||||
integer_value: 6
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "h"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The prefix would make the other path meaningless, so this is probably a
|
||||
# programming error.
|
||||
|
||||
description: "set-merge: One merge path cannot be the prefix of another"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
fields: <
|
||||
field: "a"
|
||||
field: "b"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": {\"b\": 1}}"
|
||||
is_error: true
|
||||
>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The client signals an error if a merge option mentions a path that is not in the
|
||||
# input data.
|
||||
|
||||
description: "set-merge: Merge fields must all be present in data"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "b"
|
||||
>
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1}"
|
||||
is_error: true
|
||||
>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Fields in the input data but not in a merge option are pruned.
|
||||
|
||||
description: "set-merge: Merge with a field"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": 2}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# It makes no sense to specify MergeAll and provide no data, so we disallow it on
|
||||
# the client.
|
||||
|
||||
description: "set: MergeAll cannot be specified with empty data."
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
all: true
|
||||
>
|
||||
json_data: "{}"
|
||||
is_error: true
|
||||
>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# MergeAll with nested fields results in an update mask that includes entries for
|
||||
# all the leaf fields.
|
||||
|
||||
description: "set: MergeAll with nested fields"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
all: true
|
||||
>
|
||||
json_data: "{\"h\": { \"g\": 3, \"f\": 4 }}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "h"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "f"
|
||||
value: <
|
||||
integer_value: 4
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "g"
|
||||
value: <
|
||||
integer_value: 3
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "h.f"
|
||||
field_paths: "h.g"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The MergeAll option with a simple piece of data.
|
||||
|
||||
description: "set: MergeAll"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
all: true
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": 2}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "b"
|
||||
value: <
|
||||
integer_value: 2
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
field_paths: "b"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel cannot be used in Create, or in Set without a Merge option.
|
||||
|
||||
description: "set: Delete cannot appear in data"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
|
||||
is_error: true
|
||||
>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Create and Set treat their map keys literally. They do not split on dots.
|
||||
|
||||
description: "set: don\342\200\231t split on dots"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{ \"a.b\": { \"c.d\": 1 }, \"e\": 2 }"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a.b"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "c.d"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "e"
|
||||
value: <
|
||||
integer_value: 2
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Create and Set treat their map keys literally. They do not escape special
|
||||
# characters.
|
||||
|
||||
description: "set: non-alpha characters in map keys"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{ \"*\": { \".\": 1 }, \"~\": 2 }"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "*"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "."
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "~"
|
||||
value: <
|
||||
integer_value: 2
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If the only values in the input are ServerTimestamps, then no update operation
|
||||
# should be produced.
|
||||
|
||||
description: "set: ServerTimestamp alone with MergeAll"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
all: true
|
||||
>
|
||||
json_data: "{\"a\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "a"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If the only values in the input are ServerTimestamps, then an update operation
|
||||
# with an empty map should be produced.
|
||||
|
||||
description: "set: ServerTimestamp alone"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "a"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Just as when no merge option is specified, ServerTimestamp sentinel values are
|
||||
# removed from the data in the update operation and become transforms.
|
||||
|
||||
description: "set-merge: ServerTimestamp with Merge of both fields"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
fields: <
|
||||
field: "b"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
Generated
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a field path is in a merge option, the value at that path replaces the stored
|
||||
# value. If the value has only ServerTimestamps, they become transforms and we
|
||||
# clear the value by including the field path in the update mask.
|
||||
|
||||
description: "set-merge: non-leaf merge field with ServerTimestamp alone"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "h"
|
||||
>
|
||||
>
|
||||
json_data: "{\"h\": {\"g\": \"ServerTimestamp\"}, \"e\": 7}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "h"
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "h.g"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a field path is in a merge option, the value at that path replaces the stored
|
||||
# value, and ServerTimestamps inside that value become transforms as usual.
|
||||
|
||||
description: "set-merge: non-leaf merge field with ServerTimestamp"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "h"
|
||||
>
|
||||
>
|
||||
json_data: "{\"h\": {\"f\": 5, \"g\": \"ServerTimestamp\"}, \"e\": 7}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "h"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "f"
|
||||
value: <
|
||||
integer_value: 5
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "h"
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "h.g"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If all the fields in the merge option have ServerTimestamp values, then no
|
||||
# update operation is produced, only a transform.
|
||||
|
||||
description: "set-merge: If no ordinary values in Merge, no write"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "b"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Just as when no merge option is specified, ServerTimestamp sentinel values are
|
||||
# removed from the data in the update operation and become transforms.
|
||||
|
||||
description: "set: ServerTimestamp with MergeAll"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
all: true
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A document can have more than one ServerTimestamp field. Since all the
|
||||
# ServerTimestamp fields are removed, the only field in the update is "a".
|
||||
|
||||
description: "set: multiple ServerTimestamp fields"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
field_transforms: <
|
||||
field_path: "c.d"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A ServerTimestamp value can occur at any depth. In this case, the transform
|
||||
# applies to the field path "b.c". Since "c" is removed from the update, "b"
|
||||
# becomes empty, so it is also removed from the update.
|
||||
|
||||
description: "set: nested ServerTimestamp field"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b.c"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# There cannot be an array value anywhere on the path from the document root to
|
||||
# the ServerTimestamp sentinel. Firestore transforms don't support array indexing.
|
||||
|
||||
description: "set: ServerTimestamp cannot be anywhere inside an array value"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}"
|
||||
is_error: true
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The ServerTimestamp sentinel must be the value of a field. Firestore transforms
|
||||
# don't support array indexing.
|
||||
|
||||
description: "set: ServerTimestamp cannot be in an array value"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2, \"ServerTimestamp\"]}"
|
||||
is_error: true
|
||||
>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If the ServerTimestamp value is not mentioned in a merge option, then it is
|
||||
# pruned from the data but does not result in a transform.
|
||||
|
||||
description: "set-merge: If is ServerTimestamp not in Merge, no transform"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
option: <
|
||||
fields: <
|
||||
field: "a"
|
||||
>
|
||||
>
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A key with the special ServerTimestamp sentinel is removed from the data in the
|
||||
# update operation. Instead it appears in a separate Transform operation. Note
|
||||
# that in these tests, the string "ServerTimestamp" should be replaced with the
|
||||
# special ServerTimestamp value.
|
||||
|
||||
description: "set: ServerTimestamp with data"
|
||||
set: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
writes: <
|
||||
transform: <
|
||||
document: "projects/projectID/databases/(default)/documents/C/d"
|
||||
field_transforms: <
|
||||
field_path: "b"
|
||||
set_to_server_value: REQUEST_TIME
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The keys of the data given to Update are interpreted, unlike those of Create and
|
||||
# Set. They cannot contain special characters.
|
||||
|
||||
description: "update: invalid character"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a~b\": 1}"
|
||||
is_error: true
|
||||
>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A simple call, resulting in a single update operation.
|
||||
|
||||
description: "update: basic"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
>
|
||||
current_document: <
|
||||
exists: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# A call to a write method with complicated input data.
|
||||
|
||||
description: "update: complex"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
array_value: <
|
||||
values: <
|
||||
integer_value: 1
|
||||
>
|
||||
values: <
|
||||
double_value: 2.5
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "b"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "c"
|
||||
value: <
|
||||
array_value: <
|
||||
values: <
|
||||
string_value: "three"
|
||||
>
|
||||
values: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "d"
|
||||
value: <
|
||||
boolean_value: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
field_paths: "b"
|
||||
>
|
||||
current_document: <
|
||||
exists: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If the input data consists solely of Deletes, then the update operation has no
|
||||
# map, just an update mask.
|
||||
|
||||
description: "update: Delete alone"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": \"Delete\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
>
|
||||
current_document: <
|
||||
exists: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# After expanding top-level dotted fields, fields with Delete values are pruned
|
||||
# from the output data, but appear in the update mask.
|
||||
|
||||
description: "update: Delete with a dotted field"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b.c\": \"Delete\", \"b.d\": 2}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
fields: <
|
||||
key: "b"
|
||||
value: <
|
||||
map_value: <
|
||||
fields: <
|
||||
key: "d"
|
||||
value: <
|
||||
integer_value: 2
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
field_paths: "b.c"
|
||||
field_paths: "b.d"
|
||||
>
|
||||
current_document: <
|
||||
exists: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a top-level key.
|
||||
|
||||
description: "update: Delete cannot be nested"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": {\"b\": \"Delete\"}}"
|
||||
is_error: true
|
||||
>
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a field. Deletes are implemented by
|
||||
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
|
||||
# support array indexing.
|
||||
|
||||
description: "update: Delete cannot be anywhere inside an array value"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, {\"b\": \"Delete\"}]}"
|
||||
is_error: true
|
||||
>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Delete sentinel must be the value of a field. Deletes are implemented by
|
||||
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
|
||||
# support array indexing.
|
||||
|
||||
description: "update: Delete cannot be in an array value"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": [1, 2, \"Delete\"]}"
|
||||
is_error: true
|
||||
>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# If a field's value is the Delete sentinel, then it doesn't appear in the update
|
||||
# data, but does in the mask.
|
||||
|
||||
description: "update: Delete"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
|
||||
request: <
|
||||
database: "projects/projectID/databases/(default)"
|
||||
writes: <
|
||||
update: <
|
||||
name: "projects/projectID/databases/(default)/documents/C/d"
|
||||
fields: <
|
||||
key: "a"
|
||||
value: <
|
||||
integer_value: 1
|
||||
>
|
||||
>
|
||||
>
|
||||
update_mask: <
|
||||
field_paths: "a"
|
||||
field_paths: "b"
|
||||
>
|
||||
current_document: <
|
||||
exists: true
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# The Update method does not support an explicit exists precondition.
|
||||
|
||||
description: "update: Exists precondition is invalid"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
precondition: <
|
||||
exists: true
|
||||
>
|
||||
json_data: "{\"a\": 1}"
|
||||
is_error: true
|
||||
>
|
||||
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# Empty fields are not allowed.
|
||||
|
||||
description: "update: empty field path component"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{\"a..b\": 1}"
|
||||
is_error: true
|
||||
>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# DO NOT MODIFY. This file was generated by
|
||||
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
|
||||
|
||||
# It is a client-side error to call Update with empty data.
|
||||
|
||||
description: "update: no paths"
|
||||
update: <
|
||||
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
|
||||
json_data: "{}"
|
||||
is_error: true
|
||||
>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user