@google-cloud/spanner 7.18.0 → 7.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -0
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +757 -0
  4. package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +230 -0
  5. package/build/protos/google/spanner/admin/database/v1/common.proto +132 -0
  6. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +1209 -0
  7. package/build/protos/google/spanner/admin/instance/v1/common.proto +64 -0
  8. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +2110 -0
  9. package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1520 -0
  10. package/build/protos/google/spanner/v1/commit_response.proto +59 -0
  11. package/build/protos/google/spanner/v1/keys.proto +163 -0
  12. package/build/protos/google/spanner/v1/mutation.proto +107 -0
  13. package/build/protos/google/spanner/v1/query_plan.proto +128 -0
  14. package/build/protos/google/spanner/v1/result_set.proto +237 -0
  15. package/build/protos/google/spanner/v1/spanner.proto +1389 -0
  16. package/build/protos/google/spanner/v1/transaction.proto +575 -0
  17. package/build/protos/google/spanner/v1/type.proto +214 -0
  18. package/build/protos/protos.d.ts +39317 -0
  19. package/build/protos/protos.js +100360 -0
  20. package/build/protos/protos.json +10271 -0
  21. package/build/src/backup.d.ts +349 -0
  22. package/build/src/backup.js +246 -0
  23. package/build/src/batch-transaction.d.ts +247 -0
  24. package/build/src/batch-transaction.js +384 -0
  25. package/build/src/codec.d.ts +362 -0
  26. package/build/src/codec.js +791 -0
  27. package/build/src/common-grpc/service-object.d.ts +80 -0
  28. package/build/src/common-grpc/service-object.js +101 -0
  29. package/build/src/common-grpc/service.d.ts +445 -0
  30. package/build/src/common-grpc/service.js +826 -0
  31. package/build/src/common.d.ts +66 -0
  32. package/build/src/common.js +54 -0
  33. package/build/src/database.d.ts +2103 -0
  34. package/build/src/database.js +1655 -0
  35. package/build/src/extra_proto_list.json +1 -0
  36. package/build/src/helper.d.ts +45 -0
  37. package/build/src/helper.js +71 -0
  38. package/build/src/index.d.ts +1195 -0
  39. package/build/src/index.js +1059 -0
  40. package/build/src/instance-config.d.ts +294 -0
  41. package/build/src/instance-config.js +216 -0
  42. package/build/src/instance.d.ts +832 -0
  43. package/build/src/instance.js +781 -0
  44. package/build/src/instrument.d.ts +85 -0
  45. package/build/src/instrument.js +215 -0
  46. package/build/src/multiplexed-session.d.ts +136 -0
  47. package/build/src/multiplexed-session.js +197 -0
  48. package/build/src/partial-result-stream.d.ts +253 -0
  49. package/build/src/partial-result-stream.js +400 -0
  50. package/build/src/session-factory.d.ts +100 -0
  51. package/build/src/session-factory.js +93 -0
  52. package/build/src/session-pool.d.ts +471 -0
  53. package/build/src/session-pool.js +754 -0
  54. package/build/src/session.d.ts +258 -0
  55. package/build/src/session.js +348 -0
  56. package/build/src/spanner_grpc_config.json +92 -0
  57. package/build/src/table.d.ts +831 -0
  58. package/build/src/table.js +277 -0
  59. package/build/src/transaction-runner.d.ts +185 -0
  60. package/build/src/transaction-runner.js +282 -0
  61. package/build/src/transaction.d.ts +1691 -0
  62. package/build/src/transaction.js +2004 -0
  63. package/build/src/v1/database_admin_client.d.ts +2301 -0
  64. package/build/src/v1/database_admin_client.js +2286 -0
  65. package/build/src/v1/database_admin_client_config.json +160 -0
  66. package/build/src/v1/database_admin_proto_list.json +6 -0
  67. package/build/src/v1/gapic_metadata.json +27 -0
  68. package/build/src/v1/index.d.ts +4 -0
  69. package/build/src/v1/index.js +29 -0
  70. package/build/src/v1/instance_admin_client.d.ts +1985 -0
  71. package/build/src/v1/instance_admin_client.js +1768 -0
  72. package/build/src/v1/instance_admin_client_config.json +129 -0
  73. package/build/src/v1/instance_admin_proto_list.json +4 -0
  74. package/build/src/v1/spanner_client.d.ts +1250 -0
  75. package/build/src/v1/spanner_client.js +1086 -0
  76. package/build/src/v1/spanner_client_config.json +119 -0
  77. package/build/src/v1/spanner_executor_proxy_client.d.ts +418 -0
  78. package/build/src/v1/spanner_executor_proxy_client.js +706 -0
  79. package/build/src/v1/spanner_executor_proxy_client_config.json +30 -0
  80. package/build/src/v1/spanner_executor_proxy_proto_list.json +14 -0
  81. package/build/src/v1/spanner_proto_list.json +10 -0
  82. package/package.json +1 -1
