Skip to content

Commit ce9945b

Browse files
authored
fix: support same options in model.query as query (#407)
For maintaining consistency.
1 parent 4fbcf7c commit ce9945b

File tree

1 file changed

+3
-0
lines changed
  • packages/google-cloud-ndb/google/cloud/ndb

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5265,6 +5265,7 @@ def _prepare_for_put(self):
52655265
projection=None,
52665266
distinct_on=None,
52675267
group_by=None,
5268+
default_options=None,
52685269
)
52695270
def _query(cls, *filters, **kwargs):
52705271
"""Generate a query for this class.
@@ -5290,6 +5291,7 @@ def _query(cls, *filters, **kwargs):
52905291
distinct_on (list[str]): The field names used to group query
52915292
results.
52925293
group_by (list[str]): Deprecated. Synonym for distinct_on.
5294+
default_options (QueryOptions): QueryOptions object.
52935295
"""
52945296
# Validating distinct
52955297
if kwargs["distinct"]:
@@ -5322,6 +5324,7 @@ def _query(cls, *filters, **kwargs):
53225324
projection=kwargs["projection"],
53235325
distinct_on=kwargs["distinct_on"],
53245326
group_by=kwargs["group_by"],
5327+
default_options=kwargs["default_options"],
53255328
)
53265329
query = query.filter(*cls._default_filters())
53275330
query = query.filter(*filters)

0 commit comments

Comments
 (0)