Skip to content

Cannot do parallelized "X is one of [A,B,C]" queries #3329

@mikelambert

Description

@mikelambert

The old DB and NDB libraries offered a way to query a field as a member of a list:

CityTable.query(CityTable.city.IN(city_names)).fetch(100)

I think it should be possible to do this parallelized query in google.cloud.datastore as well.

The google.cloud.datastore offers no async API, and so can be an order of magnitude slower when manually stitching together this query, which makes it unusable for my purposes as a replacement for NDB. (I am getting off NDB as it is currently a requirement for getting off python-compat onto a generic python runtime.)

The async API bug mentions that an async API is not needed "because NDB exists", which doesn't make sense to me because NDB is more than an async API...its also an ORM and an eventloop library and more.

And even the NDB bug talks about how NDB positions as a complex ORM layer vs the simple key-value store of google.cloud.datastore.

I would like the simple key-value approach combined with a barebones async API, that one could use to implement a "where field is in list" query like the old DB and NDB libraries supported.

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions