GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — datastore: Introduce Key type by rakyll · Pull Request #101 · googleapis/google-cloud-node

Conversation

@rakyll

@rakyll rakyll commented Aug 7, 2014

Copy link
Copy Markdown
Contributor

Related to #73 and #39.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rakyll
datastore: Introduce Key type.
874a147
@stephenplusplus

stephenplusplus commented Aug 7, 2014

Copy link
Copy Markdown
Contributor

Looks awesome!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stephenplusplus
stephenplusplus reviewed Aug 7, 2014
View reviewed changes
Comment thread lib/datastore/entity.js

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rakyll
datastore: Fixing regression test to support the Key type.
9c8b153
@rakyll

rakyll commented Aug 7, 2014

Copy link
Copy Markdown
Contributor Author

No more square brackets! I keep supporting an array path for those who might find it handier to create paths programmatically. JS doesn't have syntactic sugar for variadic arguments :(

Regression tests are fixed. PTAL.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stephenplusplus
stephenplusplus reviewed Aug 7, 2014
View reviewed changes
Comment thread regression/datastore.js Outdated

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rakyll added 2 commits August 7, 2014 15:41
@rakyll
Fix lint error.
cb165f3
@rakyll
Fixing README samples with Key type.
71bfec7
@rakyll

rakyll commented Aug 7, 2014

Copy link
Copy Markdown
Contributor Author

Fixed README, PTAL.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stephenplusplus
stephenplusplus reviewed Aug 7, 2014
View reviewed changes
Comment thread lib/datastore/index.js Outdated

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Aug 7, 2014

Copy link
Copy Markdown
Contributor

Found a shortcut you can use (noted above), but everything looks good.

Just thinking out loud, feel free to inform me why this may not be a good idea... where keys are required (e.g. dataset.get()), would it be beneficial not to require the use of datastore.key(), instead accepting the array we do currently, then creating a new Key object behind the scenes from it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rakyll
Remove unnecessary handling for array type
158aa9b
@rakyll

rakyll commented Aug 7, 2014

Copy link
Copy Markdown
Contributor Author

would it be beneficial not to require the use of datastore.key()

Optionally, we could support that. It could be a little bit confusing for multi get/save/delete operations. On the other hand, most of the time, people won't need to construct a key by hand, rather use an existing key instance retrieved via querying.

I'm more concerned about incomplete keys, they are pretty cryptic.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Aug 8, 2014

Copy link
Copy Markdown
Contributor

I'm cool with either way. Another thing I just realized, the convention in JS is upper camel case fns signify a class, thus must be instantiated with new - we're breaking this when a key can be constructed with dataset.Key() (I believe with Int and Double as well). Having a bunch of new Key()s passed as arguments could look a little verbose, so for this reason, I would rather see normal arrays passed as arguments, having the new Keys constructed from them internally. Then, when a key must be constructed manually, the new datastore.Key() will be less of an eyesore.

The other option, of course, is just making it dataset.key().

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rakyll

rakyll commented Aug 8, 2014

Copy link
Copy Markdown
Contributor Author

I'm cool with either way. Another thing I just realized, the convention in JS is upper camel case fns signify a class

