def select(self, field_paths):
        """Project documents matching query to a limited set of fields.

        See :meth:`~.firestore_v1beta1.client.Client.field_path` for
        more information on **field paths**.

        If the current query already has a projection set (i.e. has already
        called :meth:`~.firestore_v1beta1.query.Query.select`), this
        will overwrite it.

        Args:
            field_paths (Iterable[str, ...]): An iterable of field paths
                (``.``-delimited list of field names) to use as a projection
                of document fields in the query results.

        Returns:
            ~.firestore_v1beta1.query.Query: A "projected" query. Acts as
            a copy of the current query, modified with the newly added
            projection.
        Raises:
            ValueError: If any ``field_path`` is invalid.
        """
        field_paths = list(field_paths)
        for field_path in field_paths:
            field_path_module.split_field_path(field_path)  # raises

        new_projection = query_pb2.StructuredQuery.Projection(
            fields=[
                query_pb2.StructuredQuery.FieldReference(field_path=field_path)
                for field_path in field_paths
            ]
        )
        return self.__class__(
            self._parent,
            projection=new_projection,
            field_filters=self._field_filters,
            orders=self._orders,
            limit=self._limit,
            offset=self._offset,
            start_at=self._start_at,
            end_at=self._end_at,
        )
def select ( self , field_paths ) : field_paths = list ( field_paths ) for field_path in field_paths : field_path_module . split_field_path ( field_path ) new_projection = query_pb2 . StructuredQuery . Projection ( fields = [ query_pb2 . StructuredQuery . FieldReference ( field_path = field_path ) for field_path in field_paths ] ) return self . __class__ ( self . _parent , projection = new_projection , field_filters = self . _field_filters , orders = self . _orders , limit = self . _limit , offset = self . _offset , start_at = self . _start_at , end_at = self . _end_at , )
Project documents matching query to a limited set of fields.

        See :meth:`~.firestore_v1beta1.client.Client.field_path` for
        more information on **field paths**.

        If the current query already has a projection set (i.e. has already
        called :meth:`~.firestore_v1beta1.query.Query.select`), this
        will overwrite it.

        Args:
            field_paths (Iterable[str, ...]): An iterable of field paths
                (``.``-delimited list of field names) to use as a projection
                of document fields in the query results.

        Returns:
            ~.firestore_v1beta1.query.Query: A "projected" query. Acts as
            a copy of the current query, modified with the newly added
            projection.
        Raises:
            ValueError: If any ``field_path`` is invalid.