Skip to content

Commit

Permalink
feat: Add bloom filter related proto fields (only in the preview API …
Browse files Browse the repository at this point in the history
…surface) (#707)

* feat: Add bloom filter related proto fields (only in the preview API surface)

PiperOrigin-RevId: 527090049

Source-Link: googleapis/googleapis@e2b7cb9

Source-Link: googleapis/googleapis-gen@b0d2cc1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBkMmNjMWM0OGRkYWMxYzVkYmFjMWNlMTk5ZDI5ZWFmMWM1ZWMwYyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
  • Loading branch information
3 people committed May 1, 2023
1 parent 1587285 commit eb4fe8e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 27 deletions.
6 changes: 3 additions & 3 deletions google/cloud/firestore_v1/services/firestore/async_client.py
Expand Up @@ -1430,8 +1430,8 @@ def write(
metadata: Sequence[Tuple[str, str]] = (),
) -> Awaitable[AsyncIterable[firestore.WriteResponse]]:
r"""Streams batches of document updates and deletes, in
order. This method is only available via the gRPC API
(not REST).
order. This method is only available via gRPC or
WebChannel (not REST).
.. code-block:: python
Expand Down Expand Up @@ -1531,7 +1531,7 @@ def listen(
metadata: Sequence[Tuple[str, str]] = (),
) -> Awaitable[AsyncIterable[firestore.ListenResponse]]:
r"""Listens to changes. This method is only available via
the gRPC API (not REST).
gRPC or WebChannel (not REST).
.. code-block:: python
Expand Down
6 changes: 3 additions & 3 deletions google/cloud/firestore_v1/services/firestore/client.py
Expand Up @@ -1520,8 +1520,8 @@ def write(
metadata: Sequence[Tuple[str, str]] = (),
) -> Iterable[firestore.WriteResponse]:
r"""Streams batches of document updates and deletes, in
order. This method is only available via the gRPC API
(not REST).
order. This method is only available via gRPC or
WebChannel (not REST).
.. code-block:: python
Expand Down Expand Up @@ -1617,7 +1617,7 @@ def listen(
metadata: Sequence[Tuple[str, str]] = (),
) -> Iterable[firestore.ListenResponse]:
r"""Listens to changes. This method is only available via
the gRPC API (not REST).
gRPC or WebChannel (not REST).
.. code-block:: python
Expand Down
Expand Up @@ -555,8 +555,8 @@ def write(self) -> Callable[[firestore.WriteRequest], firestore.WriteResponse]:
r"""Return a callable for the write method over gRPC.
Streams batches of document updates and deletes, in
order. This method is only available via the gRPC API
(not REST).
order. This method is only available via gRPC or
WebChannel (not REST).
Returns:
Callable[[~.WriteRequest],
Expand All @@ -581,7 +581,7 @@ def listen(self) -> Callable[[firestore.ListenRequest], firestore.ListenResponse
r"""Return a callable for the listen method over gRPC.
Listens to changes. This method is only available via
the gRPC API (not REST).
gRPC or WebChannel (not REST).
Returns:
Callable[[~.ListenRequest],
Expand Down
Expand Up @@ -571,8 +571,8 @@ def write(
r"""Return a callable for the write method over gRPC.
Streams batches of document updates and deletes, in
order. This method is only available via the gRPC API
(not REST).
order. This method is only available via gRPC or
WebChannel (not REST).
Returns:
Callable[[~.WriteRequest],
Expand All @@ -599,7 +599,7 @@ def listen(
r"""Return a callable for the listen method over gRPC.
Listens to changes. This method is only available via
the gRPC API (not REST).
gRPC or WebChannel (not REST).
Returns:
Callable[[~.ListenRequest],
Expand Down
10 changes: 8 additions & 2 deletions google/cloud/firestore_v1/types/firestore.py
Expand Up @@ -886,8 +886,14 @@ class RunAggregationQueryResponse(proto.Message):
Only present on the first response when the
request requested to start a new transaction.
read_time (google.protobuf.timestamp_pb2.Timestamp):
The time at which the aggregate value is
valid for.
The time at which the aggregate result was computed. This is
always monotonically increasing; in this case, the previous
AggregationResult in the result stream are guaranteed not to
have changed between their ``read_time`` and this one.
If the query returns no results, a response with
``read_time`` and no ``result`` will be sent, and this
represents the time at which the query was run.
"""

result: aggregation_result.AggregationResult = proto.Field(
Expand Down
34 changes: 21 additions & 13 deletions google/cloud/firestore_v1/types/query.py
Expand Up @@ -38,7 +38,12 @@ class StructuredQuery(proto.Message):
Attributes:
select (google.cloud.firestore_v1.types.StructuredQuery.Projection):
The projection to return.
Optional sub-set of the fields to return.
This acts as a
[DocumentMask][google.firestore.v1.DocumentMask] over the
documents returned from a query. When not set, assumes that
the caller wants all fields returned.
from_ (MutableSequence[google.cloud.firestore_v1.types.StructuredQuery.CollectionSelector]):
The collections to query.
where (google.cloud.firestore_v1.types.StructuredQuery.Filter):
Expand Down Expand Up @@ -328,27 +333,30 @@ class Operator(proto.Enum):
Requires:
- That ``value`` is a non-empty ``ArrayValue`` with at most
10 values.
- No other ``IN`` or ``ARRAY_CONTAINS_ANY`` or ``NOT_IN``.
- That ``value`` is a non-empty ``ArrayValue``, subject to
disjunction limits.
- No ``NOT_IN`` filters in the same query.
ARRAY_CONTAINS_ANY (9):
The given ``field`` is an array that contains any of the
values in the given array.
Requires:
- That ``value`` is a non-empty ``ArrayValue`` with at most
10 values.
- No other ``IN`` or ``ARRAY_CONTAINS_ANY`` or ``NOT_IN``.
- That ``value`` is a non-empty ``ArrayValue``, subject to
disjunction limits.
- No other ``ARRAY_CONTAINS_ANY`` filters within the same
disjunction.
- No ``NOT_IN`` filters in the same query.
NOT_IN (10):
The value of the ``field`` is not in the given array.
Requires:
- That ``value`` is a non-empty ``ArrayValue`` with at most
10 values.
- No other ``IN``, ``ARRAY_CONTAINS_ANY``, ``NOT_IN``,
``NOT_EQUAL``, ``IS_NOT_NULL``, or ``IS_NOT_NAN``.
- No other ``OR``, ``IN``, ``ARRAY_CONTAINS_ANY``,
``NOT_IN``, ``NOT_EQUAL``, ``IS_NOT_NULL``, or
``IS_NOT_NAN``.
- That ``field`` comes first in the ``order_by``.
"""
OPERATOR_UNSPECIFIED = 0
Expand Down Expand Up @@ -558,7 +566,7 @@ class StructuredAggregationQuery(proto.Message):
"""

class Aggregation(proto.Message):
r"""Defines a aggregation that produces a single result.
r"""Defines an aggregation that produces a single result.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Expand All @@ -581,7 +589,7 @@ class Aggregation(proto.Message):
COUNT_UP_TO(1) AS count_up_to_1,
COUNT_UP_TO(2),
COUNT_UP_TO(3) AS count_up_to_3,
COUNT_UP_TO(4)
COUNT(*)
OVER (
...
);
Expand All @@ -594,7 +602,7 @@ class Aggregation(proto.Message):
COUNT_UP_TO(1) AS count_up_to_1,
COUNT_UP_TO(2) AS field_1,
COUNT_UP_TO(3) AS count_up_to_3,
COUNT_UP_TO(4) AS field_2
COUNT(*) AS field_2
OVER (
...
);
Expand All @@ -618,7 +626,7 @@ class Count(proto.Message):
documents to count.
This provides a way to set an upper bound on the number of
documents to scan, limiting latency and cost.
documents to scan, limiting latency, and cost.
Unspecified is interpreted as no bound.
Expand Down

0 comments on commit eb4fe8e

Please sign in to comment.