feat: Adds auto-generated CL for googleapis for jsonb (#1983) · googleapis/java-spanner@23e57ff (original) (raw)

File tree

3 files changed

lines changed

3 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -57,6 +57,21 @@ public enum TypeAnnotationCode implements com.google.protobuf.ProtocolMessageEnu
57 57 * PG_NUMERIC = 2;
58 58 */
59 59 PG_NUMERIC(2),
60 +/**
61 + *
62 + *
63 + *
64 + * PostgreSQL compatible JSONB type. This annotation needs to be applied to
65 + * [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON]
66 + * type code to specify that values of this type should be treated as
67 + * PostgreSQL JSONB values. Currently this annotation is always needed for
68 + * [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled
69 + * Spanner databases.
70 + *
71 + *
72 + * PG_JSONB = 3;
73 + */
74 +PG_JSONB(3),
60 75 UNRECOGNIZED(-1),
61 76 ;
62 77
@@ -85,6 +100,21 @@ public enum TypeAnnotationCode implements com.google.protobuf.ProtocolMessageEnu
85 100 * PG_NUMERIC = 2;
86 101 */
87 102 public static final int PG_NUMERIC_VALUE = 2;
103 +/**
104 + *
105 + *
106 + *
107 + * PostgreSQL compatible JSONB type. This annotation needs to be applied to
108 + * [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON]
109 + * type code to specify that values of this type should be treated as
110 + * PostgreSQL JSONB values. Currently this annotation is always needed for
111 + * [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled
112 + * Spanner databases.
113 + *
114 + *
115 + * PG_JSONB = 3;
116 + */
117 +public static final int PG_JSONB_VALUE = 3;
88 118
89 119 public final int getNumber() {
90 120 if (this == UNRECOGNIZED) {
@@ -114,6 +144,8 @@ public static TypeAnnotationCode forNumber(int value) {
114 144 return TYPE_ANNOTATION_CODE_UNSPECIFIED;
115 145 case 2:
116 146 return PG_NUMERIC;
147 +case 3:
148 +return PG_JSONB;
117 149 default:
118 150 return null;
119 151 }
Original file line number Diff line number Diff line change
@@ -63,13 +63,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
63 63 + "\004BOOL\020\001\022\t\n\005INT64\020\002\022\013\n\007FLOAT64\020\003\022\r\n\tTIMES"
64 64 + "TAMP\020\004\022\010\n\004DATE\020\005\022\n\n\006STRING\020\006\022\t\n\005BYTES\020\007\022"
65 65 + "\t\n\005ARRAY\020\010\022\n\n\006STRUCT\020\t\022\013\n\007NUMERIC\020\n\022\010\n\004J"
66 - + "SON\020\013*J\n\022TypeAnnotationCode\022$\n TYPE_ANNO"
66 + + "SON\020\013*X\n\022TypeAnnotationCode\022$\n TYPE_ANNO"
67 67 + "TATION_CODE_UNSPECIFIED\020\000\022\016\n\nPG_NUMERIC\020"
68 - + "\002B\257\001\n\025com.google.spanner.v1B\tTypeProtoP\001"
69 - + "Z8google.golang.org/genproto/googleapis/"
70 - + "spanner/v1;spanner\252\002\027Google.Cloud.Spanne"
71 - + "r.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google:"
72 - + ":Cloud::Spanner::V1b\006proto3"
68 + + "\002\022\014\n\010PG_JSONB\020\003B\257\001\n\025com.google.spanner.v"
69 + + "1B\tTypeProtoP\001Z8google.golang.org/genpro"
70 + + "to/googleapis/spanner/v1;spanner\252\002\027Googl"
71 + + "e.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Spanne"
72 + + "r\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto"
73 + + "3"
73 74 };
74 75 descriptor =
75 76 com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Original file line number Diff line number Diff line change
@@ -163,4 +163,12 @@ enum TypeAnnotationCode {
163 163 // [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled
164 164 // Spanner databases.
165 165 PG_NUMERIC = 2;
166 +
167 +// PostgreSQL compatible JSONB type. This annotation needs to be applied to
168 +// [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON]
169 +// type code to specify that values of this type should be treated as
170 +// PostgreSQL JSONB values. Currently this annotation is always needed for
171 +// [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled
172 +// Spanner databases.
173 +PG_JSONB = 3;
166 174 }