Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Type

import type { Type } from "https://googleapis.deno.dev/v1/spanner:v1.ts";

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

interface Type {
arrayElementType?: Type;
code?:
| "TYPE_CODE_UNSPECIFIED"
| "BOOL"
| "INT64"
| "FLOAT64"
| "FLOAT32"
| "TIMESTAMP"
| "DATE"
| "STRING"
| "BYTES"
| "ARRAY"
| "STRUCT"
| "NUMERIC"
| "JSON"
| "PROTO"
| "ENUM";
protoTypeFqn?: string;
structType?: StructType;
typeAnnotation?: "TYPE_ANNOTATION_CODE_UNSPECIFIED" | "PG_NUMERIC" | "PG_JSONB";
}

§Properties

§
arrayElementType?: Type
[src]

If code == ARRAY, then array_element_type is the type of the array elements.

§
code?: "TYPE_CODE_UNSPECIFIED" | "BOOL" | "INT64" | "FLOAT64" | "FLOAT32" | "TIMESTAMP" | "DATE" | "STRING" | "BYTES" | "ARRAY" | "STRUCT" | "NUMERIC" | "JSON" | "PROTO" | "ENUM"
[src]

Required. The TypeCode for this type.

§
protoTypeFqn?: string
[src]

If code == PROTO or code == ENUM, then proto_type_fqn is the fully qualified name of the proto type representing the proto/enum definition.

§
structType?: StructType
[src]

If code == STRUCT, then struct_type provides type information for the struct's fields.

§
typeAnnotation?: "TYPE_ANNOTATION_CODE_UNSPECIFIED" | "PG_NUMERIC" | "PG_JSONB"
[src]

The 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 can be mapped to different SQL types depending on the SQL dialect. 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.