google-cloud-go
google-cloud-go copied to clipboard
firestore: disallow creating StartAt/EndAt/etc before orders.
For firestore, most SDKs disallow the following
testCase.queryColl.StartAt(documentSnapshot).OrderBy("a", Asc)
This is because at the time of 'orderBy "A"' we need to have the values of the snapshot fields. This requires holding additional data for the lifetime of the query.
Other SDKs disallow this, requiring that order be created before start at.
If we made this breaking change, it would allow a simplification of the internals of the Query class would be preferable for maintenance and parity with other clients.
Other examples exist but https://github.com/googleapis/java-firestore/blob/9ff2f41b765c8878c3b3fb7df962f6f1ed537f05/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java#L397