Skip to content

Commit ecb6bd8

Browse files
jsimonwebbshaffer
authored andcommitted
Add Spanner struct parameters sample. (GoogleCloudPlatform#626)
1 parent aad33d6 commit ecb6bd8

10 files changed

+621
-103
lines changed

spanner/README.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,34 @@ To run the Spanner Samples:
8181

8282
Available commands:
8383
add-column Adds a new column to the Albums table in the example database.
84-
create-database Creates a database and tables for sample data.
85-
create-index Adds a simple index to the example database.
86-
create-storing-index Adds an storing index to the example database.
87-
help Displays help for a command
88-
insert-data Inserts sample data into the given database.
89-
list Lists commands
90-
query-data Queries sample data from the database using SQL.
91-
query-data-with-index Queries sample data from the database using SQL and an index.
92-
query-data-with-new-column Queries sample data from the database using SQL.
93-
read-data Reads sample data from the database.
94-
read-data-with-index Reads sample data from the database using an index.
95-
read-data-with-storing-index Reads sample data from the database using an index with a storing clause.
96-
read-only-transaction Reads data inside of a read-only transaction.
97-
read-write-transaction Performs a read-write transaction to update two sample records in the database.
98-
update-data Updates sample data in the database.
84+
add-column Adds a new column to the Albums table in the example database.
85+
add-timestamp-column Adds a commit timestamp column to a table.
86+
batch-query-data Batch queries sample data from the database using SQL.
87+
create-database Creates a database and tables for sample data.
88+
create-index Adds a simple index to the example database.
89+
create-storing-index Adds an storing index to the example database.
90+
create-table-timestamp Creates a table with a commit timestamp column.
91+
help Displays help for a command
92+
insert-data Inserts sample data into the given database.
93+
insert-data-timestamp Inserts data into a table with a commit timestamp column.
94+
insert-struct-data Inserts sample data that can be used to test STRUCT parameters in queries.
95+
list Lists commands
96+
query-data Queries sample data from the database using SQL.
97+
query-data-timestamp Queries sample data from a database with a commit timestamp column.
98+
query-data-with-array-of-struct Queries sample data from the database with an array of struct.
99+
query-data-with-index Queries sample data from the database using SQL and an index.
100+
query-data-with-nested-struct-field Queries sample data from the database with a nested struct field value.
101+
query-data-with-new-column Queries sample data from the database using SQL.
102+
query-data-with-struct Queries sample data from the database with a struct.
103+
query-data-with-struct-field Queries sample data from the database with a struct field value.
104+
read-data Reads sample data from the database.
105+
read-data-with-index Reads sample data from the database using an index.
106+
read-data-with-storing-index Reads sample data from the database using an index with a storing clause.
107+
read-only-transaction Reads data inside of a read-only transaction.
108+
read-stale-data Reads sample data from the database, with a maximum staleness of 3 seconds.
109+
read-write-transaction Performs a read-write transaction to update two sample records in the database.
110+
update-data Updates sample data in the database.
111+
update-data-timestamp Updates sample data in a table with a commit timestamp column.
99112

100113

101114
## Troubleshooting

spanner/composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"google/cloud-spanner": "^1.1",
3+
"google/cloud-spanner": "^1.6",
44
"symfony/console": "^3.2"
55
},
66
"require-dev": {
@@ -28,7 +28,12 @@
2828
"src/insert_data_with_timestamp_column.php",
2929
"src/add_timestamp_column.php",
3030
"src/update_data_with_timestamp_column.php",
31-
"src/query_data_with_timestamp_column.php"
31+
"src/query_data_with_timestamp_column.php",
32+
"src/insert_struct_data.php",
33+
"src/query_data_with_struct.php",
34+
"src/query_data_with_array_of_struct.php",
35+
"src/query_data_with_struct_field.php",
36+
"src/query_data_with_nested_struct_field.php"
3237
]
3338
}
3439
}

0 commit comments

Comments
 (0)