package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
CalcArrayOid returns the OID of the array type having elements of the given type.
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.
MakeCollatedType is like MakeCollatedString but also handles NULL and arrays of string types that need to become arrays of collated string types.
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.
MakeIntCols makes a slice of numCols IntTypes.
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.
MakePGVector constructs a new instance of a VECTOR type (pg_vector) that has the given number of dimensions.
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).
NewCompositeType constructs a new instance of a TupleFamily type with the given field types and labels, and the given user-defined type OIDs.
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.
# 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.
AnyEnumArray is the type of an array value having AnyEnum-typed elements.
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).
AnyTupleArray is a special type used only during static analysis as a wildcard type that matches an array of tuples 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.
BPChar is a CHAR type with an unspecified width.
Bytes is the type of a list of raw byte values.
BytesArray is the type of an array value having Byte-typed elements.
Date is the type of a value specifying year, month, day (with no time component).
DateArray 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.
EncodedKey is a special type used internally for passing encoded key data.
EnumValueNotYetPublicError enum value is not public yet.
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.
FormatTypeName is an injected dependency from tree to properly format a type name.
FourIntCols is a slice of four IntTypes.
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.
Json is the type of a JavaScript Object Notation (JSON) value.
JSONArrayForDecodingOnly is the type of an array value having JSON-typed elements.
Jsonb is the type of a JavaScript Object Notation (JSON) value that is stored in a decomposed binary format (hence the "b" in jsonb).
JSONBArray is the type of an array value having JSONB-typed elements.
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).
OneIntCol is a slice of one IntType.
PGLSN is the type representing a PostgreSQL LSN object.
PGLSNArray is the type of an array value having PGLSN-typed elements.
PGVector is the type representing a PGVector object.
PGVectorArray is the type of an array value having PGVector-typed elements.
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.
QChar is the special "char" type that is a single-character column type.
RefCursor is the type for a variable representing the name of a cursor in a PLpgSQL routine.
RefCursorArray is the type of an array value having REFCURSOR-typed elements.
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).
RegRole is the type of a Postgres regrole OID variant (T_regrole).
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.
ThreeIntCols is a slice of three IntTypes.
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.
Trigger is a special type used for trigger functions, which return a row of their target table.
TSQuery is the tsquery type, which represents a full text search query.
TSVector is the tsvector type which represents a document compressed in a form that a tsquery query can operate on.
TwoIntCols is a slice of two IntTypes.
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.
Void is the type representing void.
# Structs
EnumMetadata is metadata about an ENUM needed for evaluation.
IntervalTypeMetadata is metadata pertinent for intervals.
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.