-
Notifications
You must be signed in to change notification settings - Fork 640
datastore: make query objects mutable #808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lib/datastore/query.js
Outdated
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Do any of the tests test for |
lib/datastore/query.js
Outdated
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
👏 |
They don't explicitly test that what is returned is the same as the original object e.g. var query = new Query(['kind1']);
var limited = query.limit(10);
assert.strictEqual(query, limited);However, there are tests that make use of the chaining - https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/test/datastore/query.js#L345 |
|
It's better to test for it explicitly, in case something random goes wrong with that catch all test. (maybe the last one in the chain doesn't return |
cloned query when creating nextQuery object added unit tests for return values
|
Sure, tests have been created! |
datastore: make query objects mutable
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: googleapis/googleapis@cfa1b37 Source-Link: googleapis/googleapis-gen@09b7666 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9
chore: relocate owl bot post processor
chore: relocate owl bot post processor
Related to #806
This makes
Queryobjects mutable.