public enum TypeAnnotationCode extends Enum<TypeAnnotationCode> implements ProtocolMessageEnum
`TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to disambiguate SQL types that should be used for a given Cloud Spanner value. Disambiguation is needed because the same Cloud Spanner type can be mapped to different SQL types depending on SQL dialect. TypeAnnotationCode doesn't affect the way value is serialized.Protobuf enum
google.spanner.v1.TypeAnnotationCode
Enum Constant and Description |
---|
PG_NUMERIC
PostgreSQL compatible NUMERIC type.
|
TYPE_ANNOTATION_CODE_UNSPECIFIED
Not specified.
|
UNRECOGNIZED |
Modifier and Type | Field and Description |
---|---|
static int |
PG_NUMERIC_VALUE
PostgreSQL compatible NUMERIC type.
|
static int |
TYPE_ANNOTATION_CODE_UNSPECIFIED_VALUE
Not specified.
|
Modifier and Type | Method and Description |
---|---|
static TypeAnnotationCode |
forNumber(int value) |
static Descriptors.EnumDescriptor |
getDescriptor() |
Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static Internal.EnumLiteMap<TypeAnnotationCode> |
internalGetValueMap() |
static TypeAnnotationCode |
valueOf(Descriptors.EnumValueDescriptor desc) |
static TypeAnnotationCode |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static TypeAnnotationCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TypeAnnotationCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TypeAnnotationCode TYPE_ANNOTATION_CODE_UNSPECIFIED
Not specified.
TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
public static final TypeAnnotationCode PG_NUMERIC
PostgreSQL compatible NUMERIC type. This annotation needs to be applied to [Type][google.spanner.v1.Type] instances having [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] type code to specify that values of this type should be treated as PostgreSQL NUMERIC values. Currently this annotation is always needed for [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled Spanner databases.
PG_NUMERIC = 2;
public static final TypeAnnotationCode UNRECOGNIZED
public static final int TYPE_ANNOTATION_CODE_UNSPECIFIED_VALUE
Not specified.
TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
public static final int PG_NUMERIC_VALUE
PostgreSQL compatible NUMERIC type. This annotation needs to be applied to [Type][google.spanner.v1.Type] instances having [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] type code to specify that values of this type should be treated as PostgreSQL NUMERIC values. Currently this annotation is always needed for [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled Spanner databases.
PG_NUMERIC = 2;
public static TypeAnnotationCode[] values()
for (TypeAnnotationCode c : TypeAnnotationCode.values()) System.out.println(c);
public static TypeAnnotationCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final int getNumber()
getNumber
in interface Internal.EnumLite
getNumber
in interface ProtocolMessageEnum
@Deprecated public static TypeAnnotationCode valueOf(int value)
forNumber(int)
instead.value
- The numeric wire value of the corresponding enum entry.public static TypeAnnotationCode forNumber(int value)
value
- The numeric wire value of the corresponding enum entry.public static Internal.EnumLiteMap<TypeAnnotationCode> internalGetValueMap()
public final Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface ProtocolMessageEnum
public final Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface ProtocolMessageEnum
public static final Descriptors.EnumDescriptor getDescriptor()
public static TypeAnnotationCode valueOf(Descriptors.EnumValueDescriptor desc)
Copyright © 2022 Google LLC. All rights reserved.