You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
The ndb-orm/query.py file is missing. Running any query with Model.query() results in error:
File "/home/.../venv/lib/python3.6/site-packages/ndb_orm/model.py", line 3420, in _query
from .query import Query # Import late to avoid circular imports.
ModuleNotFoundError: No module named 'ndb_orm.query'
This is not a drop-in replacement for the whole ndb package (no ndb.context, ndb.tasklets, ndb.query or ndb.Key), but allows you to use ndb.model classes.
So the file might be intentionally omitted. This code throws an exception when properly used though.
How to reproduce:
Create an entity Person
Call Person.query()
The text was updated successfully, but these errors were encountered:
You are completely right. The query.py file is missing intentionally. Ndb-orm aims to make a migration as simple as possible. The focus is to make ndb models usable on platforms where ndb is not supported.
For creating queries you (currently) need to the underlying gcloud datastore directly:
datastore_client.query(
kind=Person._get_kind()
)
I think it should be possible to create a wraper for most common query use cases. I'm currently missing time for this.
I've added 'tests_query_simply.py' to show how to use queries (in 'tests' subdirectory).
The
ndb-orm/query.py
file is missing. Running any query withModel.query()
results in error:README.md says:
So the file might be intentionally omitted. This code throws an exception when properly used though.
How to reproduce:
Person
Person.query()
The text was updated successfully, but these errors were encountered: