-
Notifications
You must be signed in to change notification settings - Fork 598
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
datastore: Support commit mutation methods on top level of dataset #208
Comments
+1. Users would probably appreciate explicit control. And bonus, we support delete already! |
What's the difference between |
From the docs: "To have the Datastore assign a numeric ID automatically, omit both the name and id fields and place the entity in the insertAutoId (JSON) or insert_auto_id (protocol buffers) field of the mutation" |
Sure, but how do you propose we handle our implementation? (The last two questions) |
If we are missing required information from the key, return an error in the callback (don't throw).
Again, no throwing, use the callback to return errors. An error will occur if they provide too little information, not too much. |
We can assume that if they call insertAutoId, then we just include the information relevant to that call i.e. ignore the name and id fields if they are specified. |
I think I'm starting to think differently towards this proposal. I like the simplicity of our API. I think that's the point of making this nice abstraction. If we allow direct methods, we give the user too many options imo, and would be better recommending they use another library/combination of libraries for lower level access. |
I don't see these as "low level access" but fundamental actions you commit to the data in the datastore. The problem with the current code-generated library is it's too high level. You I'm proposing we extract those commands and give them to the user. Those 5 mutations are all I found. I don't think it's asking for much and it shows the developer what they can/cannot do with the datastore from a storage point of view (querying is a different issue). |
We provide these actions. upsert: "I want to update this entity if it exists, otherwise create one." insert: "I want to insert this entity into the datastore." insertAutoId: "I want to create this entity and have an id generated for me." update: "I want to update this entity" So, I don't consider
Maybe we can show the user more explicitly in our documentation how |
I didn't know |
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ name: 'propertyName', value: 'any value type', indexed: false ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ name: 'propertyName', value: 'any value type', indexed: false ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ name: 'propertyName', value: 'any value type', indexed: false ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ name: 'propertyName', value: 'any value type', indexed: false ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
Closing. Seems |
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', indexable: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
By default, property index values are set to `true`, without allowing the user to specify an override. Now, when a user passes in an array to `dataset.save`, they will have the option of setting `true` or `false`. Example: dataset.save({ key: dataset.key('Company'), data: [ { name: 'propertyName', value: 'any value type', excludeFromIndexes: false } ] }, function(err, keys) {}). Resolves: googleapis#208 Related: http://goo.gl/tKVvhP
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…PI (#208) * feat: add `runFunnelReport` method to the Alpha version of the Data API PiperOrigin-RevId: 446813357 Source-Link: googleapis/googleapis@6d3ae1a Source-Link: googleapis/googleapis-gen@1cfc0eb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWNmYzBlYjY2ODc0ZjA1YzQxODJkNDIyZTFjODliZDVlMmYyYWJlNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [2.3.8](https://www.github.com/googleapis/nodejs-game-servers/compare/v2.3.7...v2.3.8) (2021-08-17) ### Bug Fixes * **build:** migrate to using main branch ([#206](https://www.github.com/googleapis/nodejs-game-servers/issues/206)) ([04998bf](https://www.github.com/googleapis/nodejs-game-servers/commit/04998bf4f24613792beb12fff9d1a14da795b74b)) * **deps:** google-gax v2.24.1 ([#208](https://www.github.com/googleapis/nodejs-game-servers/issues/208)) ([8462da4](https://www.github.com/googleapis/nodejs-game-servers/commit/8462da415e3df130356f70e34f97698628f48b2b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…imated bytes that a session will scan. (#208) Committer: @emkornfield PiperOrigin-RevId: 396849937
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/jsdoc-fresh</summary> ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-analytics-admin).
fix: use google-gax v3.3.0 Source-Link: googleapis/synthtool@c73d112 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Should support commit mutations as top level methods in dataset.
It just makes sense:
The text was updated successfully, but these errors were encountered: