Skip to content

Lazy loading of entities when running a query #548

Closed
@clardeur

Description

I just want to scroll all entities of a specific kind in a lazy way. I have tried to add a limit but as intended I have only the number of specified results and not the entire dataset.

StructuredQuery<Entity> query = Query.entityQueryBuilder()
    .kind("user")
    .limit(100)
    .build();

QueryResults<Entity> results = datastore.run(query);

How to do it ? Did you plan to add a fetchSize() parameter ?

Without limit() I have a DatastoreException: Server returned an error INTERNAL 500

Metadata

Assignees

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