File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -220,12 +220,15 @@ constructor:
220
220
221
221
.. code-block :: python
222
222
223
- from google.cloud.spanner import Client
224
- from google.cloud.spanner import FixedSizePool
225
- client = Client()
226
- instance = client.instance(INSTANCE_NAME )
227
- pool = FixedSizePool(size = 10 , default_timeout = 5 )
228
- database = instanc.database(DATABASE_NAME , pool = pool)
223
+ from google.cloud import spanner
224
+
225
+ # Instantiate the Spanner client, and get the appropriate instance.
226
+ client = spanner.Client()
227
+ instance = client.instance(INSTANCE_NAME )
228
+
229
+ # Create a database with a pool of a fixed size.
230
+ pool = spanner.FixedSizePool(size = 10 , default_timeout = 5 )
231
+ database = instance.database(DATABASE_NAME , pool = pool)
229
232
230
233
Note that creating a database with a pool may presume that its database
231
234
already exists, as it may need to pre-create sessions (rather than creating
You can’t perform that action at this time.
0 commit comments