@google-cloud/spanner 5.16.1 → 5.17.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +16 -18
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +4 -1
  4. package/build/protos/google/spanner/admin/database/v1/common.proto +14 -1
  5. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +14 -4
  6. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +8 -5
  7. package/build/protos/google/spanner/v1/commit_response.proto +3 -3
  8. package/build/protos/google/spanner/v1/keys.proto +1 -1
  9. package/build/protos/google/spanner/v1/mutation.proto +6 -5
  10. package/build/protos/google/spanner/v1/query_plan.proto +19 -19
  11. package/build/protos/google/spanner/v1/result_set.proto +2 -1
  12. package/build/protos/google/spanner/v1/spanner.proto +21 -19
  13. package/build/protos/google/spanner/v1/transaction.proto +20 -32
  14. package/build/protos/google/spanner/v1/type.proto +34 -7
  15. package/build/protos/protos.d.ts +382 -345
  16. package/build/protos/protos.js +1022 -837
  17. package/build/protos/protos.json +168 -108
  18. package/build/src/codec.js +2 -1
  19. package/build/src/database.d.ts +1 -1
  20. package/build/src/database.js +2 -2
  21. package/build/src/index.d.ts +3 -3
  22. package/build/src/index.js +7 -7
  23. package/build/src/instance.d.ts +4 -4
  24. package/build/src/instance.js +6 -5
  25. package/build/src/partial-result-stream.d.ts +1 -1
  26. package/build/src/partial-result-stream.js +5 -1
  27. package/build/src/session-pool.d.ts +4 -4
  28. package/build/src/session-pool.js +6 -6
  29. package/build/src/transaction.js +1 -1
  30. package/build/src/v1/database_admin_client.d.ts +9 -4
  31. package/build/src/v1/database_admin_client.js +7 -7
  32. package/build/src/v1/instance_admin_client.js +2 -3
  33. package/build/src/v1/spanner_client.d.ts +1 -31
  34. package/build/src/v1/spanner_client.js +11 -9
  35. package/package.json +4 -4
@@ -16,8 +16,8 @@ syntax = "proto3";
16
16
 
17
17
  package google.spanner.v1;
18
18
 
19
- import "google/api/field_behavior.proto";
20
19
  import "google/api/annotations.proto";
20
+ import "google/api/field_behavior.proto";
21
21
 
22
22
  option csharp_namespace = "Google.Cloud.Spanner.V1";
23
23
  option go_package = "google.golang.org/genproto/googleapis/spanner/v1;spanner";
@@ -40,6 +40,14 @@ message Type {
40
40
  // If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type`
41
41
  // provides type information for the struct's fields.
42
42
  StructType struct_type = 3;
43
+
44
+ // The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will
45
+ // use to represent values of this type during query processing. This is
46
+ // necessary for some type codes because a single [TypeCode][google.spanner.v1.TypeCode] can be mapped
47
+ // to different SQL types depending on the SQL dialect. [type_annotation][google.spanner.v1.Type.type_annotation]
48
+ // typically is not needed to process the content of a value (it doesn't
49
+ // affect serialization) and clients can ignore it on the read path.
50
+ TypeAnnotationCode type_annotation = 4;
43
51
  }
44
52
 
45
53
  // `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
@@ -129,12 +137,31 @@ enum TypeCode {
129
137
  // <br>(ExponentIndicator is `"e"` or `"E"`)
130
138
  NUMERIC = 10;
131
139
 
132
- // Encoded as a JSON-formatted 'string' as described in RFC 7159. The
133
- // following rules will be applied when parsing JSON input:
134
- // - Whitespace will be stripped from the document.
135
- // - If a JSON object has duplicate keys, only the first key will be
136
- // preserved.
140
+ // Encoded as a JSON-formatted `string` as described in RFC 7159. The
141
+ // following rules are applied when parsing JSON input:
142
+ //
143
+ // - Whitespace characters are not preserved.
144
+ // - If a JSON object has duplicate keys, only the first key is preserved.
137
145
  // - Members of a JSON object are not guaranteed to have their order
138
- // preserved. JSON array elements will have their order preserved.
146
+ // preserved.
147
+ // - JSON array elements will have their order preserved.
139
148
  JSON = 11;
140
149
  }
150
+
151
+ // `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to
152
+ // disambiguate SQL types that should be used for a given Cloud Spanner value.
153
+ // Disambiguation is needed because the same Cloud Spanner type can be mapped to
154
+ // different SQL types depending on SQL dialect. TypeAnnotationCode doesn't
155
+ // affect the way value is serialized.
156
+ enum TypeAnnotationCode {
157
+ // Not specified.
158
+ TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
159
+
160
+ // PostgreSQL compatible NUMERIC type. This annotation needs to be applied to
161
+ // [Type][google.spanner.v1.Type] instances having [NUMERIC][google.spanner.v1.TypeCode.NUMERIC]
162
+ // type code to specify that values of this type should be treated as
163
+ // PostgreSQL NUMERIC values. Currently this annotation is always needed for
164
+ // [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled
165
+ // Spanner databases.
166
+ PG_NUMERIC = 2;
167
+ }