Skip to content

Commit 4847326

Browse files
committed
feat(spanner): proto columns samples
1 parent 75edc7d commit 4847326

11 files changed

Lines changed: 647 additions & 3 deletions

File tree

spanner/composer.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"require": {
3-
"google/cloud-spanner": "^1.74"
4-
}
3+
"google/cloud-spanner": "1.200",
4+
"google/gax": "dev-result-function as 1.40.0"
5+
},
6+
"autoload": {
7+
"psr-4": {
8+
"GPBMetadata\\": "generated/GPBMetadata",
9+
"Testing\\": "generated/Testing"
10+
}
11+
},
12+
"repositories": [
13+
{
14+
"type": "path",
15+
"url": "../../google-cloud-php/Spanner",
16+
"options": { "versions": { "google/cloud-spanner":"1.200.0"} }
17+
}
18+
]
519
}

spanner/data/user.pb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
�
3+
data/user.proto testing.data"�
4+
User
5+
id (Rid
6+
name ( Rname
7+
active (Ractive4
8+
address ( 2.testing.data.User.AddressRaddress3
9+
Address
10+
city ( Rcity
11+
state ( Rstate"4
12+
Book
13+
title ( Rtitle
14+
author ( Rauthorbproto3

spanner/data/user.proto

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package testing.data;
18+
19+
message User {
20+
21+
int64 id = 1;
22+
23+
string name = 2;
24+
25+
bool active = 3;
26+
27+
message Address {
28+
29+
string city = 1;
30+
31+
string state = 2;
32+
}
33+
34+
Address address = 4;
35+
}
36+
37+
38+
message Book {
39+
string title = 1;
40+
41+
string author = 2;
42+
}

spanner/generated/GPBMetadata/Data/User.php

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spanner/generated/Testing/Data/Book.php

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spanner/generated/Testing/Data/User.php

Lines changed: 150 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)