@google-cloud/spanner 7.14.0 → 7.16.0
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.
- package/CHANGELOG.md +36 -0
- package/README.md +14 -2
- package/build/protos/google/spanner/admin/instance/v1/common.proto +7 -0
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +139 -16
- package/build/protos/google/spanner/v1/commit_response.proto +9 -0
- package/build/protos/google/spanner/v1/result_set.proto +21 -0
- package/build/protos/google/spanner/v1/spanner.proto +39 -2
- package/build/protos/google/spanner/v1/transaction.proto +34 -0
- package/build/protos/google/spanner/v1/type.proto +43 -30
- package/build/protos/protos.d.ts +1908 -1452
- package/build/protos/protos.js +5095 -3724
- package/build/protos/protos.json +310 -129
- package/build/src/batch-transaction.d.ts +1 -0
- package/build/src/batch-transaction.js +90 -50
- package/build/src/database.d.ts +6 -2
- package/build/src/database.js +433 -235
- package/build/src/index.d.ts +5 -0
- package/build/src/index.js +4 -0
- package/build/src/instance.d.ts +2 -0
- package/build/src/instance.js +6 -1
- package/build/src/instrument.d.ts +84 -0
- package/build/src/instrument.js +212 -0
- package/build/src/session-pool.d.ts +2 -0
- package/build/src/session-pool.js +61 -23
- package/build/src/session.js +1 -7
- package/build/src/table.d.ts +3 -0
- package/build/src/table.js +34 -14
- package/build/src/transaction.d.ts +3 -0
- package/build/src/transaction.js +411 -194
- package/build/src/v1/spanner_client.d.ts +14 -0
- package/package.json +12 -3
|
@@ -32,20 +32,24 @@ message Type {
|
|
|
32
32
|
// Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
|
|
33
33
|
TypeCode code = 1 [(google.api.field_behavior) = REQUIRED];
|
|
34
34
|
|
|
35
|
-
// If [code][google.spanner.v1.Type.code] ==
|
|
36
|
-
//
|
|
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.
|
|
37
38
|
Type array_element_type = 2;
|
|
38
39
|
|
|
39
|
-
// If [code][google.spanner.v1.Type.code] ==
|
|
40
|
-
//
|
|
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.
|
|
41
43
|
StructType struct_type = 3;
|
|
42
44
|
|
|
43
|
-
// The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that
|
|
44
|
-
// use to represent values of this
|
|
45
|
-
// necessary for some type codes because
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
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.
|
|
49
53
|
TypeAnnotationCode type_annotation = 4;
|
|
50
54
|
|
|
51
55
|
// If [code][google.spanner.v1.Type.code] ==
|
|
@@ -56,7 +60,8 @@ message Type {
|
|
|
56
60
|
string proto_type_fqn = 5;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
// `StructType` defines the fields of a
|
|
63
|
+
// `StructType` defines the fields of a
|
|
64
|
+
// [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
|
|
60
65
|
message StructType {
|
|
61
66
|
// Message representing a single field of a struct.
|
|
62
67
|
message Field {
|
|
@@ -76,9 +81,9 @@ message StructType {
|
|
|
76
81
|
// The list of fields that make up this struct. Order is
|
|
77
82
|
// significant, because values of this struct type are represented as
|
|
78
83
|
// lists, where the order of field values matches the order of
|
|
79
|
-
// fields in the [StructType][google.spanner.v1.StructType]. In turn, the
|
|
80
|
-
// matches the order of columns in a read request, or the
|
|
81
|
-
// fields in the `SELECT` clause of a query.
|
|
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.
|
|
82
87
|
repeated Field fields = 1;
|
|
83
88
|
}
|
|
84
89
|
|
|
@@ -137,14 +142,14 @@ enum TypeCode {
|
|
|
137
142
|
STRUCT = 9;
|
|
138
143
|
|
|
139
144
|
// Encoded as `string`, in decimal format or scientific notation format.
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
145
|
+
// Decimal format:
|
|
146
|
+
// `[+-]Digits[.[Digits]]` or
|
|
147
|
+
// `[+-][Digits].Digits`
|
|
143
148
|
//
|
|
144
149
|
// Scientific notation:
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
//
|
|
150
|
+
// `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or
|
|
151
|
+
// `[+-][Digits].Digits[ExponentIndicator[+-]Digits]`
|
|
152
|
+
// (ExponentIndicator is `"e"` or `"E"`)
|
|
148
153
|
NUMERIC = 10;
|
|
149
154
|
|
|
150
155
|
// Encoded as a JSON-formatted `string` as described in RFC 7159. The
|
|
@@ -163,6 +168,13 @@ enum TypeCode {
|
|
|
163
168
|
|
|
164
169
|
// Encoded as `string`, in decimal format.
|
|
165
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;
|
|
166
178
|
}
|
|
167
179
|
|
|
168
180
|
// `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to
|
|
@@ -175,19 +187,20 @@ enum TypeAnnotationCode {
|
|
|
175
187
|
TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
|
|
176
188
|
|
|
177
189
|
// PostgreSQL compatible NUMERIC type. This annotation needs to be applied to
|
|
178
|
-
// [Type][google.spanner.v1.Type] instances having
|
|
179
|
-
// type code to specify that
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
//
|
|
190
|
+
// [Type][google.spanner.v1.Type] instances having
|
|
191
|
+
// [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] type code to specify that
|
|
192
|
+
// values of this type should be treated as PostgreSQL NUMERIC values.
|
|
193
|
+
// Currently this annotation is always needed for
|
|
194
|
+
// [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with
|
|
195
|
+
// PostgreSQL-enabled Spanner databases.
|
|
183
196
|
PG_NUMERIC = 2;
|
|
184
197
|
|
|
185
198
|
// PostgreSQL compatible JSONB type. This annotation needs to be applied to
|
|
186
|
-
// [Type][google.spanner.v1.Type] instances having
|
|
187
|
-
// type code to specify that values of
|
|
188
|
-
// PostgreSQL JSONB values. Currently this
|
|
189
|
-
// [JSON][google.spanner.v1.TypeCode.JSON]
|
|
190
|
-
// Spanner databases.
|
|
199
|
+
// [Type][google.spanner.v1.Type] instances having
|
|
200
|
+
// [JSON][google.spanner.v1.TypeCode.JSON] type code to specify that values of
|
|
201
|
+
// this type should be treated as PostgreSQL JSONB values. Currently this
|
|
202
|
+
// annotation is always needed for [JSON][google.spanner.v1.TypeCode.JSON]
|
|
203
|
+
// when a client interacts with PostgreSQL-enabled Spanner databases.
|
|
191
204
|
PG_JSONB = 3;
|
|
192
205
|
|
|
193
206
|
// PostgreSQL compatible OID type. This annotation can be used by a client
|