Skip to content

Commit 4e67dd5

Browse files
authored
docs(query): Document deprecation of Query.default_options (#915)
Fixes #880
1 parent 10b2265 commit 4e67dd5

File tree

1 file changed

+6
-4
lines changed
  • packages/google-cloud-ndb/google/cloud/ndb

1 file changed

+6
-4
lines changed

packages/google-cloud-ndb/google/cloud/ndb/query.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ def ranked(cls, rank):
100100
has_more)
101101
102102
All of the above methods take a standard set of additional query options,
103-
either in the form of keyword arguments such as keys_only=True, or as
104-
QueryOptions object passed with options=QueryOptions(...). The most important
105-
query options are:
103+
in the form of keyword arguments such as keys_only=True. You can also pass
104+
a QueryOptions object options=QueryOptions(...), but this is deprecated.
105+
106+
The most important query options are:
106107
107108
- keys_only: bool, if set the results are keys instead of entities.
108109
- limit: int, limits the number of results returned.
@@ -1304,7 +1305,8 @@ class Query(object):
13041305
distinct_on (list[str]): The field names used to group query
13051306
results.
13061307
group_by (list[str]): Deprecated. Synonym for distinct_on.
1307-
default_options (QueryOptions): QueryOptions object.
1308+
default_options (QueryOptions): Deprecated. QueryOptions object.
1309+
Prefer passing explicit keyword arguments to the relevant method directly.
13081310
13091311
Raises:
13101312
TypeError: If any of the arguments are invalid.

0 commit comments

Comments
 (0)