package
20.2.19+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

CheckArrayElementType ensures that the given type can be used as the element type of an ArrayFamily-typed column.
IsAdditiveType returns true if the given type supports addition and subtraction.
IsDateTimeType returns true if the given type is a date or time-related type.
IsOIDUserDefinedType returns whether or not o corresponds to a user defined type.
IsSerialType returns whether or not the input type is a SERIAL type.
IsStringType returns true iff the given type is String or a collated string type.
IsValidArrayElementType returns true if the given type can be used as the element type of an ArrayFamily-typed column.
IsWildcardTupleType returns true if this is the wildcard AnyTuple type.
MakeArray constructs a new instance of an ArrayFamily type with the given element type (which may itself be an ArrayFamily type).
MakeBit constructs a new instance of the BIT type (oid = T_bit) having the given max # bits (0 = unspecified number).
MakeChar constructs a new instance of the CHAR type (oid = T_bpchar) having the given max # characters (0 = unspecified number).
MakeCollatedString constructs a new instance of a CollatedStringFamily type that is collated according to the given locale.
MakeDecimal constructs a new instance of a DECIMAL type (oid = T_numeric) that has at most "precision" # of decimal digits (0 = unspecified number of digits) and at most "scale" # of decimal digits after the decimal point (0 = unspecified number of digits).
MakeEnum constructs a new instance of an EnumFamily type with the given stable type ID.
MakeGeography constructs a new instance of a geography-related type.
MakeGeometry constructs a new instance of a GEOMETRY type (oid = T_geometry) that has the given shape and SRID.
MakeInterval constructs a new instance of a INTERVAL type (oid = T_interval) with a duration field.
MakeLabeledTuple constructs a new instance of a TupleFamily type with the given field types and labels.
MakeQChar constructs a new instance of the "char" type (oid = T_char) having the given max # characters (0 = unspecified number).
MakeScalar constructs a new instance of a scalar type (i.e.
MakeString constructs a new instance of the STRING type (oid = T_text) having the given max # characters (0 = unspecified number).
MakeTime constructs a new instance of a TIME type (oid = T_time) that has at most the given number of fractional second digits.
MakeTimestamp constructs a new instance of a TIMESTAMP type that has at most the given number of fractional second digits.
MakeTimestampTZ constructs a new instance of a TIMESTAMPTZ type that has at most the given number of fractional second digits.
MakeTimeTZ constructs a new instance of a TIMETZ type (oid = T_timetz) that has at most the given number of fractional second digits.
MakeTuple constructs a new instance of a TupleFamily type with the given field types (some/all of which may be other TupleFamily types).
MakeVarBit constructs a new instance of the BIT type (oid = T_varbit) having the given max # bits (0 = unspecified number).
MakeVarChar constructs a new instance of the VARCHAR type (oid = T_varchar) having the given max # characters (0 = unspecified number).
RemapUserDefinedTypeOIDs is used to remap OIDs stored within a types.T that is a user defined type.
TypeForNonKeywordTypeName returns the column type for the string name of a type, if one exists.

# Constants

AnyFamily is a special type family used during static analysis as a wildcard type that matches any other type, including scalar, array, and tuple types.
ArrayFamily is a family of non-scalar types that contain an ordered list of elements.
BitFamily is the family of types containing ordered lists of bit values (0 or 1).
BoolFamily is the family of boolean true/false types.
Box2DFamily is a family representing the box2d type.
BytesFamily is the family of types containing a list of raw byte values.
CollatedStringFamily is the family of types containing Unicode textual strings with an associated COLLATE value that specifies the locale used for various character-based operations such as sorting, pattern matching, and builtin functions like lower and upper.
DateFamily is the family of date types that store only year/month/day with no time component.
DecimalFamily is the family of base-10 floating and fixed point types.
EnumFamily is a family that represents all ENUM types.
FloatFamily is the family of base-2 floating-point types (IEEE 754).
GeographyFamily is a family that supports the Geography geospatial type, which is compatible with PostGIS's Geography implementation.
GeometryFamily is a family that supports the Geometry geospatial type, which is compatible with PostGIS's Geometry implementation.
INetFamily is the family of types containing IPv4 or IPv6 network address identifiers (e.g.
No description provided by the author
No description provided by the author
MILLISECOND is not technically part of the SQL standard for intervals, but we provide it as a field to allow code to parse intervals with a default unit of milliseconds, which is useful for some internal use cases like statement_timeout.
No description provided by the author
No description provided by the author
SECOND is the only unit where precision can be added.
UNSET defaults to SECOND during evaluation.
No description provided by the author
IntervalFamily is the family of types describing a duration of time.
IntFamily is the family of signed integer types.
JsonFamily is the family of types containing JavaScript Object Notation (JSON) values.
OidFamily is the family of types containing Postgres Object ID (Oid) values.
StringFamily is the family of types containing Unicode textual strings.
TimeFamily is the family of date types that store only hour/minute/second with no date component.
TimestampFamily is the family of date types that store a year/month/day date component, as well as an hour/minute/second time component.
TimestampTZFamily is the family of date types that store a year/month/day date component, as well as an hour/minute/second time component, along with a timezone.
TimeTZFamily is the family of date types that store only hour/minute/second and timestamp components, with no date component.
TupleFamily is a family of non-scalar structural types that describes the fields of a row or record.
UnknownFamily is a special type family that tags expressions that statically evaluate to NULL.
UuidFamily is the family of types containing universally unique identifiers.

# Variables

Any is a special type used only during static analysis as a wildcard type that matches any other type, including scalar, array, and tuple types.
AnyArray is a special type used only during static analysis as a wildcard type that matches an array having elements of any (uniform) type (including nested array types).
AnyCollatedString is a special type used only during static analysis as a wildcard type that matches a collated string with any locale.
AnyEnum is a special type only used during static analysis as a wildcard type that matches an possible enum value.
AnyTuple is a special type used only during static analysis as a wildcard type that matches a tuple with any number of fields of any type (including tuple types).
ArrayOids is a set of all oids which correspond to an array type.
Bool is the type of a boolean true/false value.
BoolArray is the type of an array value having Bool-typed elements.
Box2D is the type of a geospatial box2d object.
Bytes is the type of a list of raw byte values.
Date is the type of a value specifying year, month, day (with no time component).
TimeArray is the type of an array value having Date-typed elements.
Decimal is the type of a base-10 floating-point number, with no specified limit on precision (number of digits) or scale (digits to right of decimal point).
DecimalArray is the type of an array value having Decimal-typed elements.
DefaultIntervalTypeMetadata returns a duration field that is unset, using INTERVAL or INTERVAL ( iconst32 ) syntax instead of INTERVAL with a qualifier afterwards.
EmptyTuple is the tuple type with no fields.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Float is the type of a 64-bit base-2 floating-point number (IEEE 754).
Float4 is the type of a 32-bit base-2 floating-point number (IEEE 754).
FloatArray is the type of an array value having Float-typed elements.
Geography is the type of a geospatial Geography object.
Geometry is the type of a geospatial Geometry object.
INet is the type of an IPv4 or IPv6 network address.
INetArray is the type of an array value having INet-typed elements.
Int is the type of a 64-bit signed integer.
Int2 is the type of a 16-bit signed integer.
Int2Vector is a type-alias for an array of Int2 values with a different OID (T_int2vector instead of T__int2).
Int4 is the type of a 32-bit signed integer.
IntArray is the type of an array value having Int-typed elements.
Interval is the type of a value describing a duration of time.
IntervalArray is the type of an array value having Interval-typed elements.
No description provided by the author
No description provided by the author
Jsonb is the type of a JavaScript Object Notation (JSON) value that is stored in a decomposed binary format (hence the "b" in jsonb).
Name is a type-alias for String with a different OID (T_name).
Oid is the type of a Postgres Object ID value.
OidToType maps Postgres object IDs to CockroachDB types.
OidVector is a type-alias for an array of Oid values, but with a different OID (T_oidvector instead of T__oid).
PublicSchemaAliases contain a mapping from type name to builtin types which are on the public schema on PostgreSQL as they are available as an extension.
Regclass is the type of a Postgres regclass OID variant (T_regclass).
RegNamespace is the type of a Postgres regnamespace OID variant (T_regnamespace).
RegProc is the type of a Postgres regproc OID variant (T_regproc).
RegProcedure is the type of a Postgres regprocedure OID variant (T_regprocedure).
RegType is the type of of a Postgres regtype OID variant (T_regtype).
Scalar contains all types that meet this criteria: 1.
The SERIAL types are pseudo-types that are only used during parsing.
The SERIAL types are pseudo-types that are only used during parsing.
The SERIAL types are pseudo-types that are only used during parsing.
String is the type of a Unicode string, with no specified limit on the count of characters.
StringArray is the type of an array value having String-typed elements.
Time is the type of a value specifying hour, minute, second (with no date component).
TimeArray is the type of an array value having Time-typed elements.
Timestamp is the type of a value specifying year, month, day, hour, minute, and second, but with no associated timezone.
TimestampArray is the type of an array value having Timestamp-typed elements.
TimestampTZ is the type of a value specifying year, month, day, hour, minute, and second, as well as an associated timezone.
TimestampTZArray is the type of an array value having TimestampTZ-typed elements.
TimeTZ is the type specifying hour, minute, second and timezone with no date component.
TimeTZArray is the type of an array value having TimeTZ-typed elements.
Unknown is the type of an expression that statically evaluates to NULL.
Uuid is the type of a universally unique identifier (UUID), which is a 128-bit quantity that is very unlikely to ever be generated again, and so can be relied on to be distinct from all other UUID values.
UUIDArray is the type of an array value having UUID-typed elements.
VarBit is the type of an ordered list of bits (0 or 1 valued), with no specified limit on the count of bits.
VarBitArray is the type of an array value having VarBit-typed elements.
VarChar is equivalent to String, but has a differing OID (T_varchar), which makes it show up differently when displayed.

# Structs

EnumMetadata is metadata about an ENUM needed for evaluation.
GeoMetadata contains metadata associated with Geospatial data types.
InternalType is the protobuf encoding for SQL types.
IntervalDurationField represents precisions in intervals which are outside of the regular time precision syntax.
IntervalTypeMetadata is metadata pertinent for intervals.
PersistentUserDefinedTypeMetadata contains user defined type metadata that will be serialized to disk, unlike other user defined type metadata that is only stored in memory once a type is resolved.
T is an instance of a SQL scalar, array, or tuple type.
UserDefinedTypeMetadata contains metadata needed for runtime operations on user defined types.
UserDefinedTypeName is a struct representing a qualified user defined type name.

# Type aliases

See the comment header for the T.Family method for more details.
IntervalDurationType represents a duration that can be used when defining an Interval Duration Field.