Skip to content

Commit

Permalink
feat(spanner): add proto and enum types
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599046867
  • Loading branch information
Google APIs authored and copybara-github committed Jan 17, 2024
1 parent c7985b4 commit 64a5bfe
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions google/spanner/v1/type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ message Type {
// typically is not needed to process the content of a value (it doesn't
// affect serialization) and clients can ignore it on the read path.
TypeAnnotationCode type_annotation = 4;

// If [code][google.spanner.v1.Type.code] ==
// [PROTO][google.spanner.v1.TypeCode.PROTO] or
// [code][google.spanner.v1.Type.code] ==
// [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully
// qualified name of the proto type representing the proto/enum definition.
string proto_type_fqn = 5;
}

// `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
Expand Down Expand Up @@ -145,6 +152,13 @@ enum TypeCode {
// preserved.
// - JSON array elements will have their order preserved.
JSON = 11;

// Encoded as a base64-encoded `string`, as described in RFC 4648,
// section 4.
PROTO = 13;

// Encoded as `string`, in decimal format.
ENUM = 14;
}

// `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to
Expand Down

0 comments on commit 64a5bfe

Please sign in to comment.