Skip to content

Commit dc391f9

Browse files
author
Jon Wayne Parrott
committed
Re-generate all readmes
1 parent 5346f6b commit dc391f9

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

samples/samples/README.rst

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already
@@ -81,9 +81,9 @@ To run this sample:
8181
8282
$ python snippets.py
8383
84-
usage: snippets.py [-h] [--database-name DATABASE_NAME]
85-
instance_name
86-
{insert_data,query_data,read_data,update_data,read_write_transaction,query_data_with_index,read_data_with_index,read_data_with_storing_index}
84+
usage: snippets.py [-h] [--database-id DATABASE_ID]
85+
instance_id
86+
{create_database,insert_data,query_data,read_data,add_column,update_data,query_data_with_new_column,read_write_transaction,read_only_transaction,add_index,query_data_with_index,read_data_with_index,add_storing_index,read_data_with_storing_index}
8787
...
8888
8989
This application demonstrates how to do basic operations using Cloud
@@ -92,26 +92,42 @@ To run this sample:
9292
For more information, see the README.rst under /spanner.
9393
9494
positional arguments:
95-
instance_name Your Cloud Spanner instance name.
96-
{insert_data,query_data,read_data,update_data,read_write_transaction,query_data_with_index,read_data_with_index,read_data_with_storing_index}
95+
instance_id Your Cloud Spanner instance ID.
96+
{create_database,insert_data,query_data,read_data,add_column,update_data,query_data_with_new_column,read_write_transaction,read_only_transaction,add_index,query_data_with_index,read_data_with_index,add_storing_index,read_data_with_storing_index}
97+
create_database Creates a database and tables for sample data.
9798
insert_data Inserts sample data into the given database. The
9899
database and table must already exist and can be
99100
created using `create_database`.
100101
query_data Queries sample data from the database using SQL.
101102
read_data Reads sample data from the database.
103+
add_column Adds a new column to the Albums table in the example
104+
database.
102105
update_data Updates sample data in the database. This updates the
103106
`MarketingBudget` column which must be created before
104-
running this sample. Run the following query on your
105-
database to create the column: ALTER TABLE Albums ADD
106-
COLUMN MarketingBudget INT64
107+
running this sample. You can add the column by running
108+
the `add_column` sample or by running this DDL
109+
statement against your database: ALTER TABLE Albums
110+
ADD COLUMN MarketingBudget INT64
111+
query_data_with_new_column
112+
Queries sample data from the database using SQL. This
113+
sample uses the `MarketingBudget` column. You can add
114+
the column by running the `add_column` sample or by
115+
running this DDL statement against your database:
116+
ALTER TABLE Albums ADD COLUMN MarketingBudget INT64
107117
read_write_transaction
108118
Performs a read-write transaction to update two sample
109119
records in the database. This will transfer 200,000
110-
from the `MarketingBudget` field for the first Album
111-
to the second Album. If the `MarketingBudget` is too
120+
from the `MarketingBudget` field for the second Album
121+
to the first Album. If the `MarketingBudget` is too
112122
low, it will raise an exception. Before running this
113123
sample, you will need to run the `update_data` sample
114124
to populate the fields.
125+
read_only_transaction
126+
Reads data inside of a read-only transaction. Within
127+
the read-only transaction, or "snapshot", the
128+
application sees consistent view of the database at a
129+
particular timestamp.
130+
add_index Adds a simple index to the example database.
115131
query_data_with_index
116132
Inserts sample data into the given database. The
117133
database and table must already exist and can be
@@ -120,15 +136,16 @@ To run this sample:
120136
Inserts sample data into the given database. The
121137
database and table must already exist and can be
122138
created using `create_database`.
139+
add_storing_index Adds an storing index to the example database.
123140
read_data_with_storing_index
124141
Inserts sample data into the given database. The
125142
database and table must already exist and can be
126143
created using `create_database`.
127144
128145
optional arguments:
129146
-h, --help show this help message and exit
130-
--database-name DATABASE_NAME
131-
Your Cloud Spanner database name.
147+
--database-id DATABASE_ID
148+
Your Cloud Spanner database ID.
132149
133150
134151

0 commit comments

Comments
 (0)