Yes, what I do is not kosher :( new Key is pretty verbose, I'd prefer dataset.key or datastore.key. Same with Int and Double.

I would rather see normal arrays passed as arguments

It breaks the reusability of the key instances.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Aug 8, 2014

Copy link
Copy Markdown
Contributor

It would be nice to force consistency. dataset.key is alright with me.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rakyll
Lowercase Key initializer.
53d4f56
@rakyll

rakyll commented Aug 8, 2014

Copy link
Copy Markdown
Contributor Author

Lowercased. Will send changes to Int and Double on a different PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stephenplusplus added a commit that referenced this pull request Aug 8, 2014
@stephenplusplus
Merge pull request #101 from rakyll/keytype
a9ad149
datastore: Introduce Key type
@stephenplusplus
stephenplusplus merged commit a9ad149 into googleapis:master Aug 8, 2014
chingor13 pushed a commit that referenced this pull request Sep 9, 2022
@release-please @gcf-owl-bot
chore(main): release 2.1.2 (#101)
c0be14d
* chore(main): release 2.1.2

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Sep 13, 2022
@release-please @gcf-owl-bot
chore(main): release 2.1.2 (#101)
9769c57
* chore(main): release 2.1.2

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Sep 27, 2022
@JustinBeckwith @alexander-fenster
Enable no-var in eslint (#101)
f83fa71
@sofisl sofisl mentioned this pull request Sep 27, 2022
migrate code from googleapis/nodejs-video-intelligence #3374
Closed
4 tasks
sofisl pushed a commit that referenced this pull request Oct 13, 2022
@yoshi-automation
build: add Node 8 tests (#101)
35876c1
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/5b03461e-47c0-40e8-a8ad-c465ee146cc5/targets

- [ ] To automatically regenerate this PR, check this box.
@sofisl sofisl mentioned this pull request Oct 13, 2022
migrate code from googleapis/nodejs-recommender #3409
Merged
4 tasks
sofisl pushed a commit that referenced this pull request Oct 13, 2022
@release-please
chore: release 1.2.0 (#101)
b81cbb2
🤖 I have created a release \*beep\* \*boop\*
---
## [1.2.0](https://www.github.com/googleapis/nodejs-bigquery-reservation/compare/v1.1.6...v1.2.0) (2021-08-23)


### Features

* turns on self-signed JWT feature flag ([#100](https://www.github.com/googleapis/nodejs-bigquery-reservation/issues/100)) ([0047223](https://www.github.com/googleapis/nodejs-bigquery-reservation/commit/004722310ece662732fe60c8941be1b30214ed6d))


### Bug Fixes

* **build:** migrate to using main branch ([#97](https://www.github.com/googleapis/nodejs-bigquery-reservation/issues/97)) ([2e5a332](https://www.github.com/googleapis/nodejs-bigquery-reservation/commit/2e5a332b21067dd73ec6d2b218b87b61b8ebf59e))
* **deps:** google-gax v2.24.1 ([#99](https://www.github.com/googleapis/nodejs-bigquery-reservation/issues/99)) ([3a4cdec](https://www.github.com/googleapis/nodejs-bigquery-reservation/commit/3a4cdec8d028f0d6fd6d8ebc3977c00231b290bb))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This was referenced Oct 13, 2022
migrate code from googleapis/nodejs-bigquery-reservation #3413
Merged
migrate code from googleapis/nodejs-policy-troubleshooter #3414
Merged
sofisl pushed a commit that referenced this pull request Oct 13, 2022
@gcf-owl-bot
chore: update v2.12.0 gapic-generator-typescript (#101)
14af223
- [ ] Regenerate this pull request now.

Committer: @summer-ji-eng
PiperOrigin-RevId: 424244721

Source-Link: googleapis/googleapis@4b6b01f

Source-Link: googleapis/googleapis-gen@8ac83fb
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9
GautamSharda pushed a commit that referenced this pull request Feb 2, 2026
@ofrobots
cleanup: get rid of unncessary type casts (#101)
d15fcdd
* Adding a generic index property to `Metadata` gets rid of many casts. This leads to a fair amount of cleanup.
* Improve typing for StackdriverLog which leads to more casts being eliminated.
* Apply `gts fix` to core.d.ts.
@GautamSharda GautamSharda mentioned this pull request Feb 2, 2026
migrate code from googleapis/nodejs-logging-winston #7082
Closed
@sofisl sofisl mentioned this pull request Feb 3, 2026
migrate code from googleapis/cloud-profiler-nodejs #7087
Merged
4 tasks
GautamSharda pushed a commit that referenced this pull request Feb 3, 2026
@ofrobots
cleanup: get rid of unncessary type casts (#101)
251df32
* Adding a generic index property to `Metadata` gets rid of many casts. This leads to a fair amount of cleanup.
* Improve typing for StackdriverLog which leads to more casts being eliminated.
* Apply `gts fix` to core.d.ts.
@GautamSharda GautamSharda mentioned this pull request Feb 3, 2026
migrate code from googleapis/nodejs-logging-winston #7129
Merged
4 tasks
sofisl pushed a commit that referenced this pull request Feb 4, 2026
@renovate @JustinBeckwith
chore(deps): lock file maintenance (#101)
059a40b
This was referenced Feb 4, 2026
migrate code from googleapis/nodejs-logging-bunyan #7136
Closed
migrate code from googleapis/nodejs-logging-bunyan #7137
Closed
migrate code from googleapis/nodejs-logging-bunyan #7138
Merged
migrate code from googleapis/nodejs-datastore #7148
Closed
sofisl pushed a commit that referenced this pull request Feb 5, 2026
@trollkotze @stephenplusplus
excludeFromIndexes: fix for entity elements inside arrays (#101)
227d03a
Fixes #93 
Fixes #100
sofisl pushed a commit that referenced this pull request Feb 5, 2026
@stephenplusplus
1.4.1 (#111)
d5bc624
## Fixes

- (#101): excludeFromIndexes behavior fix for entities inside arrays. (Thanks, @trollkotze!)
- Updated dependencies.
GautamSharda pushed a commit that referenced this pull request Feb 5, 2026
@DominicKramer
chore: release v0.3.2 (#101)
7c2af1a
@GautamSharda GautamSharda mentioned this pull request Feb 5, 2026
migrate code from googleapis/nodejs-error-reporting #7169
Closed
4 tasks
@sofisl sofisl mentioned this pull request Feb 17, 2026
migrate code from googleapis/nodejs-datastore #7263
Merged
4 tasks
This was referenced Feb 23, 2026
migrate code from googleapis/nodejs-error-reporting #7294
Closed
migrate code from googleapis/nodejs-bigquery-storage #7306
Closed
migrate code from googleapis/nodejs-error-reporting #7308
Merged
This was referenced Feb 26, 2026
migrate code from googleapis/nodejs-firestore #7311
Closed
migrate code from googleapis/nodejs-firestore #7410
Merged
@GautamSharda GautamSharda mentioned this pull request Mar 5, 2026
migrate code from googleapis/nodejs-bigquery-storage #7496
Merged
4 tasks
@codyoss codyoss mentioned this pull request Mar 5, 2026
migrate code from googleapis/nodejs-projectify #7511
Merged
@GautamSharda GautamSharda mentioned this pull request Mar 5, 2026
migrate code from googleapis/nodejs-logging #7514
Merged
4 tasks
@codyoss codyoss mentioned this pull request Mar 9, 2026
migrate code from googleapis/nodejs-paginator #7536
Closed
@meltsufin meltsufin mentioned this pull request Mar 10, 2026
chore: migrate code from googleapis/nodejs-logging #7550
Merged
@codyoss codyoss mentioned this pull request Mar 11, 2026
migrate code from googleapis/nodejs-paginator #7590
Merged
@GautamSharda GautamSharda mentioned this pull request Mar 11, 2026
migrate code from googleapis/nodejs-pubsub #7592
Merged
4 tasks
@codyoss codyoss mentioned this pull request Mar 12, 2026
migrate code from googleapis/nodejs-precise-date #7594
Merged
@GautamSharda GautamSharda mentioned this pull request Mar 12, 2026
migrate code from googleapis/nodejs-common #7597
Merged
4 tasks
@GautamSharda GautamSharda mentioned this pull request Mar 23, 2026
migrate code from googleapis/nodejs-bigtable #7852
Merged
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rakyll @stephenplusplus
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.