-
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
Setting Property value types for Datastore Entities #553
Comments
I believe you can do this by passing in the actual I also think that if you want to distinguish between Int and Double, you can use the Ie, this should work var entry = {
"title": "Title",
"start": new Date(),
"myDouble": gcloud.datastore.double(3.0)
};
var ds = gcloud.datastore.dataset();
var key = ds.key(['Entry', 'Foo', 'Todo']);
ds.save({
key: key,
data: entry
}, callback); |
Perhaps we should add a few more examples to the |
Ah ok, I admit I'm struggling to make sense of the documentation. I think the reason for this is that reading the general Datastore documentation for the first time (https://cloud.google.com/datastore/docs/concepts/entities#Datastore_Properties_and_value_types) makes reference to doing something like: var entity = {
key: { path: [{ kind: 'Employee' }] },
properties: {
firstName: { stringValue: 'Antonio' },
lastName: { stringValue: 'Salieri' },
hireDate: { dateTimeValue: '2013-05-14T13:01:00.234Z' },
attendedHrTraining: { booleanValue: true }
}
};
datastore.commit({
mutation: { insertAutoId: [entity] },
mode: 'NON_TRANSACTIONAL'
}).execute(callback); which uses the googleapis module. Maybe it will help to clarify in the documentation the difference between using the googleapis module vs the gcloud module in Node as I'm finding I'm stumbling across both while searching for Datastore information on Node. |
That's a great point @byrneciaran. I'm going to open another issue for us to put a banner saying that we're not the same as the googleapis module... Not sure how else we can clarify this without changing documentation on cloud.google.com (which we shouldn't really do until we hit v1.0). If you have any suggestions, definitely let us know! I'm going to close out this issue as I think we've answered the question, but feel free to re-open if you think that's a mistake, and follow #554 if you're interested in providing any feedback on the updates we're making to the documentation. |
* feat: add OSConfigZonalService API Committer: @jaiminsh PiperOrigin-RevId: 394704298 Source-Link: googleapis/googleapis@31d2d34 Source-Link: googleapis/googleapis-gen@aa3ce09 * 🦉 Updates from OwlBot 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\* --- ## [3.19.0](https://www.github.com/googleapis/nodejs-asset/compare/v3.18.0...v3.19.0) (2021-09-07) ### Features * add OSConfigZonalService API Committer: [@jaiminsh](https://www.github.com/jaiminsh) ([#553](https://www.github.com/googleapis/nodejs-asset/issues/553)) ([1ab2458](https://www.github.com/googleapis/nodejs-asset/commit/1ab2458b63ebe46b8aa8edbd2b1837e793d531f1)) * Release of relationships in v1, Add content type Relationship to support relationship search Committer: yuwangyw@ ([#551](https://www.github.com/googleapis/nodejs-asset/issues/551)) ([56526b0](https://www.github.com/googleapis/nodejs-asset/commit/56526b02d14d15fd6fc469cd614bff9098f3789b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* feat: add OSConfigZonalService API Committer: @jaiminsh PiperOrigin-RevId: 394704298 Source-Link: googleapis/googleapis@31d2d34 Source-Link: googleapis/googleapis-gen@aa3ce09 * 🦉 Updates from OwlBot 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\* --- ## [3.19.0](https://www.github.com/googleapis/nodejs-asset/compare/v3.18.0...v3.19.0) (2021-09-07) ### Features * add OSConfigZonalService API Committer: [@jaiminsh](https://www.github.com/jaiminsh) ([#553](https://www.github.com/googleapis/nodejs-asset/issues/553)) ([1ab2458](https://www.github.com/googleapis/nodejs-asset/commit/1ab2458b63ebe46b8aa8edbd2b1837e793d531f1)) * Release of relationships in v1, Add content type Relationship to support relationship search Committer: yuwangyw@ ([#551](https://www.github.com/googleapis/nodejs-asset/issues/551)) ([56526b0](https://www.github.com/googleapis/nodejs-asset/commit/56526b02d14d15fd6fc469cd614bff9098f3789b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* feat: add OSConfigZonalService API Committer: @jaiminsh PiperOrigin-RevId: 394704298 Source-Link: googleapis/googleapis@31d2d34 Source-Link: googleapis/googleapis-gen@aa3ce09 * 🦉 Updates from OwlBot 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\* --- ## [3.19.0](https://www.github.com/googleapis/nodejs-asset/compare/v3.18.0...v3.19.0) (2021-09-07) ### Features * add OSConfigZonalService API Committer: [@jaiminsh](https://www.github.com/jaiminsh) ([#553](https://www.github.com/googleapis/nodejs-asset/issues/553)) ([1ab2458](https://www.github.com/googleapis/nodejs-asset/commit/1ab2458b63ebe46b8aa8edbd2b1837e793d531f1)) * Release of relationships in v1, Add content type Relationship to support relationship search Committer: yuwangyw@ ([#551](https://www.github.com/googleapis/nodejs-asset/issues/551)) ([56526b0](https://www.github.com/googleapis/nodejs-asset/commit/56526b02d14d15fd6fc469cd614bff9098f3789b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [3.3.3](https://www.github.com/googleapis/nodejs-video-intelligence/compare/v3.3.2...v3.3.3) (2021-06-10) ### Bug Fixes * GoogleAdsError missing using generator version after 1.3.0 ([#556](https://www.github.com/googleapis/nodejs-video-intelligence/issues/556)) ([be3a053](https://www.github.com/googleapis/nodejs-video-intelligence/commit/be3a053818f7b59825f777460e129a10ada7fd79)) * remove doc config exception ([#553](https://www.github.com/googleapis/nodejs-video-intelligence/issues/553)) ([39d0f04](https://www.github.com/googleapis/nodejs-video-intelligence/commit/39d0f04a9f37e649dae5a2ad559d21db99665bdf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [3.3.3](https://www.github.com/googleapis/nodejs-video-intelligence/compare/v3.3.2...v3.3.3) (2021-06-10) ### Bug Fixes * GoogleAdsError missing using generator version after 1.3.0 ([#556](https://www.github.com/googleapis/nodejs-video-intelligence/issues/556)) ([be3a053](https://www.github.com/googleapis/nodejs-video-intelligence/commit/be3a053818f7b59825f777460e129a10ada7fd79)) * remove doc config exception ([#553](https://www.github.com/googleapis/nodejs-video-intelligence/issues/553)) ([39d0f04](https://www.github.com/googleapis/nodejs-video-intelligence/commit/39d0f04a9f37e649dae5a2ad559d21db99665bdf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [2.3.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.1...v2.3.2) (2021-06-29) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#552](https://www.github.com/googleapis/nodejs-monitoring/issues/552)) ([43c9ddd](https://www.github.com/googleapis/nodejs-monitoring/commit/43c9dddbd75668da5e7c0b2608346e8f04402e7e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* feat: add OSConfigZonalService API Committer: @jaiminsh PiperOrigin-RevId: 394704298 Source-Link: googleapis/googleapis@31d2d34 Source-Link: googleapis/googleapis-gen@aa3ce09 * 🦉 Updates from OwlBot 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\* --- ## [3.19.0](https://www.github.com/googleapis/nodejs-asset/compare/v3.18.0...v3.19.0) (2021-09-07) ### Features * add OSConfigZonalService API Committer: [@jaiminsh](https://www.github.com/jaiminsh) ([#553](https://www.github.com/googleapis/nodejs-asset/issues/553)) ([1ab2458](https://www.github.com/googleapis/nodejs-asset/commit/1ab2458b63ebe46b8aa8edbd2b1837e793d531f1)) * Release of relationships in v1, Add content type Relationship to support relationship search Committer: yuwangyw@ ([#551](https://www.github.com/googleapis/nodejs-asset/issues/551)) ([56526b0](https://www.github.com/googleapis/nodejs-asset/commit/56526b02d14d15fd6fc469cd614bff9098f3789b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* docs: Fixes small typo * docs: Add missing gce_startup_script end comment * lint fix * copyright fix Co-authored-by: Takashi Matsuo <[email protected]>
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/160598ca-4f95-425c-8b33-df656c4049e4/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@901ddd4 Source-Link: googleapis/synthtool@f96d3b4
How do I set Property value types (e.g. dateTimeValue, IntegerValue, etc.) when inserting my entities in the example below. At the moment the Property value types are all set as strings
The text was updated successfully, but these errors were encountered: