Enum TypeAnnotationCode

java.lang.Object
java.lang.Enum<TypeAnnotationCode>
com.google.spanner.v1.TypeAnnotationCode
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<TypeAnnotationCode>

public enum TypeAnnotationCode extends Enum<TypeAnnotationCode> implements com.google.protobuf.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 Details

    • TYPE_ANNOTATION_CODE_UNSPECIFIED

      public static final TypeAnnotationCode TYPE_ANNOTATION_CODE_UNSPECIFIED
       Not specified.
       
      TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
    • PG_NUMERIC

      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;
    • PG_JSONB

      public static final TypeAnnotationCode PG_JSONB
       PostgreSQL compatible JSONB type. This annotation needs to be applied to
       [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON]
       type code to specify that values of this type should be treated as
       PostgreSQL JSONB values. Currently this annotation is always needed for
       [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled
       Spanner databases.
       
      PG_JSONB = 3;
    • PG_OID

      public static final TypeAnnotationCode PG_OID
       PostgreSQL compatible OID type. This annotation can be used by a client
       interacting with PostgreSQL-enabled Spanner database to specify that a
       value should be treated using the semantics of the OID type.
       
      PG_OID = 4;
    • UNRECOGNIZED

      public static final TypeAnnotationCode UNRECOGNIZED
  • Field Details

    • TYPE_ANNOTATION_CODE_UNSPECIFIED_VALUE

      public static final int TYPE_ANNOTATION_CODE_UNSPECIFIED_VALUE
       Not specified.
       
      TYPE_ANNOTATION_CODE_UNSPECIFIED = 0;
      See Also:
    • PG_NUMERIC_VALUE

      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;
      See Also:
    • PG_JSONB_VALUE

      public static final int PG_JSONB_VALUE
       PostgreSQL compatible JSONB type. This annotation needs to be applied to
       [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON]
       type code to specify that values of this type should be treated as
       PostgreSQL JSONB values. Currently this annotation is always needed for
       [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled
       Spanner databases.
       
      PG_JSONB = 3;
      See Also:
    • PG_OID_VALUE

      public static final int PG_OID_VALUE
       PostgreSQL compatible OID type. This annotation can be used by a client
       interacting with PostgreSQL-enabled Spanner database to specify that a
       value should be treated using the semantics of the OID type.
       
      PG_OID = 4;
      See Also:
  • Method Details

    • values

      public static TypeAnnotationCode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TypeAnnotationCode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static TypeAnnotationCode valueOf(int value)
      Deprecated.
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static TypeAnnotationCode forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<TypeAnnotationCode> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static TypeAnnotationCode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      desc - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null