Skip to content

Datastore.runQuery with .on('data') doesn't demonstrate how to "abort"? #1261

@jgeewax

Description

@jgeewax

In a for-loop, I can call break; to exit. When I'm in a runQuery stream, I'm unsure how to exit early. Is there a way to document that?

Ie, it might be...

datastore.runQuery(query)
  .on('data', function(entity) {
    if (my exit criteria) this.exit(); // ?
  });

Metadata

Metadata

Labels

api: datastoreIssues related to the Datastore API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions