Skip to content

Add query.run() ? #1266

@jgeewax

Description

@jgeewax

We create a query from a datastore instance (which has the auth stuff) but then don't allow people to blindly "run" the query. Is there a reason?

Code today:

var query = datastore.createQuery('Kind').filter('key', 'value');
datastore.runQuery(query).on('data', function(entity) {
  // do something with the entity
});

Would be nice if....

var query = datastore.query('Kind').filter('key', 'value');
query.run().on('data', function(entity) {
  // Do something with the entity
});

// And if we wanted the same query, but with different credentials/project ID/etc:

otherDatastore.runQuery(query).on(....)

Metadata

Metadata

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions