com.google.spanner.v1.type

Members list

Type members

Classlikes

final case class StructType(fields: Seq[Field], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[StructType]

StructType defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.

StructType defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.

Value parameters

fields

The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the SELECT clause of a query.

Attributes

Companion
object
Source
StructType.scala
Supertypes
trait Updatable[StructType]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object StructType extends GeneratedMessageCompanion[StructType]

Attributes

Companion
class
Source
StructType.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[StructType]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
StructType.type
final case class Type(code: TypeCode, arrayElementType: Option[Type], structType: Option[StructType], typeAnnotation: TypeAnnotationCode, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Type]

Type indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query.

Type indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query.

Value parameters

arrayElementType

If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then array_element_type is the type of the array elements.

code

Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.

structType

If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then struct_type provides type information for the struct's fields.

typeAnnotation

The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single [TypeCode][google.spanner.v1.TypeCode] can be mapped to different SQL types depending on the SQL dialect. [type_annotation][google.spanner.v1.Type.type_annotation] 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.

Attributes

Companion
object
Source
Type.scala
Supertypes
trait Updatable[Type]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Type extends GeneratedMessageCompanion[Type]

Attributes

Companion
class
Source
Type.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Type]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Type.type
sealed abstract class TypeAnnotationCode(val value: Int) extends GeneratedEnum

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.

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.

Attributes

Companion
object
Source
TypeAnnotationCode.scala
Supertypes
trait GeneratedEnum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object PG_JSONB.type
object PG_NUMERIC.type
trait Recognized
class Unrecognized
object TypeAnnotationCode extends GeneratedEnumCompanion[TypeAnnotationCode]

Attributes

Companion
class
Source
TypeAnnotationCode.scala
Supertypes
trait Sum
trait Mirror
trait GeneratedEnumCompanion[TypeAnnotationCode]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
sealed abstract class TypeCode(val value: Int) extends GeneratedEnum

TypeCode is used as part of [Type][google.spanner.v1.Type] to indicate the type of a Cloud Spanner value.

TypeCode is used as part of [Type][google.spanner.v1.Type] to indicate the type of a Cloud Spanner value.

Each legal value of a type can be encoded to or decoded from a JSON value, using the encodings described below. All Cloud Spanner values can be null, regardless of type; nulls are always encoded as a JSON null.

Attributes

Companion
object
Source
TypeCode.scala
Supertypes
trait GeneratedEnum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object ARRAY.type
object BOOL.type
object BYTES.type
object DATE.type
object FLOAT64.type
object INT64.type
object JSON.type
object NUMERIC.type
trait Recognized
object STRING.type
object STRUCT.type
object TIMESTAMP.type
object TYPE_CODE_UNSPECIFIED.type
class Unrecognized
Show all
object TypeCode extends GeneratedEnumCompanion[TypeCode]

Attributes

Companion
class
Source
TypeCode.scala
Supertypes
trait Sum
trait Mirror
trait GeneratedEnumCompanion[TypeCode]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
TypeCode.type
object TypeProto extends GeneratedFileObject

Attributes

Source
TypeProto.scala
Supertypes
class GeneratedFileObject
class Object
trait Matchable
class Any
Self type
TypeProto.type