Skip to content

Commit ddc3942

Browse files
authored
feat(spanner): proto columns samples (#2069)
1 parent 3521c93 commit ddc3942

13 files changed

+809
-2
lines changed

.php-cs-fixer.dist.php

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
->setFinder(
3737
PhpCsFixer\Finder::create()
3838
->in(__DIR__)
39+
->exclude(['generated'])
3940
)
4041
;
4142

spanner/composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"require": {
3-
"google/cloud-spanner": "^1.74"
3+
"google/cloud-spanner": "^1.97"
4+
},
5+
"autoload": {
6+
"psr-4": {
7+
"GPBMetadata\\": "generated/GPBMetadata",
8+
"Testing\\": "generated/Testing"
9+
}
410
}
511
}

spanner/data/user.pb

+14
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"H
12+
Book
13+
title ( Rtitle*
14+
author ( 2.testing.data.UserRauthorbproto3

spanner/data/user.proto

+42
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+
User author = 2;
42+
}

spanner/generated/GPBMetadata/Data/User.php

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spanner/generated/Testing/Data/Book.php

+96
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spanner/generated/Testing/Data/User.php

+150
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)