Skip to content

Commit

Permalink
docs(query): Document deprecation of Query.default_options (#915)
Browse files Browse the repository at this point in the history
Fixes #880
  • Loading branch information
rwhogg authored Sep 19, 2023
1 parent bb23cb4 commit a656719
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions google/cloud/ndb/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ def ranked(cls, rank):
has_more)
All of the above methods take a standard set of additional query options,
either in the form of keyword arguments such as keys_only=True, or as
QueryOptions object passed with options=QueryOptions(...). The most important
query options are:
in the form of keyword arguments such as keys_only=True. You can also pass
a QueryOptions object options=QueryOptions(...), but this is deprecated.
The most important query options are:
- keys_only: bool, if set the results are keys instead of entities.
- limit: int, limits the number of results returned.
Expand Down Expand Up @@ -1304,7 +1305,8 @@ class Query(object):
distinct_on (list[str]): The field names used to group query
results.
group_by (list[str]): Deprecated. Synonym for distinct_on.
default_options (QueryOptions): QueryOptions object.
default_options (QueryOptions): Deprecated. QueryOptions object.
Prefer passing explicit keyword arguments to the relevant method directly.
Raises:
TypeError: If any of the arguments are invalid.
Expand Down

0 comments on commit a656719

Please sign in to comment.