@@ -0,0 +1,214 @@
1
+ // Copyright 2024 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
+ // http://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 google.spanner.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+
21
+ option csharp_namespace = "Google.Cloud.Spanner.V1";
22
+ option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
23
+ option java_multiple_files = true;
24
+ option java_outer_classname = "TypeProto";
25
+ option java_package = "com.google.spanner.v1";
26
+ option php_namespace = "Google\\Cloud\\Spanner\\V1";
27
+ option ruby_package = "Google::Cloud::Spanner::V1";
28
+
29
+ // `Type` indicates the type of a Cloud Spanner value, as might be stored in a
30
+ // table cell or returned from an SQL query.
31
+ message Type {
32
+ // Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
33
+ TypeCode code = 1 [(google.api.field_behavior) = REQUIRED];
34
+
35
+ // If [code][google.spanner.v1.Type.code] ==
36
+ // [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the
37
+ // type of the array elements.
38
+ Type array_element_type = 2;
39
+
40
+ // If [code][google.spanner.v1.Type.code] ==
41
+ // [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides
42
+ // type information for the struct's fields.
43
+ StructType struct_type = 3;
44
+
45
+ // The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that
46
+ // disambiguates SQL type that Spanner will use to represent values of this
47
+ // type during query processing. This is necessary for some type codes because
48
+ // a single [TypeCode][google.spanner.v1.TypeCode] can be mapped to different
49
+ // SQL types depending on the SQL dialect.
50
+ // [type_annotation][google.spanner.v1.Type.type_annotation] typically is not
51
+ // needed to process the content of a value (it doesn't affect serialization)
52
+ // and clients can ignore it on the read path.
53
+ TypeAnnotationCode type_annotation = 4;
54
+
55
+ // If [code][google.spanner.v1.Type.code] ==
56
+ // [PROTO][google.spanner.v1.TypeCode.PROTO] or
57
+ // [code][google.spanner.v1.Type.code] ==
58
+ // [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully
59
+ // qualified name of the proto type representing the proto/enum definition.
60
+ string proto_type_fqn = 5;
61
+ }
62
+
63
+ // `StructType` defines the fields of a
64
+ // [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
65
+ message StructType {
66
+ // Message representing a single field of a struct.
67
+ message Field {
68
+ // The name of the field. For reads, this is the column name. For
69
+ // SQL queries, it is the column alias (e.g., `"Word"` in the
70
+ // query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
71
+ // `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
72
+ // columns might have an empty name (e.g., `"SELECT
73
+ // UPPER(ColName)"`). Note that a query result can contain
74
+ // multiple fields with the same name.
75
+ string name = 1;
76
+
77
+ // The type of the field.
78
+ Type type = 2;
79
+ }
80
+
81
+ // The list of fields that make up this struct. Order is
82
+ // significant, because values of this struct type are represented as
83
+ // lists, where the order of field values matches the order of
84
+ // fields in the [StructType][google.spanner.v1.StructType]. In turn, the
85
+ // order of fields matches the order of columns in a read request, or the
86
+ // order of fields in the `SELECT` clause of a query.
87
+ repeated Field fields = 1;
88
+ }
89
+
90
+ // `TypeCode` is used as part of [Type][google.spanner.v1.Type] to
91
+ // indicate the type of a Cloud Spanner value.
92
+ //
93
+ // Each legal value of a type can be encoded to or decoded from a JSON
94
+ // value, using the encodings described below. All Cloud Spanner values can
95
+ // be `null`, regardless of type; `null`s are always encoded as a JSON
96
+ // `null`.
97
+ enum TypeCode {
98
+ // Not specified.
99
+ TYPE_CODE_UNSPECIFIED = 0;
100
+
101
+ // Encoded as JSON `true` or `false`.
102
+ BOOL = 1;
103
+
104
+ // Encoded as `string`, in decimal format.
105
+ INT64 = 2;
106
+
107
+ // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
108
+ // `"-Infinity"`.
109
+ FLOAT64 = 3;
110
+
111
+ // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
112
+ // `"-Infinity"`.
113
+ FLOAT32 = 15;
114
+
115
+ // Encoded as `string` in RFC 3339 timestamp format. The time zone
116
+ // must be present, and must be `"Z"`.
117
+ //
118
+ // If the schema has the column option
119
+ // `allow_commit_timestamp=true`, the placeholder string
120
+ // `"spanner.commit_timestamp()"` can be used to instruct the system
121
+ // to insert the commit timestamp associated with the transaction
122
+ // commit.
123
+ TIMESTAMP = 4;
124
+
125
+ // Encoded as `string` in RFC 3339 date format.
126
+ DATE = 5;
127
+
128
+ // Encoded as `string`.
129
+ STRING = 6;
130
+
131
+ // Encoded as a base64-encoded `string`, as described in RFC 4648,
132
+ // section 4.
133
+ BYTES = 7;
134
+
135
+ // Encoded as `list`, where the list elements are represented
136
+ // according to
137
+ // [array_element_type][google.spanner.v1.Type.array_element_type].
138
+ ARRAY = 8;
139
+
140
+ // Encoded as `list`, where list element `i` is represented according
141
+ // to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
142
+ STRUCT = 9;
143
+
144
+ // Encoded as `string`, in decimal format or scientific notation format.
145
+ // Decimal format:
146
+ // `[+-]Digits[.[Digits]]` or
147
+ // `[+-][Digits].Digits`
148
+ //
149
+ // Scientific notation:
150
+ // `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or
151
+ // `[+-][Digits].Digits[ExponentIndicator[+-]Digits]`
152
+ // (ExponentIndicator is `"e"` or `"E"`)
153
+ NUMERIC = 10;
154
+
155
+ // Encoded as a JSON-formatted `string` as described in RFC 7159. The
156
+ // following rules are applied when parsing JSON input:
157
+ //
158
+ // - Whitespace characters are not preserved.
159
+ // - If a JSON object has duplicate keys, only the first key is preserved.
160
+ // - Members of a JSON object are not guaranteed to have their order
161
+ // preserved.
162
+ // - JSON array elements will have their order preserved.
163
+ JSON = 11;
164
+
165
+ // Encoded as a base64-encoded `string`, as described in RFC 4648,
166
+ // section 4.
167
+ PROTO = 13;
168
+
169
+ // Encoded as `string`, in decimal format.
170
+ ENUM = 14;
171
+
172
+ // Encoded as `string`, in `ISO8601` duration format -
173
+ // `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S`
174
+ // where `n` is an integer.
175
+ // For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2
176
+ // months, 3 days, 4 hours, 5 minutes, and 6.5 seconds.
177
+ INTERVAL = 16;
178
+
179
+ // Encoded as `string`, in lower-case hexa-decimal format, as described
180
+ // in RFC 9562, section 4.
181
+ UUID = 17;
182
+ }
183
+
184
+ // `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to
185
+ // disambiguate SQL types that should be used for a given Cloud Spanner value.
186
+ // Disambiguation is needed because the same Cloud Spanner type can be mapped to
187
+ // different SQL types depending on SQL dialect. TypeAnnotationCode doesn't
188
+ // affect the way value is serialized.
189
+ enum TypeAnnotationCode {
190
+ // Not specified.
191
+ TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
192
+
193
+ // PostgreSQL compatible NUMERIC type. This annotation needs to be applied to
194
+ // [Type][google.spanner.v1.Type] instances having
195
+ // [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] type code to specify that
196
+ // values of this type should be treated as PostgreSQL NUMERIC values.
197
+ // Currently this annotation is always needed for
198
+ // [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with
199
+ // PostgreSQL-enabled Spanner databases.
200
+ PG_NUMERIC = 2;
201
+
202
+ // PostgreSQL compatible JSONB type. This annotation needs to be applied to
203
+ // [Type][google.spanner.v1.Type] instances having
204
+ // [JSON][google.spanner.v1.TypeCode.JSON] type code to specify that values of
205
+ // this type should be treated as PostgreSQL JSONB values. Currently this
206
+ // annotation is always needed for [JSON][google.spanner.v1.TypeCode.JSON]
207
+ // when a client interacts with PostgreSQL-enabled Spanner databases.
208
+ PG_JSONB = 3;
209
+
210
+ // PostgreSQL compatible OID type. This annotation can be used by a client
211
+ // interacting with PostgreSQL-enabled Spanner database to specify that a
212
+ // value should be treated using the semantics of the OID type.
213
+ PG_OID = 4;
214
+ }