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 — Allow Query.select to accept a single string? · Issue #595 · googleapis/google-cloud-node

Allow Query.select to accept a single string? #595

New issue
Copy link
New issue
Copy link
Closed
#604
Closed
Allow Query.select to accept a single string?#595
#604
Copy link
Assignees
yoshi-automation
Labels
api: datastoreIssues related to the Datastore API.
Milestone
Datastore Future

Description

@jgeewax
jgeewax
opened on May 13, 2015
Issue body actions

I figured if I wanted to select only one field, I could call .select('name') -- but got a scary error:

/usr/lib/node_modules/gcloud/lib/datastore/entity.js:520
  query.projection = q.selectVal.map(function(v) {
                                 ^
TypeError: undefined is not a function
    at Object.queryToQueryProto (/usr/lib/node_modules/gcloud/lib/datastore/entity.js:520:34)
    at Dataset.DatastoreRequest.runQuery (/usr/lib/node_modules/gcloud/lib/datastore/request.js:422:19)
    at Object.<anonymous> (/usr/local/google/home/jjg/datastore-playground.js:12:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Could we make the following snippet run happily?

// Note not an array being passed in!
var query = dataset.createQuery('MyKind').select('name');
dataset.runQuery(query);

// AND still:

var query = dataset.createQuery('MyKind').select(['name']);
dataset.runQuery(query);

Activity

Next
  1. jgeewax
    added
    enhancement
    api: datastoreIssues related to the Datastore API.
    on May 13, 2015
  2. jgeewax
    added this to the Datastore Future milestone on May 13, 2015
  3. ryanseys
    closed this as completedin #604on May 19, 2015
  4. JustinBeckwith
    assigned
    yoshi-automation
    on Feb 1, 2021
  5. chingor13
    added 3 commits that reference this issue on Aug 22, 2022

    build: update copyright year to 2022 (#595)

    6a3e541

    build: update copyright year to 2022 (#595)

    366b170

    build: update copyright year to 2022 (#595)

    8d227d8
  6. sofisl
    added 4 commits that reference this issue on Oct 11, 2022

    fix(deps): google-gax v2.17.0 with mTLS (#595)

    9ef8c5b

    chore: release 4.2.6 (#596)

    6f3543d

    fix(deps): google-gax v2.17.0 with mTLS (#595)

    921b69b

    chore: release 4.2.6 (#596)

    5539e94
  7. sofisl
    added 3 commits that reference this issue on Nov 10, 2022

    build: update copyright year to 2022 (#595)

    3c508ff

    chore(deps): update dependency jsdoc-fresh to v2 (#595)

    060b5fa

    chore(main): release 3.1.2 (#595)

    78dc277
  8. 9 remaining items

  9. sofisl
    added 3 commits that reference this issue on Jan 27, 2026

    fix(deps): update dependency pprof to v1.3.0 (#595)

    04b78bd

    fix(deps): update dependency pprof to v1.3.0 (#595)

    a94a36b

    fix(deps): update dependency pprof to v1.3.0 (#595)

    cf475ff
  10. GautamSharda
    added 2 commits that reference this issue on Feb 2, 2026

    chore(deps): update dependency @types/node to v14 (#595)

    47c4fb3

    chore(deps): update dependency @types/node to v14 (#595)

    489d6f2
  11. sofisl
    added a commit that references this issue on Feb 4, 2026

    migrate code from googleapis/cloud-profiler-nodejs (#7087)

    288deb4
  12. sofisl
    added 3 commits that reference this issue on Feb 24, 2026

    docs: add .readme-metadata.json and generate new README.md (#595)

    75f3346

    test: skip public bucket system tests running under VPCSC (#595)

    d377f9d

    build: allow Node 10 to push to codecov (#595)

    aada969
  13. GautamSharda
    added a commit that references this issue on Mar 12, 2026

    chore: release 3.3.1 (#595)

    b62129e
  14. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    test: skip public bucket system tests running under VPCSC (googleapis…

    f0a0459
  15. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    chore(deps): update dependency nyc to v15 (#595)

    b29b365

    chore(deps): update dependency nyc to v15 (#595)

    b854e1d
  16. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    chore(deps): update dependency nyc to v15 (#595)

    0840018
  17. thiyaguk09
    added a commit that references this issue on May 5, 2026

    chore(deps): update dependency nyc to v15 (googleapis#595)

    4f2dd80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @yoshi-automation
    yoshi-automation

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

    Milestone

    • Datastore FutureNo due date

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.