Skip to content

Commit 5645b33

Browse files
authored
Merge branch 'master' into pubsub/dlq
2 parents a2820dc + 6a48e3e commit 5645b33

File tree

69 files changed

+376
-1055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+376
-1055
lines changed

spanner/README.md

Lines changed: 8 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -76,78 +76,15 @@ to prevent incuring any additional charges.
7676

7777
## Samples
7878

79-
To run the Spanner Samples:
80-
81-
$ php spanner.php
82-
83-
Cloud Spanner
84-
85-
Usage:
86-
command [options] [arguments]
87-
88-
Options:
89-
-h, --help Display this help message
90-
-q, --quiet Do not output any message
91-
-V, --version Display this application version
92-
--ansi Force ANSI output
93-
--no-ansi Disable ANSI output
94-
-n, --no-interaction Do not ask any interactive question
95-
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
96-
97-
Available commands:
98-
add-column Adds a new column to the Albums table in the example database.
99-
add-timestamp-column Adds a commit timestamp column to a table.
100-
batch-query-data Batch queries sample data from the database using SQL.
101-
create-database Creates a database and tables for sample data.
102-
create-instance Creates an instance.
103-
create-index Adds a simple index to the example database.
104-
create-storing-index Adds an storing index to the example database.
105-
create-table-timestamp Creates a table with a commit timestamp column.
106-
create-table-with-datatypes Creates a table with supported datatypes.
107-
delete-data Deletes sample data from the given database.
108-
delete-data-with-dml Remove sample data from the given database with a DML statement.
109-
deleted-data-with-partitioned-dml Deletes sample data in the database by partition with a DML statement.
110-
help Displays help for a command
111-
insert-data Inserts sample data into the given database.
112-
insert-data-timestamp Inserts data into a table with a commit timestamp column.
113-
insert-data-with-datatypes Inserts data with supported datatypes.
114-
insert-data-with-dml Inserts sample data into the given database with a DML statement.
115-
insert-struct-data Inserts sample data that can be used to test STRUCT parameters in queries.
116-
list Lists commands
117-
query-data Queries sample data from the database using SQL.
118-
query-data-timestamp Queries sample data from a database with a commit timestamp column.
119-
query-data-with-array-parameter Queries sample data using SQL with an ARRAY parameter.
120-
query-data-with-array-of-struct Queries sample data from the database with an array of struct.
121-
query-data-with-bool-parameter Queries sample data using SQL with a BOOL parameter.
122-
query-data-with-bytes-parameter Queries sample data using SQL with a BYTES parameter.
123-
query-data-with-date-parameter Queries sample data using SQL with a DATE parameter.
124-
query-data-with-float-parameter Queries sample data using SQL with a FLOAT64 parameter.
125-
query-data-with-index Queries sample data from the database using SQL and an index.
126-
query-data-with-int-parameter Queries sample data using SQL with a INT64 parameter.
127-
query-data-with-nested-struct-field Queries sample data from the database with a nested struct field value.
128-
query-data-with-new-column Queries sample data from the database using SQL.
129-
query-data-with-parameter Query DML inserted sample data using SQL with a parameter.
130-
query-data-with-string-parameter Queries sample data using SQL with a STRING parameter.
131-
query-data-with-struct Queries sample data from the database with a struct.
132-
query-data-with-struct-field Queries sample data from the database with a struct field value.
133-
query-data-with-timestamp-parameter Queries sample data using SQL with a TIMESTAMP parameter.
134-
read-data Reads sample data from the database.
135-
read-data-with-index Reads sample data from the database using an index.
136-
read-data-with-storing-index Reads sample data from the database using an index with a storing clause.
137-
read-only-transaction Reads data inside of a read-only transaction.
138-
read-stale-data Reads sample data from the database, with a maximum staleness of 3 seconds.
139-
read-write-transaction Performs a read-write transaction to update two sample records in the database.
140-
update-data Updates sample data in the database.
141-
update-data-timestamp Updates sample data in a table with a commit timestamp column.
142-
update-data-with-batch-dml Updates sample data in the given database using Batch DML.
143-
update-data-with-dml Updates sample data into the given database with a DML statement.
144-
update-data-with-dml-structs Updates data using DML statement with structs.
145-
update-data-with-dml-timestamp Update sample data from the given database with a DML statement and timestamp.
146-
update-data-with-partitioned-dml Updates sample data in the database by partition with a DML statement.
147-
write-data-with-dml Writes sample data into the given database with a DML statement.
148-
write-data-with-dml-transaction Performs a read-write transaction to update two sample records in the database.
149-
write-read-with-dml Writes then reads data inside a Transaction with a DML statement.
79+
To run the Spanner Samples, run any of the files in `src/` on the CLI:
15080

