Skip to content

Commit

Permalink
docs reflect projection support for List[Column]
Browse files Browse the repository at this point in the history
  • Loading branch information
numberoverzero committed Aug 22, 2016
1 parent a22a1b1 commit ef331e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions docs/user/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,24 +178,25 @@ Indexes
.. code-block:: python
GlobalSecondaryIndex(
projection: Union[str, List[str]],
projection: Union[str, List[str], List[Column]],
hash_key: str,
range_key: Optional[str]=None,
name: Optional[str]=None,
read_units: Optional[int]=1,
write_units: Optional[int]=1)
LocalSecondaryIndex(
projection: Union[str, List[str]],
projection: Union[str, List[str], List[Column]],
range_key: str,
name: Optional[str]=None,
strict: bool=True)
.. attribute:: projection
:noindex:

The columns to project into this Index. Must be one of ``"all"``, ``"keys"``, or a list of column names.
The index and model hash and range keys are always included in the projection.
The columns to project into this Index. The index and model hash and range keys are always included
in the projection. Must be one of ``"all"``, ``"keys"``, a list of Column objects, or a list of
Column model names.

.. attribute:: hash_key
:noindex:
Expand Down Expand Up @@ -244,7 +245,7 @@ and index hash keys).
.. code-block:: python
by_email = GlobalSecondaryIndex(
projection=["verified", "profile"],
projection=[User.verified, User.profile],
hash_key="email")
.. seealso::
Expand Down
6 changes: 3 additions & 3 deletions docs/user/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ Scan and Query have very similar interfaces:
model_or_index: Union[bloop.BaseModel, bloop.Index],
key=None,
filter=None,
projection: Union[str, List[str]]="all",
projection: Union[str, List[str], List[Column]]="all",
limit: Optional[int]=None,
consistent: bool=False,
forward: bool=True, **kwargs) -> bloop.QueryIterator
Engine.scan(
model_or_index: Union[bloop.BaseModel, bloop.Index],
filter=None,
projection: Union[str, List[str]]="all",
projection: Union[str, List[str], List[Column]]="all",
limit: Optional[int]=None,
consistent: bool=False, **kwargs) -> bloop.ScanIterator
Expand Down Expand Up @@ -153,7 +153,7 @@ Scan and Query have very similar interfaces:
.. attribute:: projection
:noindex:

The columns to load. One of ``"all"``, ``"count"``, or a list of columns.
The columns to load. One of ``"all"``, ``"count"``, a list of Columns, or a list of Column model names.
When select is "count", no objects will be returned, but the ``count`` and ``scanned`` properties
will be set on the result iterator (see below). Defaults to "all".

Expand Down

0 comments on commit ef331e9

Please sign in to comment.