Skip to content

Commit

Permalink
Correctly iterate over list_databases. (#4047)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesneeringer authored Sep 25, 2017
1 parent f7947f1 commit 3828d28
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/spanner/database-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ interact with individual databases for that instance.
List Databases
--------------

To list of all existing databases for an instance, use its
To iterate over all existing databases for an instance, use its
:meth:`~google.cloud.spanner.instance.Instance.list_databases` method:

.. code:: python
databases, token = instance.list_databases()
for database in instance.list_databases():
# `database` is a `Database` object.
This method yields :class:`~.spanner_admin_database_v1.types.Database`
objects.


Database Factory
Expand Down

0 comments on commit 3828d28

Please sign in to comment.