81+
```
82+
$ php src/create_instance.php
83+
84+
Usage: create_instance.php $instanceId
85+
86+
@param string $instanceId The Spanner instance ID.
87+
```
15188

15289
## Troubleshooting
15390

spanner/composer.json

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,5 @@
11
{
22
"require": {
3-
"google/cloud-spanner": "^1.28.0",
4-
"symfony/console": "^3.2"
5-
},
6-
"autoload": {
7-
"files": [
8-
"src/add_column.php",
9-
"src/insert_data.php",
10-
"src/read_data.php",
11-
"src/read_write_transaction.php",
12-
"src/create_database.php",
13-
"src/create_instance.php",
14-
"src/query_data.php",
15-
"src/read_data_with_index.php",
16-
"src/update_data.php",
17-
"src/create_index.php",
18-
"src/query_data_with_index.php",
19-
"src/read_data_with_storing_index.php",
20-
"src/create_storing_index.php",
21-
"src/query_data_with_new_column.php",
22-
"src/read_only_transaction.php",
23-
"src/read_stale_data.php",
24-
"src/batch_query_data.php",
25-
"src/delete_data.php",
26-
"src/create_table_with_timestamp_column.php",
27-
"src/insert_data_with_timestamp_column.php",
28-
"src/add_numeric_column.php",
29-
"src/add_timestamp_column.php",
30-
"src/update_data_with_numeric_column.php",
31-
"src/update_data_with_timestamp_column.php",
32-
"src/query_data_with_timestamp_column.php",
33-
"src/insert_struct_data.php",
34-
"src/query_data_with_struct.php",
35-
"src/query_data_with_array_of_struct.php",
36-
"src/query_data_with_struct_field.php",
37-
"src/query_data_with_nested_struct_field.php",
38-
"src/insert_data_with_dml.php",
39-
"src/update_data_with_dml.php",
40-
"src/delete_data_with_dml.php",
41-
"src/update_data_with_dml_timestamp.php",
42-
"src/write_read_with_dml.php",
43-
"src/update_data_with_dml_structs.php",
44-
"src/write_data_with_dml.php",
45-
"src/query_data_with_parameter.php",
46-
"src/write_data_with_dml_transaction.php",
47-
"src/update_data_with_partitioned_dml.php",
48-
"src/delete_data_with_partitioned_dml.php",
49-
"src/update_data_with_batch_dml.php",
50-
"src/create_table_with_datatypes.php",
51-
"src/insert_data_with_datatypes.php",
52-
"src/query_data_with_array_parameter.php",
53-
"src/query_data_with_bool_parameter.php",
54-
"src/query_data_with_bytes_parameter.php",
55-
"src/query_data_with_date_parameter.php",
56-
"src/query_data_with_float_parameter.php",
57-
"src/query_data_with_int_parameter.php",
58-
"src/query_data_with_numeric_parameter.php",
59-
"src/query_data_with_string_parameter.php",
60-
"src/query_data_with_timestamp_parameter.php",
61-
"src/create_client_with_query_options.php",
62-
"src/query_data_with_query_options.php",
63-
"src/cancel_backup.php",
64-
"src/create_backup.php",
65-
"src/delete_backup.php",
66-
"src/list_backup_operations.php",
67-
"src/list_backups.php",
68-
"src/list_database_operations.php",
69-
"src/restore_backup.php",
70-
"src/update_backup.php"
71-
]
3+
"google/cloud-spanner": "^1.28.0"
724
}
735
}

0 commit comments

Comments
 (0)