types

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DoltgresTypeBaseID_Bool         = DoltgresTypeBaseID(SerializationID_Bool)
	DoltgresTypeBaseID_Bytea        = DoltgresTypeBaseID(SerializationID_Bytea)
	DoltgresTypeBaseID_Char         = DoltgresTypeBaseID(SerializationID_Char)
	DoltgresTypeBaseID_Date         = DoltgresTypeBaseID(SerializationID_Date)
	DoltgresTypeBaseID_Float32      = DoltgresTypeBaseID(SerializationID_Float32)
	DoltgresTypeBaseID_Float64      = DoltgresTypeBaseID(SerializationID_Float64)
	DoltgresTypeBaseID_Int16        = DoltgresTypeBaseID(SerializationID_Int16)
	DoltgresTypeBaseID_Int32        = DoltgresTypeBaseID(SerializationID_Int32)
	DoltgresTypeBaseID_Int64        = DoltgresTypeBaseID(SerializationID_Int64)
	DoltgresTypeBaseID_InternalChar = DoltgresTypeBaseID(SerializationID_InternalChar)
	DoltgresTypeBaseID_Interval     = DoltgresTypeBaseID(SerializationID_Interval)
	DoltgresTypeBaseID_Json         = DoltgresTypeBaseID(SerializationID_Json)
	DoltgresTypeBaseID_JsonB        = DoltgresTypeBaseID(SerializationID_JsonB)
	DoltgresTypeBaseID_Name         = DoltgresTypeBaseID(SerializationID_Name)
	DoltgresTypeBaseID_Null         = DoltgresTypeBaseID(SerializationID_Null)
	DoltgresTypeBaseID_Numeric      = DoltgresTypeBaseID(SerializationID_Numeric)
	DoltgresTypeBaseID_Oid          = DoltgresTypeBaseID(SerializationID_Oid)
	DoltgresTypeBaseID_Text         = DoltgresTypeBaseID(SerializationID_Text)
	DoltgresTypeBaseID_Time         = DoltgresTypeBaseID(SerializationID_Time)
	DoltgresTypeBaseID_Timestamp    = DoltgresTypeBaseID(SerializationID_Timestamp)
	DoltgresTypeBaseID_TimestampTZ  = DoltgresTypeBaseID(SerializationID_TimestampTZ)
	DoltgresTypeBaseID_TimeTZ       = DoltgresTypeBaseID(SerializationID_TimeTZ)
	DoltgresTypeBaseID_Uuid         = DoltgresTypeBaseID(SerializationID_Uuid)
	DoltgresTypeBaseID_VarChar      = DoltgresTypeBaseID(SerializationID_VarChar)
	DoltgresTypeBaseID_Xid          = DoltgresTypeBaseID(SerializationID_Xid)
	DoltgresTypeBaseId_Domain       = DoltgresTypeBaseID(SerializationId_Domain)
)
View Source
const (
	MaxUint32 = 4294967295  // MaxUint32 is the largest possible value of Uint32
	MinInt32  = -2147483648 // MinInt32 is the smallest possible value of Int32
)
View Source
const InternalCharLength = 1

InternalCharLength will always be 1.

View Source
const NameLength = 63

NameLength is the constant length of Name in Postgres 15.

View Source
const (
	// StringMaxLength is the maximum number of characters (not bytes) that a Char, VarChar, or BpChar may contain.
	StringMaxLength = 10485760
)

Variables

View Source
var (
	NumericValueMaxInt16  = decimal.NewFromInt(32767)                // NumericValueMaxInt16 is the max Int16 value for NUMERIC types
	NumericValueMaxInt32  = decimal.NewFromInt(2147483647)           // NumericValueMaxInt32 is the max Int32 value for NUMERIC types
	NumericValueMaxInt64  = decimal.NewFromInt(9223372036854775807)  // NumericValueMaxInt64 is the max Int64 value for NUMERIC types
	NumericValueMinInt16  = decimal.NewFromInt(-32768)               // NumericValueMinInt16 is the min Int16 value for NUMERIC types
	NumericValueMinInt32  = decimal.NewFromInt(MinInt32)             // NumericValueMinInt32 is the min Int32 value for NUMERIC types
	NumericValueMinInt64  = decimal.NewFromInt(-9223372036854775808) // NumericValueMinInt64 is the min Int64 value for NUMERIC types
	NumericValueMaxUint32 = decimal.NewFromInt(MaxUint32)            // NumericValueMaxUint32 is the max Uint32 value for NUMERIC types
)
View Source
var AnyArray = AnyArrayType{}

AnyArray is an array that may contain elements of any type.

View Source
var AnyElement = AnyElementType{}

AnyElement is a pseudo-type that can represent any type.

View Source
var AnyNonArray = AnyNonArrayType{}

AnyNonArray is a pseudo-type that can represent any type that isn't an array type.

View Source
var Bool = BoolType{}

Bool is the standard boolean.

View Source
var BoolArray = createArrayTypeWithFuncs(Bool, SerializationID_BoolArray, oid.T__bool, arrayContainerFunctions{
	SQL: func(ctx *sql.Context, ac arrayContainer, dest []byte, valInterface any) (sqltypes.Value, error) {
		if valInterface == nil {
			return sqltypes.NULL, nil
		}
		converted, _, err := ac.Convert(valInterface)
		if err != nil {
			return sqltypes.Value{}, err
		}
		vals := converted.([]any)
		bb := bytes.Buffer{}
		bb.WriteRune('{')
		for i := range vals {
			if i > 0 {
				bb.WriteRune(',')
			}
			if vals[i] == nil {
				bb.WriteString("NULL")
			} else if vals[i].(bool) {
				bb.WriteRune('t')
			} else {
				bb.WriteRune('f')
			}
		}
		bb.WriteRune('}')
		return sqltypes.MakeTrusted(sqltypes.Text, types.AppendAndSliceBytes(dest, bb.Bytes())), nil
	},
})

BoolArray is the array variant of Bool.

View Source
var BpChar = CharType{Length: stringUnbounded}

BpChar is a char that has an unbounded length.

View Source
var BpCharArray = createArrayType(BpChar, SerializationID_CharArray, oid.T__bpchar)

BpCharArray is the array variant of BpChar.

View Source
var Bytea = ByteaType{}

Bytea is the byte string type.

View Source
var ByteaArray = createArrayType(Bytea, SerializationID_ByteaArray, oid.T__bytea)

ByteaArray is the array variant of Bytea.

View Source
var Date = DateType{}

Date is the day, month, and year.

View Source
var DateArray = createArrayType(Date, SerializationID_DateArray, oid.T__date)

DateArray is the array variant of Date.

View Source
var ErrTypeAlreadyExists = errors.NewKind(`type "%s" already exists`)
View Source
var ErrTypeDoesNotExist = errors.NewKind(`type "%s" does not exist`)
View Source
var Float32 = Float32Type{}

Float32 is an float32.

View Source
var Float32Array = createArrayType(Float32, SerializationID_Float32Array, oid.T__float4)

Float32Array is the array variant of Float32.

View Source
var Float64 = Float64Type{}

Float64 is an float64.

View Source
var Float64Array = createArrayType(Float64, SerializationID_Float64Array, oid.T__float8)

Float64Array is the array variant of Float64.

View Source
var Int16 = Int16Type{}

Int16 is an int16.

View Source
var Int16Array = createArrayType(Int16, SerializationID_Int16Array, oid.T__int2)

Int16Array is the array variant of Int16.

View Source
var Int16Serial = Int16TypeSerial{}

Int16Serial is an int16 serial type.

View Source
var Int32 = Int32Type{}

Int32 is an int32.

View Source
var Int32Array = createArrayType(Int32, SerializationID_Int32Array, oid.T__int4)

Int32Array is the array variant of Int32.

View Source
var Int32Serial = Int32TypeSerial{}

Int32Serial is an int16 serial type.

View Source
var Int64 = Int64Type{}

Int64 is an int64.

View Source
var Int64Array = createArrayType(Int64, SerializationID_Int64Array, oid.T__int8)

Int64Array is the array variant of Int64.

View Source
var Int64Serial = Int64TypeSerial{}

Int64Serial is an int16 serial type.

View Source
var InternalChar = InternalCharType{}

InternalChar is a single-byte internal type. In Postgres, it's displayed as "char".

View Source
var InternalCharArray = createArrayType(InternalChar, SerializationID_InternalCharArray, oid.T__char)

InternalCharArray is the array variant of InternalChar.

View Source
var Interval = IntervalType{}

Interval is the interval type.

View Source
var IntervalArray = createArrayType(Interval, SerializationID_IntervalArray, oid.T__interval)

IntervalArray is the array variant of Interval.

View Source
var Json = JsonType{}

Json is the standard JSON type.

View Source
var JsonArray = createArrayType(Json, SerializationID_JsonArray, oid.T__json)

JsonArray is the array variant of Json.

View Source
var JsonB = JsonBType{}

JsonB is the deserialized and structured version of JSON that deals with JsonDocument.

View Source
var JsonBArray = createArrayType(JsonB, SerializationID_JsonBArray, oid.T__jsonb)

JsonBArray is the array variant of JsonB.

View Source
var Name = NameType{Length: NameLength}

Name is a 63-byte internal type for object names.

View Source
var NameArray = createArrayType(Name, SerializationID_NameArray, oid.T__name)

NameArray is the array variant of Name.

View Source
var Numeric = NumericType{-1, -1}

Numeric is a precise and unbounded decimal value.

View Source
var NumericArray = createArrayType(Numeric, SerializationID_NumericArray, oid.T__numeric)

NumericArray is the array variant of Numeric.

View Source
var Oid = OidType{}

Oid is a data type used for identifying internal objects. It is implemented as an unsigned 32 bit integer.

View Source
var OidArray = createArrayType(Oid, SerializationID_OidArray, oid.T__oid)

OidArray is the array variant of Oid.

View Source
var OidToBuildInDoltgresType = map[uint32]DoltgresType{}/* 167 elements not displayed */

OidToBuildInDoltgresType is map of oid to built-in Doltgres type.

View Source
var Regclass = RegclassType{}

Regclass is the OID type for finding items in pg_class.

View Source
var RegclassArray = createArrayType(Regclass, SerializationID_Invalid, oid.T__regclass)

RegclassArray is the array variant of Regclass.

View Source
var Regclass_IoInput func(ctx *sql.Context, input string) (uint32, error)

Regclass_IoInput is the implementation for IoInput that is being set from another package to avoid circular dependencies.

View Source
var Regclass_IoOutput func(ctx *sql.Context, oid uint32) (string, error)

Regclass_IoOutput is the implementation for IoOutput that is being set from another package to avoid circular dependencies.

View Source
var Regproc = RegprocType{}

Regproc is the OID type for finding function names.

View Source
var RegprocArray = createArrayType(Regproc, SerializationID_Invalid, oid.T__regproc)

RegprocArray is the array variant of Regproc.

View Source
var Regproc_IoInput func(ctx *sql.Context, input string) (uint32, error)

Regproc_IoInput is the implementation for IoInput that is being set from another package to avoid circular dependencies.

View Source
var Regproc_IoOutput func(ctx *sql.Context, oid uint32) (string, error)

Regproc_IoOutput is the implementation for IoOutput that is being set from another package to avoid circular dependencies.

View Source
var Regtype = RegtypeType{}

Regtype is the OID type for finding items in pg_type.

View Source
var RegtypeArray = createArrayType(Regtype, SerializationID_Invalid, oid.T__regtype)

RegtypeArray is the array variant of Regtype.

View Source
var Regtype_IoInput func(ctx *sql.Context, input string) (uint32, error)

Regtype_IoInput is the implementation for IoInput that is being set from another package to avoid circular dependencies.

View Source
var Regtype_IoOutput func(ctx *sql.Context, oid uint32) (string, error)

Regtype_IoOutput is the implementation for IoOutput that is being set from another package to avoid circular dependencies.

View Source
var Text = TextType{}

Text is the text type.

View Source
var TextArray = createArrayType(Text, SerializationID_TextArray, oid.T__text)

TextArray is the array variant of Text.

View Source
var Time = TimeType{-1}

Time is the time without a time zone. Precision is unbounded.

View Source
var TimeArray = createArrayType(Time, SerializationID_TimeArray, oid.T__time)

TimeArray is the array variant of Time.

View Source
var TimeTZ = TimeTZType{-1}

TimeTZ is the time with a time zone. Precision is unbounded.

View Source
var TimeTZArray = createArrayType(TimeTZ, SerializationID_TimeTZArray, oid.T__timetz)

TimeTZArray is the array variant of TimeTZ.

View Source
var Timestamp = TimestampType{-1}

Timestamp is the timestamp without a time zone. Precision is unbounded.

View Source
var TimestampArray = createArrayType(Timestamp, SerializationID_TimestampArray, oid.T__timestamp)

TimestampArray is the array variant of Timestamp.

View Source
var TimestampTZ = TimestampTZType{-1}

TimestampTZ is the timestamp with a time zone. Precision is unbounded.

View Source
var TimestampTZArray = createArrayType(TimestampTZ, SerializationID_TimestampTZArray, oid.T__timestamptz)

TimestampTZArray is the array variant of TimestampTZ.

View Source
var Unknown = UnknownType{}

Unknown represents an invalid or indeterminate type. This is primarily used internally.

View Source
var Uuid = UuidType{}

Uuid is the UUID type.

View Source
var UuidArray = createArrayType(Uuid, SerializationID_UuidArray, oid.T__uuid)

UuidArray is the array variant of Uuid.

View Source
var VarChar = VarCharType{MaxChars: stringUnbounded}

VarChar is a varchar that has an unbounded length.

View Source
var VarCharArray = createArrayType(VarChar, SerializationID_VarCharArray, oid.T__varchar)

VarCharArray is the array variant of VarChar.

View Source
var Xid = XidType{}

Xid is a data type used for internal transaction IDs. It is implemented as an unsigned 32 bit integer.

View Source
var XidArray = createArrayType(Xid, SerializationID_XidArray, oid.T__xid)

XidArray is the array variant of Xid.

Functions

func DeserializeType

func DeserializeType(serializedType []byte) (types.ExtendedType, error)

DeserializeType is able to deserialize the given serialized type into an appropriate extended type. All extended types will be defined by DoltgreSQL.

func GetServerLocation added in v0.13.0

func GetServerLocation(ctx *sql.Context) (*time.Location, error)

GetServerLocation returns timezone value set for the server.

func Init added in v0.11.0

func Init()

Init reads the list of all types and creates mappings that will be used by various functions.

func MustSerializeType

func MustSerializeType(extendedType types.ExtendedType) []byte

MustSerializeType internally calls SerializeType and panics on error. In general, panics should only occur when a type has not yet had its Serialization implemented yet.

func QuoteString added in v0.8.0

func QuoteString(baseID DoltgresTypeBaseID, str string) string

QuoteString will quote the string according to the type given. This means that some types will quote, and others will not, or they may quote in a special way that is unique to that type.

func SerializeType

func SerializeType(extendedType types.ExtendedType) ([]byte, error)

SerializeType is able to serialize the given extended type into a byte slice. All extended types will be defined by DoltgreSQL.

Types

type AnyArrayType added in v0.6.0

type AnyArrayType struct{}

AnyArrayType is the extended type implementation of the PostgreSQL anyarray.

func (AnyArrayType) Alignment added in v0.10.0

func (aa AnyArrayType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (AnyArrayType) BaseID added in v0.6.0

func (aa AnyArrayType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (AnyArrayType) BaseName added in v0.10.0

func (aa AnyArrayType) BaseName() string

BaseName implements the DoltgresType interface.

func (AnyArrayType) BaseType added in v0.6.0

func (aa AnyArrayType) BaseType() DoltgresType

BaseType implements the DoltgresArrayType interface.

func (AnyArrayType) Category added in v0.10.0

func (aa AnyArrayType) Category() TypeCategory

Category implements the DoltgresType interface.

func (AnyArrayType) CollationCoercibility added in v0.6.0

func (aa AnyArrayType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (AnyArrayType) Compare added in v0.6.0

func (aa AnyArrayType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (AnyArrayType) Convert added in v0.6.0

func (aa AnyArrayType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (AnyArrayType) DeserializeValue added in v0.6.0

func (aa AnyArrayType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (AnyArrayType) Equals added in v0.6.0

func (aa AnyArrayType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (AnyArrayType) FormatValue added in v0.6.0

func (aa AnyArrayType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (AnyArrayType) GetSerializationID added in v0.6.0

func (aa AnyArrayType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (AnyArrayType) IoInput added in v0.8.0

func (aa AnyArrayType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (AnyArrayType) IoOutput added in v0.8.0

func (aa AnyArrayType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (AnyArrayType) IsPreferredType added in v0.10.0

func (aa AnyArrayType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (AnyArrayType) IsUnbounded added in v0.6.0

func (aa AnyArrayType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (AnyArrayType) IsValid added in v0.11.0

func (aa AnyArrayType) IsValid(target DoltgresType) bool

IsValid implements the DoltgresPolymorphicType interface.

func (AnyArrayType) MaxSerializedWidth added in v0.6.0

func (aa AnyArrayType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (AnyArrayType) MaxTextResponseByteLength added in v0.6.0

func (aa AnyArrayType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (AnyArrayType) OID added in v0.6.0

func (aa AnyArrayType) OID() uint32

OID implements the DoltgresType interface.

func (AnyArrayType) Promote added in v0.6.0

func (aa AnyArrayType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (AnyArrayType) SQL added in v0.6.0

func (aa AnyArrayType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (AnyArrayType) SerializeType added in v0.6.0

func (aa AnyArrayType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (AnyArrayType) SerializeValue added in v0.6.0

func (aa AnyArrayType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (AnyArrayType) SerializedCompare added in v0.6.0

func (aa AnyArrayType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (AnyArrayType) String added in v0.6.0

func (aa AnyArrayType) String() string

String implements the DoltgresType interface.

func (AnyArrayType) ToArrayType added in v0.6.0

func (aa AnyArrayType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (AnyArrayType) Type added in v0.6.0

func (aa AnyArrayType) Type() query.Type

Type implements the DoltgresType interface.

func (AnyArrayType) ValueType added in v0.6.0

func (aa AnyArrayType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (AnyArrayType) Zero added in v0.6.0

func (aa AnyArrayType) Zero() any

Zero implements the DoltgresType interface.

type AnyElementType added in v0.11.0

type AnyElementType struct{}

AnyElementType is the extended type implementation of the PostgreSQL anyelement.

func (AnyElementType) Alignment added in v0.11.0

func (ae AnyElementType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (AnyElementType) BaseID added in v0.11.0

func (ae AnyElementType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (AnyElementType) BaseName added in v0.11.0

func (ae AnyElementType) BaseName() string

BaseName implements the DoltgresType interface.

func (AnyElementType) Category added in v0.11.0

func (ae AnyElementType) Category() TypeCategory

Category implements the DoltgresType interface.

func (AnyElementType) CollationCoercibility added in v0.11.0

func (ae AnyElementType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (AnyElementType) Compare added in v0.11.0

func (ae AnyElementType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (AnyElementType) Convert added in v0.11.0

func (ae AnyElementType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (AnyElementType) DeserializeValue added in v0.11.0

func (ae AnyElementType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (AnyElementType) Equals added in v0.11.0

func (ae AnyElementType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (AnyElementType) FormatValue added in v0.11.0

func (ae AnyElementType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (AnyElementType) GetSerializationID added in v0.11.0

func (ae AnyElementType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (AnyElementType) IoInput added in v0.11.0

func (ae AnyElementType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (AnyElementType) IoOutput added in v0.11.0

func (ae AnyElementType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (AnyElementType) IsPreferredType added in v0.11.0

func (ae AnyElementType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (AnyElementType) IsUnbounded added in v0.11.0

func (ae AnyElementType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (AnyElementType) IsValid added in v0.11.0

func (ae AnyElementType) IsValid(target DoltgresType) bool

IsValid implements the DoltgresPolymorphicType interface.

func (AnyElementType) MaxSerializedWidth added in v0.11.0

func (ae AnyElementType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (AnyElementType) MaxTextResponseByteLength added in v0.11.0

func (ae AnyElementType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (AnyElementType) OID added in v0.11.0

func (ae AnyElementType) OID() uint32

OID implements the DoltgresType interface.

func (AnyElementType) Promote added in v0.11.0

func (ae AnyElementType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (AnyElementType) SQL added in v0.11.0

func (ae AnyElementType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (AnyElementType) SerializeType added in v0.11.0

func (ae AnyElementType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (AnyElementType) SerializeValue added in v0.11.0

func (ae AnyElementType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (AnyElementType) SerializedCompare added in v0.11.0

func (ae AnyElementType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (AnyElementType) String added in v0.11.0

func (ae AnyElementType) String() string

String implements the DoltgresType interface.

func (AnyElementType) ToArrayType added in v0.11.0

func (ae AnyElementType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (AnyElementType) Type added in v0.11.0

func (ae AnyElementType) Type() query.Type

Type implements the DoltgresType interface.

func (AnyElementType) ValueType added in v0.11.0

func (ae AnyElementType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (AnyElementType) Zero added in v0.11.0

func (ae AnyElementType) Zero() any

Zero implements the DoltgresType interface.

type AnyNonArrayType added in v0.11.0

type AnyNonArrayType struct{}

AnyNonArrayType is the extended type implementation of the PostgreSQL anynonarray.

func (AnyNonArrayType) Alignment added in v0.11.0

func (ana AnyNonArrayType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (AnyNonArrayType) BaseID added in v0.11.0

func (ana AnyNonArrayType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (AnyNonArrayType) BaseName added in v0.11.0

func (ana AnyNonArrayType) BaseName() string

BaseName implements the DoltgresType interface.

func (AnyNonArrayType) Category added in v0.11.0

func (ana AnyNonArrayType) Category() TypeCategory

Category implements the DoltgresType interface.

func (AnyNonArrayType) CollationCoercibility added in v0.11.0

func (ana AnyNonArrayType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (AnyNonArrayType) Compare added in v0.11.0

func (ana AnyNonArrayType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (AnyNonArrayType) Convert added in v0.11.0

func (ana AnyNonArrayType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (AnyNonArrayType) DeserializeValue added in v0.11.0

func (ana AnyNonArrayType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (AnyNonArrayType) Equals added in v0.11.0

func (ana AnyNonArrayType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (AnyNonArrayType) FormatValue added in v0.11.0

func (ana AnyNonArrayType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (AnyNonArrayType) GetSerializationID added in v0.11.0

func (ana AnyNonArrayType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (AnyNonArrayType) IoInput added in v0.11.0

func (ana AnyNonArrayType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (AnyNonArrayType) IoOutput added in v0.11.0

func (ana AnyNonArrayType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (AnyNonArrayType) IsPreferredType added in v0.11.0

func (ana AnyNonArrayType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (AnyNonArrayType) IsUnbounded added in v0.11.0

func (ana AnyNonArrayType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (AnyNonArrayType) IsValid added in v0.11.0

func (ana AnyNonArrayType) IsValid(target DoltgresType) bool

IsValid implements the DoltgresPolymorphicType interface.

func (AnyNonArrayType) MaxSerializedWidth added in v0.11.0

func (ana AnyNonArrayType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (AnyNonArrayType) MaxTextResponseByteLength added in v0.11.0

func (ana AnyNonArrayType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (AnyNonArrayType) OID added in v0.11.0

func (ana AnyNonArrayType) OID() uint32

OID implements the DoltgresType interface.

func (AnyNonArrayType) Promote added in v0.11.0

func (ana AnyNonArrayType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (AnyNonArrayType) SQL added in v0.11.0

func (ana AnyNonArrayType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (AnyNonArrayType) SerializeType added in v0.11.0

func (ana AnyNonArrayType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (AnyNonArrayType) SerializeValue added in v0.11.0

func (ana AnyNonArrayType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (AnyNonArrayType) SerializedCompare added in v0.11.0

func (ana AnyNonArrayType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (AnyNonArrayType) String added in v0.11.0

func (ana AnyNonArrayType) String() string

String implements the DoltgresType interface.

func (AnyNonArrayType) ToArrayType added in v0.11.0

func (ana AnyNonArrayType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (AnyNonArrayType) Type added in v0.11.0

func (ana AnyNonArrayType) Type() query.Type

Type implements the DoltgresType interface.

func (AnyNonArrayType) ValueType added in v0.11.0

func (ana AnyNonArrayType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (AnyNonArrayType) Zero added in v0.11.0

func (ana AnyNonArrayType) Zero() any

Zero implements the DoltgresType interface.

type BoolType

type BoolType struct{}

BoolType is the extended type implementation of the PostgreSQL boolean.

func (BoolType) Alignment added in v0.10.0

func (b BoolType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (BoolType) BaseID added in v0.5.0

func (b BoolType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (BoolType) BaseName added in v0.10.0

func (b BoolType) BaseName() string

BaseName implements the DoltgresType interface.

func (BoolType) Category added in v0.10.0

func (b BoolType) Category() TypeCategory

Category implements the DoltgresType interface.

func (BoolType) CollationCoercibility

func (b BoolType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (BoolType) Compare

func (b BoolType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (BoolType) Convert

func (b BoolType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (BoolType) DeserializeValue

func (b BoolType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (BoolType) Equals

func (b BoolType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (BoolType) FormatValue

func (b BoolType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (BoolType) GetSerializationID added in v0.6.0

func (b BoolType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (BoolType) IoInput added in v0.8.0

func (b BoolType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (BoolType) IoOutput added in v0.8.0

func (b BoolType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (BoolType) IsPreferredType added in v0.10.0

func (b BoolType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (BoolType) IsUnbounded added in v0.6.0

func (b BoolType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (BoolType) MaxSerializedWidth

func (b BoolType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (BoolType) MaxTextResponseByteLength

func (b BoolType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (BoolType) OID added in v0.5.0

func (b BoolType) OID() uint32

OID implements the DoltgresType interface.

func (BoolType) Promote

func (b BoolType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (BoolType) SQL

func (b BoolType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (BoolType) SerializeType added in v0.6.0

func (b BoolType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (BoolType) SerializeValue

func (b BoolType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (BoolType) SerializedCompare

func (b BoolType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (BoolType) String

func (b BoolType) String() string

String implements the DoltgresType interface.

func (BoolType) ToArrayType added in v0.6.0

func (b BoolType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (BoolType) Type

func (b BoolType) Type() query.Type

Type implements the DoltgresType interface.

func (BoolType) ValueType

func (b BoolType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (BoolType) Zero

func (b BoolType) Zero() any

Zero implements the DoltgresType interface.

type ByteaType added in v0.6.0

type ByteaType struct{}

ByteaType is the extended type implementation of the PostgreSQL bytea.

func (ByteaType) Alignment added in v0.10.0

func (b ByteaType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (ByteaType) BaseID added in v0.6.0

func (b ByteaType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (ByteaType) BaseName added in v0.10.0

func (b ByteaType) BaseName() string

BaseName implements the DoltgresType interface.

func (ByteaType) Category added in v0.10.0

func (b ByteaType) Category() TypeCategory

Category implements the DoltgresType interface.

func (ByteaType) CollationCoercibility added in v0.6.0

func (b ByteaType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (ByteaType) Compare added in v0.6.0

func (b ByteaType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (ByteaType) Convert added in v0.6.0

func (b ByteaType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (ByteaType) DeserializeValue added in v0.6.0

func (b ByteaType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (ByteaType) Equals added in v0.6.0

func (b ByteaType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (ByteaType) FormatValue added in v0.6.0

func (b ByteaType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (ByteaType) GetSerializationID added in v0.6.0

func (b ByteaType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (ByteaType) IoInput added in v0.8.0

func (b ByteaType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (ByteaType) IoOutput added in v0.8.0

func (b ByteaType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (ByteaType) IsPreferredType added in v0.10.0

func (b ByteaType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (ByteaType) IsUnbounded added in v0.6.0

func (b ByteaType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (ByteaType) MaxSerializedWidth added in v0.6.0

func (b ByteaType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (ByteaType) MaxTextResponseByteLength added in v0.6.0

func (b ByteaType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (ByteaType) OID added in v0.6.0

func (b ByteaType) OID() uint32

OID implements the DoltgresType interface.

func (ByteaType) Promote added in v0.6.0

func (b ByteaType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (ByteaType) SQL added in v0.6.0

func (b ByteaType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (ByteaType) SerializeType added in v0.6.0

func (b ByteaType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (ByteaType) SerializeValue added in v0.6.0

func (b ByteaType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (ByteaType) SerializedCompare added in v0.6.0

func (b ByteaType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (ByteaType) String added in v0.6.0

func (b ByteaType) String() string

String implements the DoltgresType interface.

func (ByteaType) ToArrayType added in v0.6.0

func (b ByteaType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (ByteaType) Type added in v0.6.0

func (b ByteaType) Type() query.Type

Type implements the DoltgresType interface.

func (ByteaType) ValueType added in v0.6.0

func (b ByteaType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (ByteaType) Zero added in v0.6.0

func (b ByteaType) Zero() any

Zero implements the DoltgresType interface.

type CharType added in v0.6.0

type CharType struct {
	// Length represents the maximum number of characters that the type may hold.
	// When this is set to unbounded, then it becomes recognized as bpchar.
	Length uint32
}

CharType is the type implementation of the PostgreSQL bpchar.

func (CharType) Alignment added in v0.10.0

func (b CharType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (CharType) BaseID added in v0.6.0

func (b CharType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (CharType) BaseName added in v0.10.0

func (b CharType) BaseName() string

BaseName implements the DoltgresType interface.

func (CharType) Category added in v0.10.0

func (b CharType) Category() TypeCategory

Category implements the DoltgresType interface.

func (CharType) CollationCoercibility added in v0.6.0

func (b CharType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (CharType) Compare added in v0.6.0

func (b CharType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (CharType) Convert added in v0.6.0

func (b CharType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (CharType) DeserializeValue added in v0.6.0

func (b CharType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (CharType) Equals added in v0.6.0

func (b CharType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (CharType) FormatValue added in v0.6.0

func (b CharType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (CharType) GetSerializationID added in v0.6.0

func (b CharType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (CharType) IoInput added in v0.8.0

func (b CharType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (CharType) IoOutput added in v0.8.0

func (b CharType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (CharType) IsPreferredType added in v0.10.0

func (b CharType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (CharType) IsUnbounded added in v0.6.0

func (b CharType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (CharType) MaxSerializedWidth added in v0.6.0

func (b CharType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (CharType) MaxTextResponseByteLength added in v0.6.0

func (b CharType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (CharType) OID added in v0.6.0

func (b CharType) OID() uint32

OID implements the DoltgresType interface.

func (CharType) Promote added in v0.6.0

func (b CharType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (CharType) SQL added in v0.6.0

func (b CharType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (CharType) SerializeType added in v0.6.0

func (b CharType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (CharType) SerializeValue added in v0.6.0

func (b CharType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (CharType) SerializedCompare added in v0.6.0

func (b CharType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (CharType) String added in v0.6.0

func (b CharType) String() string

String implements the DoltgresType interface.

func (CharType) ToArrayType added in v0.6.0

func (b CharType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (CharType) Type added in v0.6.0

func (b CharType) Type() query.Type

Type implements the DoltgresType interface.

func (CharType) ValueType added in v0.6.0

func (b CharType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (CharType) Zero added in v0.6.0

func (b CharType) Zero() any

Zero implements the DoltgresType interface.

type DateType added in v0.6.0

type DateType struct{}

DateType is the extended type implementation of the PostgreSQL date.

func (DateType) Alignment added in v0.10.0

func (b DateType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (DateType) BaseID added in v0.6.0

func (b DateType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (DateType) BaseName added in v0.10.0

func (b DateType) BaseName() string

BaseName implements the DoltgresType interface.

func (DateType) Category added in v0.10.0

func (b DateType) Category() TypeCategory

Category implements the DoltgresType interface.

func (DateType) CollationCoercibility added in v0.6.0

func (b DateType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (DateType) Compare added in v0.6.0

func (b DateType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (DateType) Convert added in v0.6.0

func (b DateType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (DateType) DeserializeValue added in v0.6.0

func (b DateType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (DateType) Equals added in v0.6.0

func (b DateType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (DateType) FormatValue added in v0.6.0

func (b DateType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (DateType) GetSerializationID added in v0.6.0

func (b DateType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (DateType) IoInput added in v0.8.0

func (b DateType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (DateType) IoOutput added in v0.8.0

func (b DateType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (DateType) IsPreferredType added in v0.10.0

func (b DateType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (DateType) IsUnbounded added in v0.6.0

func (b DateType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (DateType) MaxSerializedWidth added in v0.6.0

func (b DateType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (DateType) MaxTextResponseByteLength added in v0.6.0

func (b DateType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (DateType) OID added in v0.6.0

func (b DateType) OID() uint32

OID implements the DoltgresType interface.

func (DateType) Promote added in v0.6.0

func (b DateType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (DateType) SQL added in v0.6.0

func (b DateType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (DateType) SerializeType added in v0.6.0

func (b DateType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (DateType) SerializeValue added in v0.6.0

func (b DateType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (DateType) SerializedCompare added in v0.6.0

func (b DateType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (DateType) String added in v0.6.0

func (b DateType) String() string

String implements the DoltgresType interface.

func (DateType) ToArrayType added in v0.6.0

func (b DateType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (DateType) Type added in v0.6.0

func (b DateType) Type() query.Type

Type implements the DoltgresType interface.

func (DateType) ValueType added in v0.6.0

func (b DateType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (DateType) Zero added in v0.6.0

func (b DateType) Zero() any

Zero implements the DoltgresType interface.

type DoltgresArrayType added in v0.6.0

type DoltgresArrayType interface {
	DoltgresType
	// BaseType is the inner type of the array. This will always be a non-array type.
	BaseType() DoltgresType
}

DoltgresArrayType is a DoltgresType that represents an array variant of a non-array type.

type DoltgresPolymorphicType added in v0.11.0

type DoltgresPolymorphicType interface {
	DoltgresType
	// IsValid returns whether the given type is valid for the calling polymorphic type.
	IsValid(target DoltgresType) bool
}

DoltgresPolymorphicType is a DoltgresType that represents one of the polymorphic types. These types are special built-in pseudo-types that are used during function resolution to allow a function to handle multiple types from a single definition. All polymorphic types have "any" as a prefix. The exception is the "any" type, which is not a polymorphic type.

type DoltgresType added in v0.5.0

type DoltgresType interface {
	types.ExtendedType
	// Alignment returns a char representing the alignment required when storing a value of this type.
	Alignment() TypeAlignment
	// BaseID returns the DoltgresTypeBaseID for this type.
	BaseID() DoltgresTypeBaseID
	// BaseName returns the name of the type displayed in pg_catalog tables.
	BaseName() string
	// Category returns a char representing an arbitrary classification of data types that is used by the parser to determine which implicit casts should be “preferred”.
	Category() TypeCategory
	// GetSerializationID returns the SerializationID for this type.
	GetSerializationID() SerializationID
	// IoInput returns a value from the given input string. This function mirrors Postgres' I/O input function. Such
	// strings are intended for serialization and automatic cross-type conversion. An input string will never represent
	// NULL.
	IoInput(ctx *sql.Context, input string) (any, error)
	// IoOutput returns a string from the given output value. This function mirrors Postgres' I/O output function. These
	// strings are not intended for output, but are instead intended for serialization and cross-type conversion. Output
	// values will always be non-NULL.
	IoOutput(ctx *sql.Context, output any) (string, error)
	// IsPreferredType returns true if the type is preferred type.
	IsPreferredType() bool
	// IsUnbounded returns whether the type is unbounded. Unbounded types do not enforce a length, precision, etc. on
	// values. All values are still bound by the field size limit, but that differs from any type-enforced limits.
	IsUnbounded() bool
	// OID returns an OID that we are associating with this type. OIDs are not unique, and are not guaranteed to be the
	// same between versions of Postgres. However, they've so far appeared relatively stable, and many libraries rely on
	// them for type identification, so we return them here. These should not be used for any sort of identification on
	// our side. For that, we should use DoltgresTypeBaseID, which we can guarantee will be unique and non-changing once
	// we've stabilized development.
	OID() uint32
	// SerializeType returns a byte slice representing the serialized form of the type. All serialized types MUST start
	// with their SerializationID. Deserialization is done through the DeserializeType function.
	SerializeType() ([]byte, error)

	// ToArrayType converts the calling DoltgresType into its corresponding array type. When called on a
	// DoltgresArrayType, then it simply returns itself, as a multidimensional or nested array is equivalent to a
	// standard array.
	ToArrayType() DoltgresArrayType
	// contains filtered or unexported methods
}

DoltgresType is a type that is distinct from the MySQL types in GMS.

func FromGmsType added in v0.11.0

func FromGmsType(typ sql.Type) DoltgresType

FromGmsType returns a DoltgresType that is most similar to the given GMS type.

func GetAllTypes added in v0.11.0

func GetAllTypes() []DoltgresType

GetAllTypes returns a slice containing all registered types. The slice is sorted by each type's base ID.

func GetTypeByOID added in v0.11.0

func GetTypeByOID(oid uint32) DoltgresType

GetTypeByOID returns the DoltgresType matching the given OID. If the OID does not match a type, then nil is returned.

type DoltgresTypeBaseID added in v0.5.0

type DoltgresTypeBaseID uint32

DoltgresTypeBaseID is an ID that is common between all variations of a DoltgresType. For example, VARCHAR(3) and VARCHAR(6) are different types, however they will return the same DoltgresTypeBaseID. This ID is not suitable for serialization, as it may change over time. Many types use their SerializationID as their base ID, so for types that are not serializable (such as the "any" types), it is recommended that they start way after the largest SerializationID to prevent base ID conflicts.

const (
	DoltgresTypeBaseID_Any DoltgresTypeBaseID = iota + 8192
	DoltgresTypeBaseID_AnyElement
	DoltgresTypeBaseID_AnyArray
	DoltgresTypeBaseID_AnyNonArray
	DoltgresTypeBaseID_AnyEnum
	DoltgresTypeBaseID_AnyRange
	DoltgresTypeBaseID_AnyMultirange
	DoltgresTypeBaseID_AnyCompatible
	DoltgresTypeBaseID_AnyCompatibleArray
	DoltgresTypeBaseID_AnyCompatibleNonArray
	DoltgresTypeBaseID_AnyCompatibleRange
	DoltgresTypeBaseID_AnyCompatibleMultirange
	DoltgresTypeBaseID_CString
	DoltgresTypeBaseID_Internal
	DoltgresTypeBaseID_Language_Handler
	DoltgresTypeBaseID_FDW_Handler
	DoltgresTypeBaseID_Table_AM_Handler
	DoltgresTypeBaseID_Index_AM_Handler
	DoltgresTypeBaseID_TSM_Handler
	DoltgresTypeBaseID_Record
	DoltgresTypeBaseID_Trigger
	DoltgresTypeBaseID_Event_Trigger
	DoltgresTypeBaseID_PG_DDL_Command
	DoltgresTypeBaseID_Void
	DoltgresTypeBaseID_Unknown
	DoltgresTypeBaseID_Int16Serial
	DoltgresTypeBaseID_Int32Serial
	DoltgresTypeBaseID_Int64Serial
	DoltgresTypeBaseID_Regclass
	DoltgresTypeBaseID_Regcollation
	DoltgresTypeBaseID_Regconfig
	DoltgresTypeBaseID_Regdictionary
	DoltgresTypeBaseID_Regnamespace
	DoltgresTypeBaseID_Regoper
	DoltgresTypeBaseID_Regoperator
	DoltgresTypeBaseID_Regproc
	DoltgresTypeBaseID_Regprocedure
	DoltgresTypeBaseID_Regrole
	DoltgresTypeBaseID_Regtype
)

func (DoltgresTypeBaseID) GetRepresentativeType added in v0.8.0

func (id DoltgresTypeBaseID) GetRepresentativeType() DoltgresType

GetRepresentativeType returns the representative type of the base ID. This is usually the unbounded version or equivalent.

func (DoltgresTypeBaseID) GetTypeCategory added in v0.8.0

func (id DoltgresTypeBaseID) GetTypeCategory() TypeCategory

GetTypeCategory returns the TypeCategory that this base ID belongs to. Returns Unknown if the ID does not belong to a category.

func (DoltgresTypeBaseID) HasUniqueOID added in v0.11.0

func (id DoltgresTypeBaseID) HasUniqueOID() bool

HasUniqueOID returns whether the type belonging to the base ID has a unique OID. This will be true for most types. Examples of types that do not have unique OIDs are the serial types, since they're not actual types.

func (DoltgresTypeBaseID) IsBaseIDArrayType added in v0.8.0

func (id DoltgresTypeBaseID) IsBaseIDArrayType() (DoltgresArrayType, bool)

IsBaseIDArrayType returns whether the base ID is an array type. If it is, it also returns the type.

func (DoltgresTypeBaseID) String added in v0.11.0

func (i DoltgresTypeBaseID) String() string

type DomainType added in v0.14.0

type DomainType struct {
	Schema      string
	Name        string
	AsType      DoltgresType
	DefaultExpr string
	NotNull     bool
	Checks      []*sql.CheckDefinition
}

func (DomainType) Alignment added in v0.14.0

func (d DomainType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (DomainType) BaseID added in v0.14.0

func (d DomainType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (DomainType) BaseName added in v0.14.0

func (d DomainType) BaseName() string

BaseName implements the DoltgresType interface.

func (DomainType) Category added in v0.14.0

func (d DomainType) Category() TypeCategory

Category implements the DoltgresType interface.

func (DomainType) CollationCoercibility added in v0.14.0

func (d DomainType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (DomainType) Compare added in v0.14.0

func (d DomainType) Compare(i interface{}, i2 interface{}) (int, error)

Compare implements the DoltgresType interface.

func (DomainType) Convert added in v0.14.0

func (d DomainType) Convert(i interface{}) (interface{}, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (DomainType) DeserializeValue added in v0.14.0

func (d DomainType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the types.ExtendedType interface.

func (DomainType) Equals added in v0.14.0

func (d DomainType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (DomainType) FormatValue added in v0.14.0

func (d DomainType) FormatValue(val any) (string, error)

FormatValue implements the types.ExtendedType interface.

func (DomainType) GetSerializationID added in v0.14.0

func (d DomainType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (DomainType) IoInput added in v0.14.0

func (d DomainType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (DomainType) IoOutput added in v0.14.0

func (d DomainType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (DomainType) IsPreferredType added in v0.14.0

func (d DomainType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (DomainType) IsUnbounded added in v0.14.0

func (d DomainType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (DomainType) MaxSerializedWidth added in v0.14.0

func (d DomainType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the types.ExtendedType interface.

func (DomainType) MaxTextResponseByteLength added in v0.14.0

func (d DomainType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (DomainType) OID added in v0.14.0

func (d DomainType) OID() uint32

OID implements the DoltgresType interface.

func (DomainType) Promote added in v0.14.0

func (d DomainType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (DomainType) SQL added in v0.14.0

func (d DomainType) SQL(ctx *sql.Context, dest []byte, v interface{}) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (DomainType) SerializeType added in v0.14.0

func (d DomainType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (DomainType) SerializeValue added in v0.14.0

func (d DomainType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the types.ExtendedType interface.

func (DomainType) SerializedCompare added in v0.14.0

func (d DomainType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (DomainType) String added in v0.14.0

func (d DomainType) String() string

String implements the DoltgresType interface.

func (DomainType) ToArrayType added in v0.14.0

func (d DomainType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (DomainType) Type added in v0.14.0

func (d DomainType) Type() query.Type

Type implements the DoltgresType interface.

func (DomainType) UnderlyingBaseType added in v0.14.0

func (d DomainType) UnderlyingBaseType() DoltgresType

UnderlyingBaseType returns underlying type of the domain type that is a base type.

func (DomainType) ValueType added in v0.14.0

func (d DomainType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (DomainType) Zero added in v0.14.0

func (d DomainType) Zero() interface{}

Zero implements the DoltgresType interface.

type Float32Type added in v0.5.0

type Float32Type struct{}

Float32Type is the extended type implementation of the PostgreSQL real.

func (Float32Type) Alignment added in v0.10.0

func (b Float32Type) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Float32Type) BaseID added in v0.5.0

func (b Float32Type) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (Float32Type) BaseName added in v0.10.0

func (b Float32Type) BaseName() string

BaseName implements the DoltgresType interface.

func (Float32Type) Category added in v0.10.0

func (b Float32Type) Category() TypeCategory

Category implements the DoltgresType interface.

func (Float32Type) CollationCoercibility added in v0.5.0

func (b Float32Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Float32Type) Compare added in v0.5.0

func (b Float32Type) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Float32Type) Convert added in v0.5.0

func (b Float32Type) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Float32Type) DeserializeValue added in v0.5.0

func (b Float32Type) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Float32Type) Equals added in v0.5.0

func (b Float32Type) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Float32Type) FormatValue added in v0.5.0

func (b Float32Type) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Float32Type) GetSerializationID added in v0.6.0

func (b Float32Type) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Float32Type) IoInput added in v0.8.0

func (b Float32Type) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Float32Type) IoOutput added in v0.8.0

func (b Float32Type) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Float32Type) IsPreferredType added in v0.10.0

func (b Float32Type) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Float32Type) IsUnbounded added in v0.6.0

func (b Float32Type) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Float32Type) MaxSerializedWidth added in v0.5.0

func (b Float32Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Float32Type) MaxTextResponseByteLength added in v0.5.0

func (b Float32Type) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Float32Type) OID added in v0.5.0

func (b Float32Type) OID() uint32

OID implements the DoltgresType interface.

func (Float32Type) Promote added in v0.5.0

func (b Float32Type) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Float32Type) SQL added in v0.5.0

func (b Float32Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Float32Type) SerializeType added in v0.6.0

func (b Float32Type) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Float32Type) SerializeValue added in v0.5.0

func (b Float32Type) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Float32Type) SerializedCompare added in v0.5.0

func (b Float32Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Float32Type) String added in v0.5.0

func (b Float32Type) String() string

String implements the DoltgresType interface.

func (Float32Type) ToArrayType added in v0.6.0

func (b Float32Type) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Float32Type) Type added in v0.5.0

func (b Float32Type) Type() query.Type

Type implements the DoltgresType interface.

func (Float32Type) ValueType added in v0.5.0

func (b Float32Type) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Float32Type) Zero added in v0.5.0

func (b Float32Type) Zero() any

Zero implements the DoltgresType interface.

type Float64Type added in v0.5.0

type Float64Type struct{}

Float64Type is the extended type implementation of the PostgreSQL double precision.

func (Float64Type) Alignment added in v0.10.0

func (b Float64Type) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Float64Type) BaseID added in v0.5.0

func (b Float64Type) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (Float64Type) BaseName added in v0.10.0

func (b Float64Type) BaseName() string

BaseName implements the DoltgresType interface.

func (Float64Type) Category added in v0.10.0

func (b Float64Type) Category() TypeCategory

Category implements the DoltgresType interface.

func (Float64Type) CollationCoercibility added in v0.5.0

func (b Float64Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Float64Type) Compare added in v0.5.0

func (b Float64Type) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Float64Type) Convert added in v0.5.0

func (b Float64Type) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Float64Type) DeserializeValue added in v0.5.0

func (b Float64Type) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Float64Type) Equals added in v0.5.0

func (b Float64Type) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Float64Type) FormatValue added in v0.5.0

func (b Float64Type) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Float64Type) GetSerializationID added in v0.6.0

func (b Float64Type) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Float64Type) IoInput added in v0.8.0

func (b Float64Type) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Float64Type) IoOutput added in v0.8.0

func (b Float64Type) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Float64Type) IsPreferredType added in v0.10.0

func (b Float64Type) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Float64Type) IsUnbounded added in v0.6.0

func (b Float64Type) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Float64Type) MaxSerializedWidth added in v0.5.0

func (b Float64Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Float64Type) MaxTextResponseByteLength added in v0.5.0

func (b Float64Type) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Float64Type) OID added in v0.5.0

func (b Float64Type) OID() uint32

OID implements the DoltgresType interface.

func (Float64Type) Promote added in v0.5.0

func (b Float64Type) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Float64Type) SQL added in v0.5.0

func (b Float64Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Float64Type) SerializeType added in v0.6.0

func (b Float64Type) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Float64Type) SerializeValue added in v0.5.0

func (b Float64Type) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Float64Type) SerializedCompare added in v0.5.0

func (b Float64Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Float64Type) String added in v0.5.0

func (b Float64Type) String() string

String implements the DoltgresType interface.

func (Float64Type) ToArrayType added in v0.6.0

func (b Float64Type) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Float64Type) Type added in v0.5.0

func (b Float64Type) Type() query.Type

Type implements the DoltgresType interface.

func (Float64Type) ValueType added in v0.5.0

func (b Float64Type) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Float64Type) Zero added in v0.5.0

func (b Float64Type) Zero() any

Zero implements the DoltgresType interface.

type Int16Type added in v0.5.0

type Int16Type struct{}

Int16Type is the extended type implementation of the PostgreSQL smallint.

func (Int16Type) Alignment added in v0.10.0

func (b Int16Type) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Int16Type) BaseID added in v0.5.0

func (b Int16Type) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (Int16Type) BaseName added in v0.10.0

func (b Int16Type) BaseName() string

BaseName implements the DoltgresType interface.

func (Int16Type) Category added in v0.10.0

func (b Int16Type) Category() TypeCategory

Category implements the DoltgresType interface.

func (Int16Type) CollationCoercibility added in v0.5.0

func (b Int16Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Int16Type) Compare added in v0.5.0

func (b Int16Type) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Int16Type) Convert added in v0.5.0

func (b Int16Type) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Int16Type) DeserializeValue added in v0.5.0

func (b Int16Type) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Int16Type) Equals added in v0.5.0

func (b Int16Type) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Int16Type) FormatValue added in v0.5.0

func (b Int16Type) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Int16Type) GetSerializationID added in v0.6.0

func (b Int16Type) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Int16Type) IoInput added in v0.8.0

func (b Int16Type) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Int16Type) IoOutput added in v0.8.0

func (b Int16Type) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Int16Type) IsPreferredType added in v0.10.0

func (b Int16Type) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Int16Type) IsUnbounded added in v0.6.0

func (b Int16Type) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Int16Type) MaxSerializedWidth added in v0.5.0

func (b Int16Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Int16Type) MaxTextResponseByteLength added in v0.5.0

func (b Int16Type) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Int16Type) OID added in v0.5.0

func (b Int16Type) OID() uint32

OID implements the DoltgresType interface.

func (Int16Type) Promote added in v0.5.0

func (b Int16Type) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Int16Type) SQL added in v0.5.0

func (b Int16Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Int16Type) SerializeType added in v0.6.0

func (b Int16Type) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Int16Type) SerializeValue added in v0.5.0

func (b Int16Type) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Int16Type) SerializedCompare added in v0.5.0

func (b Int16Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Int16Type) String added in v0.5.0

func (b Int16Type) String() string

String implements the DoltgresType interface.

func (Int16Type) ToArrayType added in v0.6.0

func (b Int16Type) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Int16Type) Type added in v0.5.0

func (b Int16Type) Type() query.Type

Type implements the DoltgresType interface.

func (Int16Type) ValueType added in v0.5.0

func (b Int16Type) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Int16Type) Zero added in v0.5.0

func (b Int16Type) Zero() any

Zero implements the DoltgresType interface.

type Int16TypeSerial added in v0.8.0

type Int16TypeSerial struct{}

Int16TypeSerial is the extended type implementation of the PostgreSQL smallserial.

func (Int16TypeSerial) Alignment added in v0.10.0

func (b Int16TypeSerial) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Int16TypeSerial) BaseID added in v0.8.0

BaseID implements the DoltgresType interface.

func (Int16TypeSerial) BaseName added in v0.10.0

func (b Int16TypeSerial) BaseName() string

BaseName implements the DoltgresType interface.

func (Int16TypeSerial) Category added in v0.10.0

func (b Int16TypeSerial) Category() TypeCategory

Category implements the DoltgresType interface.

func (Int16TypeSerial) CollationCoercibility added in v0.8.0

func (b Int16TypeSerial) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Int16TypeSerial) Compare added in v0.8.0

func (b Int16TypeSerial) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Int16TypeSerial) Convert added in v0.8.0

func (b Int16TypeSerial) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Int16TypeSerial) DeserializeValue added in v0.8.0

func (b Int16TypeSerial) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Int16TypeSerial) Equals added in v0.8.0

func (b Int16TypeSerial) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Int16TypeSerial) FormatValue added in v0.8.0

func (b Int16TypeSerial) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Int16TypeSerial) GetSerializationID added in v0.8.0

func (b Int16TypeSerial) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Int16TypeSerial) IoInput added in v0.8.0

func (b Int16TypeSerial) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Int16TypeSerial) IoOutput added in v0.8.0

func (b Int16TypeSerial) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Int16TypeSerial) IsPreferredType added in v0.10.0

func (b Int16TypeSerial) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Int16TypeSerial) IsUnbounded added in v0.8.0

func (b Int16TypeSerial) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Int16TypeSerial) MaxSerializedWidth added in v0.8.0

func (b Int16TypeSerial) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Int16TypeSerial) MaxTextResponseByteLength added in v0.8.0

func (b Int16TypeSerial) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Int16TypeSerial) OID added in v0.8.0

func (b Int16TypeSerial) OID() uint32

OID implements the DoltgresType interface.

func (Int16TypeSerial) Promote added in v0.8.0

func (b Int16TypeSerial) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Int16TypeSerial) SQL added in v0.8.0

func (b Int16TypeSerial) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Int16TypeSerial) SerializeType added in v0.8.0

func (b Int16TypeSerial) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Int16TypeSerial) SerializeValue added in v0.8.0

func (b Int16TypeSerial) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Int16TypeSerial) SerializedCompare added in v0.8.0

func (b Int16TypeSerial) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Int16TypeSerial) String added in v0.8.0

func (b Int16TypeSerial) String() string

String implements the DoltgresType interface.

func (Int16TypeSerial) ToArrayType added in v0.8.0

func (b Int16TypeSerial) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Int16TypeSerial) Type added in v0.8.0

func (b Int16TypeSerial) Type() query.Type

Type implements the DoltgresType interface.

func (Int16TypeSerial) ValueType added in v0.8.0

func (b Int16TypeSerial) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Int16TypeSerial) Zero added in v0.8.0

func (b Int16TypeSerial) Zero() any

Zero implements the DoltgresType interface.

type Int32Type added in v0.5.0

type Int32Type struct{}

Int32Type is the extended type implementation of the PostgreSQL integer.

func (Int32Type) Alignment added in v0.10.0

func (b Int32Type) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Int32Type) BaseID added in v0.5.0

func (b Int32Type) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (Int32Type) BaseName added in v0.10.0

func (b Int32Type) BaseName() string

BaseName implements the DoltgresType interface.

func (Int32Type) Category added in v0.10.0

func (b Int32Type) Category() TypeCategory

Category implements the DoltgresType interface.

func (Int32Type) CollationCoercibility added in v0.5.0

func (b Int32Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Int32Type) Compare added in v0.5.0

func (b Int32Type) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Int32Type) Convert added in v0.5.0

func (b Int32Type) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Int32Type) DeserializeValue added in v0.5.0

func (b Int32Type) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Int32Type) Equals added in v0.5.0

func (b Int32Type) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Int32Type) FormatValue added in v0.5.0

func (b Int32Type) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Int32Type) GetSerializationID added in v0.6.0

func (b Int32Type) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Int32Type) IoInput added in v0.8.0

func (b Int32Type) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Int32Type) IoOutput added in v0.8.0

func (b Int32Type) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Int32Type) IsPreferredType added in v0.10.0

func (b Int32Type) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Int32Type) IsUnbounded added in v0.6.0

func (b Int32Type) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Int32Type) MaxSerializedWidth added in v0.5.0

func (b Int32Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Int32Type) MaxTextResponseByteLength added in v0.5.0

func (b Int32Type) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Int32Type) OID added in v0.5.0

func (b Int32Type) OID() uint32

OID implements the DoltgresType interface.

func (Int32Type) Promote added in v0.5.0

func (b Int32Type) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Int32Type) SQL added in v0.5.0

func (b Int32Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Int32Type) SerializeType added in v0.6.0

func (b Int32Type) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Int32Type) SerializeValue added in v0.5.0

func (b Int32Type) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Int32Type) SerializedCompare added in v0.5.0

func (b Int32Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Int32Type) String added in v0.5.0

func (b Int32Type) String() string

String implements the DoltgresType interface.

func (Int32Type) ToArrayType added in v0.6.0

func (b Int32Type) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Int32Type) Type added in v0.5.0

func (b Int32Type) Type() query.Type

Type implements the DoltgresType interface.

func (Int32Type) ValueType added in v0.5.0

func (b Int32Type) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Int32Type) Zero added in v0.5.0

func (b Int32Type) Zero() any

Zero implements the DoltgresType interface.

type Int32TypeSerial added in v0.8.0

type Int32TypeSerial struct{}

Int32TypeSerial is the extended type implementation of the PostgreSQL serial.

func (Int32TypeSerial) Alignment added in v0.10.0

func (b Int32TypeSerial) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Int32TypeSerial) BaseID added in v0.8.0

BaseID implements the DoltgresType interface.

func (Int32TypeSerial) BaseName added in v0.10.0

func (b Int32TypeSerial) BaseName() string

BaseName implements the DoltgresType interface.

func (Int32TypeSerial) Category added in v0.10.0

func (b Int32TypeSerial) Category() TypeCategory

Category implements the DoltgresType interface.

func (Int32TypeSerial) CollationCoercibility added in v0.8.0

func (b Int32TypeSerial) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Int32TypeSerial) Compare added in v0.8.0

func (b Int32TypeSerial) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Int32TypeSerial) Convert added in v0.8.0

func (b Int32TypeSerial) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Int32TypeSerial) DeserializeValue added in v0.8.0

func (b Int32TypeSerial) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Int32TypeSerial) Equals added in v0.8.0

func (b Int32TypeSerial) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Int32TypeSerial) FormatValue added in v0.8.0

func (b Int32TypeSerial) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Int32TypeSerial) GetSerializationID added in v0.8.0

func (b Int32TypeSerial) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Int32TypeSerial) IoInput added in v0.8.0

func (b Int32TypeSerial) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Int32TypeSerial) IoOutput added in v0.8.0

func (b Int32TypeSerial) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Int32TypeSerial) IsPreferredType added in v0.10.0

func (b Int32TypeSerial) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Int32TypeSerial) IsUnbounded added in v0.8.0

func (b Int32TypeSerial) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Int32TypeSerial) MaxSerializedWidth added in v0.8.0

func (b Int32TypeSerial) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Int32TypeSerial) MaxTextResponseByteLength added in v0.8.0

func (b Int32TypeSerial) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Int32TypeSerial) OID added in v0.8.0

func (b Int32TypeSerial) OID() uint32

OID implements the DoltgresType interface.

func (Int32TypeSerial) Promote added in v0.8.0

func (b Int32TypeSerial) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Int32TypeSerial) SQL added in v0.8.0

func (b Int32TypeSerial) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Int32TypeSerial) SerializeType added in v0.8.0

func (b Int32TypeSerial) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Int32TypeSerial) SerializeValue added in v0.8.0

func (b Int32TypeSerial) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Int32TypeSerial) SerializedCompare added in v0.8.0

func (b Int32TypeSerial) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Int32TypeSerial) String added in v0.8.0

func (b Int32TypeSerial) String() string

String implements the DoltgresType interface.

func (Int32TypeSerial) ToArrayType added in v0.8.0

func (b Int32TypeSerial) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Int32TypeSerial) Type added in v0.8.0

func (b Int32TypeSerial) Type() query.Type

Type implements the DoltgresType interface.

func (Int32TypeSerial) ValueType added in v0.8.0

func (b Int32TypeSerial) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Int32TypeSerial) Zero added in v0.8.0

func (b Int32TypeSerial) Zero() any

Zero implements the DoltgresType interface.

type Int64Type added in v0.5.0

type Int64Type struct{}

Int64Type is the extended type implementation of the PostgreSQL bigint.

func (Int64Type) Alignment added in v0.10.0

func (b Int64Type) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Int64Type) BaseID added in v0.5.0

func (b Int64Type) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (Int64Type) BaseName added in v0.10.0

func (b Int64Type) BaseName() string

BaseName implements the DoltgresType interface.

func (Int64Type) Category added in v0.10.0

func (b Int64Type) Category() TypeCategory

Category implements the DoltgresType interface.

func (Int64Type) CollationCoercibility added in v0.5.0

func (b Int64Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Int64Type) Compare added in v0.5.0

func (b Int64Type) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Int64Type) Convert added in v0.5.0

func (b Int64Type) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Int64Type) DeserializeValue added in v0.5.0

func (b Int64Type) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Int64Type) Equals added in v0.5.0

func (b Int64Type) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Int64Type) FormatValue added in v0.5.0

func (b Int64Type) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Int64Type) GetSerializationID added in v0.6.0

func (b Int64Type) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Int64Type) IoInput added in v0.8.0

func (b Int64Type) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Int64Type) IoOutput added in v0.8.0

func (b Int64Type) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Int64Type) IsPreferredType added in v0.10.0

func (b Int64Type) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Int64Type) IsUnbounded added in v0.6.0

func (b Int64Type) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Int64Type) MaxSerializedWidth added in v0.5.0

func (b Int64Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Int64Type) MaxTextResponseByteLength added in v0.5.0

func (b Int64Type) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Int64Type) OID added in v0.5.0

func (b Int64Type) OID() uint32

OID implements the DoltgresType interface.

func (Int64Type) Promote added in v0.5.0

func (b Int64Type) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Int64Type) SQL added in v0.5.0

func (b Int64Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Int64Type) SerializeType added in v0.6.0

func (b Int64Type) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Int64Type) SerializeValue added in v0.5.0

func (b Int64Type) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Int64Type) SerializedCompare added in v0.5.0

func (b Int64Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Int64Type) String added in v0.5.0

func (b Int64Type) String() string

String implements the DoltgresType interface.

func (Int64Type) ToArrayType added in v0.6.0

func (b Int64Type) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Int64Type) Type added in v0.5.0

func (b Int64Type) Type() query.Type

Type implements the DoltgresType interface.

func (Int64Type) ValueType added in v0.5.0

func (b Int64Type) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Int64Type) Zero added in v0.5.0

func (b Int64Type) Zero() any

Zero implements the DoltgresType interface.

type Int64TypeSerial added in v0.8.0

type Int64TypeSerial struct{}

Int64TypeSerial is the extended type implementation of the PostgreSQL bigserial.

func (Int64TypeSerial) Alignment added in v0.10.0

func (b Int64TypeSerial) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (Int64TypeSerial) BaseID added in v0.8.0

BaseID implements the DoltgresType interface.

func (Int64TypeSerial) BaseName added in v0.10.0

func (b Int64TypeSerial) BaseName() string

BaseName implements the DoltgresType interface.

func (Int64TypeSerial) Category added in v0.10.0

func (b Int64TypeSerial) Category() TypeCategory

Category implements the DoltgresType interface.

func (Int64TypeSerial) CollationCoercibility added in v0.8.0

func (b Int64TypeSerial) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (Int64TypeSerial) Compare added in v0.8.0

func (b Int64TypeSerial) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (Int64TypeSerial) Convert added in v0.8.0

func (b Int64TypeSerial) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (Int64TypeSerial) DeserializeValue added in v0.8.0

func (b Int64TypeSerial) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (Int64TypeSerial) Equals added in v0.8.0

func (b Int64TypeSerial) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (Int64TypeSerial) FormatValue added in v0.8.0

func (b Int64TypeSerial) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (Int64TypeSerial) GetSerializationID added in v0.8.0

func (b Int64TypeSerial) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (Int64TypeSerial) IoInput added in v0.8.0

func (b Int64TypeSerial) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (Int64TypeSerial) IoOutput added in v0.8.0

func (b Int64TypeSerial) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (Int64TypeSerial) IsPreferredType added in v0.10.0

func (b Int64TypeSerial) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (Int64TypeSerial) IsUnbounded added in v0.8.0

func (b Int64TypeSerial) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (Int64TypeSerial) MaxSerializedWidth added in v0.8.0

func (b Int64TypeSerial) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (Int64TypeSerial) MaxTextResponseByteLength added in v0.8.0

func (b Int64TypeSerial) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (Int64TypeSerial) OID added in v0.8.0

func (b Int64TypeSerial) OID() uint32

OID implements the DoltgresType interface.

func (Int64TypeSerial) Promote added in v0.8.0

func (b Int64TypeSerial) Promote() sql.Type

Promote implements the DoltgresType interface.

func (Int64TypeSerial) SQL added in v0.8.0

func (b Int64TypeSerial) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (Int64TypeSerial) SerializeType added in v0.8.0

func (b Int64TypeSerial) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (Int64TypeSerial) SerializeValue added in v0.8.0

func (b Int64TypeSerial) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (Int64TypeSerial) SerializedCompare added in v0.8.0

func (b Int64TypeSerial) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (Int64TypeSerial) String added in v0.8.0

func (b Int64TypeSerial) String() string

String implements the DoltgresType interface.

func (Int64TypeSerial) ToArrayType added in v0.8.0

func (b Int64TypeSerial) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (Int64TypeSerial) Type added in v0.8.0

func (b Int64TypeSerial) Type() query.Type

Type implements the DoltgresType interface.

func (Int64TypeSerial) ValueType added in v0.8.0

func (b Int64TypeSerial) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (Int64TypeSerial) Zero added in v0.8.0

func (b Int64TypeSerial) Zero() any

Zero implements the DoltgresType interface.

type InternalCharType added in v0.11.0

type InternalCharType struct{}

InternalCharType is the type implementation of the internal PostgreSQL "char" type.

func (InternalCharType) Alignment added in v0.11.0

func (b InternalCharType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (InternalCharType) BaseID added in v0.11.0

BaseID implements the DoltgresType interface.

func (InternalCharType) BaseName added in v0.11.0

func (b InternalCharType) BaseName() string

BaseName implements the DoltgresType interface.

func (InternalCharType) Category added in v0.11.0

func (b InternalCharType) Category() TypeCategory

Category implements the DoltgresType interface.

func (InternalCharType) CollationCoercibility added in v0.11.0

func (b InternalCharType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (InternalCharType) Compare added in v0.11.0

func (b InternalCharType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (InternalCharType) Convert added in v0.11.0

func (b InternalCharType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (InternalCharType) DeserializeValue added in v0.11.0

func (b InternalCharType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (InternalCharType) Equals added in v0.11.0

func (b InternalCharType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (InternalCharType) FormatValue added in v0.11.0

func (b InternalCharType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (InternalCharType) GetSerializationID added in v0.11.0

func (b InternalCharType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (InternalCharType) IoInput added in v0.11.0

func (b InternalCharType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (InternalCharType) IoOutput added in v0.11.0

func (b InternalCharType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (InternalCharType) IsPreferredType added in v0.11.0

func (b InternalCharType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (InternalCharType) IsUnbounded added in v0.11.0

func (b InternalCharType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (InternalCharType) MaxSerializedWidth added in v0.11.0

func (b InternalCharType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (InternalCharType) MaxTextResponseByteLength added in v0.11.0

func (b InternalCharType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (InternalCharType) OID added in v0.11.0

func (b InternalCharType) OID() uint32

OID implements the DoltgresType interface.

func (InternalCharType) Promote added in v0.11.0

func (b InternalCharType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (InternalCharType) SQL added in v0.11.0

func (b InternalCharType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (InternalCharType) SerializeType added in v0.11.0

func (b InternalCharType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (InternalCharType) SerializeValue added in v0.11.0

func (b InternalCharType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (InternalCharType) SerializedCompare added in v0.11.0

func (b InternalCharType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (InternalCharType) String added in v0.11.0

func (b InternalCharType) String() string

String implements the DoltgresType interface.

func (InternalCharType) ToArrayType added in v0.11.0

func (b InternalCharType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (InternalCharType) Type added in v0.11.0

func (b InternalCharType) Type() query.Type

Type implements the DoltgresType interface.

func (InternalCharType) ValueType added in v0.11.0

func (b InternalCharType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (InternalCharType) Zero added in v0.11.0

func (b InternalCharType) Zero() any

Zero implements the DoltgresType interface.

type IntervalType added in v0.11.0

type IntervalType struct{}

IntervalType is the extended type implementation of the PostgreSQL interval.

func (IntervalType) Alignment added in v0.11.0

func (b IntervalType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (IntervalType) BaseID added in v0.11.0

func (b IntervalType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (IntervalType) BaseName added in v0.11.0

func (b IntervalType) BaseName() string

BaseName implements the DoltgresType interface.

func (IntervalType) Category added in v0.11.0

func (b IntervalType) Category() TypeCategory

Category implements the DoltgresType interface.

func (IntervalType) CollationCoercibility added in v0.11.0

func (b IntervalType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (IntervalType) Compare added in v0.11.0

func (b IntervalType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (IntervalType) Convert added in v0.11.0

func (b IntervalType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (IntervalType) DeserializeValue added in v0.11.0

func (b IntervalType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (IntervalType) Equals added in v0.11.0

func (b IntervalType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (IntervalType) FormatValue added in v0.11.0

func (b IntervalType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (IntervalType) GetSerializationID added in v0.11.0

func (b IntervalType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (IntervalType) IoInput added in v0.11.0

func (b IntervalType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (IntervalType) IoOutput added in v0.11.0

func (b IntervalType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (IntervalType) IsPreferredType added in v0.11.0

func (b IntervalType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (IntervalType) IsUnbounded added in v0.11.0

func (b IntervalType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (IntervalType) MaxSerializedWidth added in v0.11.0

func (b IntervalType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (IntervalType) MaxTextResponseByteLength added in v0.11.0

func (b IntervalType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (IntervalType) OID added in v0.11.0

func (b IntervalType) OID() uint32

OID implements the DoltgresType interface.

func (IntervalType) Promote added in v0.11.0

func (b IntervalType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (IntervalType) SQL added in v0.11.0

func (b IntervalType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (IntervalType) SerializeType added in v0.11.0

func (b IntervalType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (IntervalType) SerializeValue added in v0.11.0

func (b IntervalType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (IntervalType) SerializedCompare added in v0.11.0

func (b IntervalType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (IntervalType) String added in v0.11.0

func (b IntervalType) String() string

String implements the DoltgresType interface.

func (IntervalType) ToArrayType added in v0.11.0

func (b IntervalType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (IntervalType) Type added in v0.11.0

func (b IntervalType) Type() query.Type

Type implements the DoltgresType interface.

func (IntervalType) ValueType added in v0.11.0

func (b IntervalType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (IntervalType) Zero added in v0.11.0

func (b IntervalType) Zero() any

Zero implements the DoltgresType interface.

type JsonBType added in v0.8.0

type JsonBType struct{}

JsonBType is the extended type implementation of the PostgreSQL jsonb.

func (JsonBType) Alignment added in v0.10.0

func (b JsonBType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (JsonBType) BaseID added in v0.8.0

func (b JsonBType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (JsonBType) BaseName added in v0.10.0

func (b JsonBType) BaseName() string

BaseName implements the DoltgresType interface.

func (JsonBType) Category added in v0.10.0

func (b JsonBType) Category() TypeCategory

Category implements the DoltgresType interface.

func (JsonBType) CollationCoercibility added in v0.8.0

func (b JsonBType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (JsonBType) Compare added in v0.8.0

func (b JsonBType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (JsonBType) Convert added in v0.8.0

func (b JsonBType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (JsonBType) ConvertToJsonDocument added in v0.12.0

func (b JsonBType) ConvertToJsonDocument(val interface{}) (JsonValue, error)

ConvertToJsonDocument recursively constructs a valid JsonDocument based on the structures returned by the decoder.

func (JsonBType) DeserializeValue added in v0.8.0

func (b JsonBType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (JsonBType) Equals added in v0.8.0

func (b JsonBType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (JsonBType) FormatValue added in v0.8.0

func (b JsonBType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (JsonBType) GetSerializationID added in v0.8.0

func (b JsonBType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (JsonBType) IoInput added in v0.8.0

func (b JsonBType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (JsonBType) IoOutput added in v0.8.0

func (b JsonBType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (JsonBType) IsPreferredType added in v0.10.0

func (b JsonBType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (JsonBType) IsUnbounded added in v0.8.0

func (b JsonBType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (JsonBType) MaxSerializedWidth added in v0.8.0

func (b JsonBType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (JsonBType) MaxTextResponseByteLength added in v0.8.0

func (b JsonBType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (JsonBType) OID added in v0.8.0

func (b JsonBType) OID() uint32

OID implements the DoltgresType interface.

func (JsonBType) Promote added in v0.8.0

func (b JsonBType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (JsonBType) SQL added in v0.8.0

func (b JsonBType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (JsonBType) SerializeType added in v0.8.0

func (b JsonBType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (JsonBType) SerializeValue added in v0.8.0

func (b JsonBType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (JsonBType) SerializedCompare added in v0.8.0

func (b JsonBType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (JsonBType) String added in v0.8.0

func (b JsonBType) String() string

String implements the DoltgresType interface.

func (JsonBType) ToArrayType added in v0.8.0

func (b JsonBType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (JsonBType) Type added in v0.8.0

func (b JsonBType) Type() query.Type

Type implements the DoltgresType interface.

func (JsonBType) ValueType added in v0.8.0

func (b JsonBType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (JsonBType) Zero added in v0.8.0

func (b JsonBType) Zero() any

Zero implements the DoltgresType interface.

type JsonDocument added in v0.8.0

type JsonDocument struct {
	Value JsonValue
}

JsonDocument represents an entire JSON document.

type JsonType added in v0.8.0

type JsonType struct{}

JsonType is the extended type implementation of the PostgreSQL json.

func (JsonType) Alignment added in v0.10.0

func (b JsonType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (JsonType) BaseID added in v0.8.0

func (b JsonType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (JsonType) BaseName added in v0.10.0

func (b JsonType) BaseName() string

BaseName implements the DoltgresType interface.

func (JsonType) Category added in v0.10.0

func (b JsonType) Category() TypeCategory

Category implements the DoltgresType interface.

func (JsonType) CollationCoercibility added in v0.8.0

func (b JsonType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (JsonType) Compare added in v0.8.0

func (b JsonType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (JsonType) Convert added in v0.8.0

func (b JsonType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (JsonType) DeserializeValue added in v0.8.0

func (b JsonType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (JsonType) Equals added in v0.8.0

func (b JsonType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (JsonType) FormatValue added in v0.8.0

func (b JsonType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (JsonType) GetSerializationID added in v0.8.0

func (b JsonType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (JsonType) IoInput added in v0.8.0

func (b JsonType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (JsonType) IoOutput added in v0.8.0

func (b JsonType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (JsonType) IsPreferredType added in v0.10.0

func (b JsonType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (JsonType) IsUnbounded added in v0.8.0

func (b JsonType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (JsonType) MaxSerializedWidth added in v0.8.0

func (b JsonType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (JsonType) MaxTextResponseByteLength added in v0.8.0

func (b JsonType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (JsonType) OID added in v0.8.0

func (b JsonType) OID() uint32

OID implements the DoltgresType interface.

func (JsonType) Promote added in v0.8.0

func (b JsonType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (JsonType) SQL added in v0.8.0

func (b JsonType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (JsonType) SerializeType added in v0.8.0

func (b JsonType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (JsonType) SerializeValue added in v0.8.0

func (b JsonType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (JsonType) SerializedCompare added in v0.8.0

func (b JsonType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (JsonType) String added in v0.8.0

func (b JsonType) String() string

String implements the DoltgresType interface.

func (JsonType) ToArrayType added in v0.8.0

func (b JsonType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (JsonType) Type added in v0.8.0

func (b JsonType) Type() query.Type

Type implements the DoltgresType interface.

func (JsonType) ValueType added in v0.8.0

func (b JsonType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (JsonType) Zero added in v0.8.0

func (b JsonType) Zero() any

Zero implements the DoltgresType interface.

type JsonValue added in v0.8.0

type JsonValue interface {
	// contains filtered or unexported methods
}

JsonValue is a value that represents some kind of data in JSON.

func JsonValueCopy added in v0.8.0

func JsonValueCopy(value JsonValue) JsonValue

JsonValueCopy returns a new copy of the given JsonValue that may be freely modified.

type JsonValueArray added in v0.8.0

type JsonValueArray []JsonValue

JsonValueArray represents a JSON array.

type JsonValueBoolean added in v0.8.0

type JsonValueBoolean bool

JsonValueBoolean represents a boolean value.

type JsonValueNull added in v0.8.0

type JsonValueNull byte

JsonValueNull represents a null value.

type JsonValueNumber added in v0.8.0

type JsonValueNumber decimal.Decimal

JsonValueNumber represents a number.

type JsonValueObject added in v0.8.0

type JsonValueObject struct {
	Items []JsonValueObjectItem
	Index map[string]int
}

JsonValueObject represents a JSON object.

type JsonValueObjectItem added in v0.8.0

type JsonValueObjectItem struct {
	Key   string
	Value JsonValue
}

JsonValueObjectItem represents a specific item inside a JsonObject.

type JsonValueString added in v0.8.0

type JsonValueString string

JsonValueString represents a string value.

type JsonValueType added in v0.8.0

type JsonValueType byte

JsonValueType represents the type of a JSON value. These values are serialized, and therefore should never be modified.

const (
	JsonValueType_Object  JsonValueType = 0
	JsonValueType_Array   JsonValueType = 1
	JsonValueType_String  JsonValueType = 2
	JsonValueType_Number  JsonValueType = 3
	JsonValueType_Boolean JsonValueType = 4
	JsonValueType_Null    JsonValueType = 5
)

type NameType added in v0.7.0

type NameType struct {
	// Length represents the maximum number of characters that the type may hold.
	Length uint32
}

NameType is the extended type implementation of the PostgreSQL name.

func (NameType) Alignment added in v0.10.0

func (b NameType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (NameType) BaseID added in v0.7.0

func (b NameType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (NameType) BaseName added in v0.10.0

func (b NameType) BaseName() string

BaseName implements the DoltgresType interface.

func (NameType) Category added in v0.10.0

func (b NameType) Category() TypeCategory

Category implements the DoltgresType interface.

func (NameType) CollationCoercibility added in v0.7.0

func (b NameType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (NameType) Compare added in v0.7.0

func (b NameType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (NameType) Convert added in v0.7.0

func (b NameType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (NameType) DeserializeValue added in v0.7.0

func (b NameType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (NameType) Equals added in v0.7.0

func (b NameType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (NameType) FormatValue added in v0.7.0

func (b NameType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (NameType) GetSerializationID added in v0.7.0

func (b NameType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (NameType) IoInput added in v0.8.0

func (b NameType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (NameType) IoOutput added in v0.8.0

func (b NameType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (NameType) IsPreferredType added in v0.10.0

func (b NameType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (NameType) IsUnbounded added in v0.7.0

func (b NameType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (NameType) MaxSerializedWidth added in v0.7.0

func (b NameType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (NameType) MaxTextResponseByteLength added in v0.7.0

func (b NameType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (NameType) OID added in v0.7.0

func (b NameType) OID() uint32

OID implements the DoltgresType interface.

func (NameType) Promote added in v0.7.0

func (b NameType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (NameType) SQL added in v0.7.0

func (b NameType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (NameType) SerializeType added in v0.7.0

func (b NameType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (NameType) SerializeValue added in v0.7.0

func (b NameType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (NameType) SerializedCompare added in v0.7.0

func (b NameType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (NameType) String added in v0.7.0

func (b NameType) String() string

String implements the DoltgresType interface.

func (NameType) ToArrayType added in v0.7.0

func (b NameType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (NameType) Type added in v0.7.0

func (b NameType) Type() query.Type

Type implements the DoltgresType interface.

func (NameType) ValueType added in v0.7.0

func (b NameType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (NameType) Zero added in v0.7.0

func (b NameType) Zero() any

Zero implements the DoltgresType interface.

type NumericType added in v0.5.0

type NumericType struct {
	// TODO: implement precision and scale
	Precision int32
	Scale     int32
}

NumericType is the extended type implementation of the PostgreSQL numeric.

func (NumericType) Alignment added in v0.10.0

func (b NumericType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (NumericType) BaseID added in v0.5.0

func (b NumericType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (NumericType) BaseName added in v0.10.0

func (b NumericType) BaseName() string

BaseName implements the DoltgresType interface.

func (NumericType) Category added in v0.10.0

func (b NumericType) Category() TypeCategory

Category implements the DoltgresType interface.

func (NumericType) CollationCoercibility added in v0.5.0

func (b NumericType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (NumericType) Compare added in v0.5.0

func (b NumericType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (NumericType) Convert added in v0.5.0

func (b NumericType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (NumericType) DeserializeValue added in v0.5.0

func (b NumericType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (NumericType) Equals added in v0.5.0

func (b NumericType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (NumericType) FormatValue added in v0.5.0

func (b NumericType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (NumericType) GetSerializationID added in v0.6.0

func (b NumericType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (NumericType) IoInput added in v0.8.0

func (b NumericType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (NumericType) IoOutput added in v0.8.0

func (b NumericType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (NumericType) IsPreferredType added in v0.10.0

func (b NumericType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (NumericType) IsUnbounded added in v0.6.0

func (b NumericType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (NumericType) MaxSerializedWidth added in v0.5.0

func (b NumericType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (NumericType) MaxTextResponseByteLength added in v0.5.0

func (b NumericType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (NumericType) OID added in v0.5.0

func (b NumericType) OID() uint32

OID implements the DoltgresType interface.

func (NumericType) Promote added in v0.5.0

func (b NumericType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (NumericType) SQL added in v0.5.0

func (b NumericType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (NumericType) SerializeType added in v0.6.0

func (b NumericType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (NumericType) SerializeValue added in v0.5.0

func (b NumericType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (NumericType) SerializedCompare added in v0.5.0

func (b NumericType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (NumericType) String added in v0.5.0

func (b NumericType) String() string

String implements the DoltgresType interface.

func (NumericType) ToArrayType added in v0.6.0

func (b NumericType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (NumericType) Type added in v0.5.0

func (b NumericType) Type() query.Type

Type implements the DoltgresType interface.

func (NumericType) ValueType added in v0.5.0

func (b NumericType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (NumericType) Zero added in v0.5.0

func (b NumericType) Zero() any

Zero implements the DoltgresType interface.

type OidType added in v0.7.0

type OidType struct{}

OidType is the extended type implementation of the PostgreSQL oid.

func (OidType) Alignment added in v0.10.0

func (b OidType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (OidType) BaseID added in v0.7.0

func (b OidType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (OidType) BaseName added in v0.10.0

func (b OidType) BaseName() string

BaseName implements the DoltgresType interface.

func (OidType) Category added in v0.10.0

func (b OidType) Category() TypeCategory

Category implements the DoltgresType interface.

func (OidType) CollationCoercibility added in v0.7.0

func (b OidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (OidType) Compare added in v0.7.0

func (b OidType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (OidType) Convert added in v0.7.0

func (b OidType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (OidType) DeserializeValue added in v0.7.0

func (b OidType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (OidType) Equals added in v0.7.0

func (b OidType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (OidType) FormatValue added in v0.7.0

func (b OidType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (OidType) GetSerializationID added in v0.7.0

func (b OidType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (OidType) IoInput added in v0.8.0

func (b OidType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (OidType) IoOutput added in v0.8.0

func (b OidType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (OidType) IsPreferredType added in v0.10.0

func (b OidType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (OidType) IsUnbounded added in v0.7.0

func (b OidType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (OidType) MaxSerializedWidth added in v0.7.0

func (b OidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (OidType) MaxTextResponseByteLength added in v0.7.0

func (b OidType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (OidType) OID added in v0.7.0

func (b OidType) OID() uint32

OID implements the DoltgresType interface.

func (OidType) Promote added in v0.7.0

func (b OidType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (OidType) SQL added in v0.7.0

func (b OidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (OidType) SerializeType added in v0.7.0

func (b OidType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (OidType) SerializeValue added in v0.7.0

func (b OidType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (OidType) SerializedCompare added in v0.7.0

func (b OidType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (OidType) String added in v0.7.0

func (b OidType) String() string

String implements the DoltgresType interface.

func (OidType) ToArrayType added in v0.7.0

func (b OidType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (OidType) Type added in v0.7.0

func (b OidType) Type() query.Type

Type implements the DoltgresType interface.

func (OidType) ValueType added in v0.7.0

func (b OidType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (OidType) Zero added in v0.7.0

func (b OidType) Zero() any

Zero implements the DoltgresType interface.

type RegclassType added in v0.11.0

type RegclassType struct{}

RegclassType is the extended type implementation of the PostgreSQL regclass.

func (RegclassType) Alignment added in v0.11.0

func (b RegclassType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (RegclassType) BaseID added in v0.11.0

func (b RegclassType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (RegclassType) BaseName added in v0.11.0

func (b RegclassType) BaseName() string

BaseName implements the DoltgresType interface.

func (RegclassType) Category added in v0.11.0

func (b RegclassType) Category() TypeCategory

Category implements the DoltgresType interface.

func (RegclassType) CollationCoercibility added in v0.11.0

func (b RegclassType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (RegclassType) Compare added in v0.11.0

func (b RegclassType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (RegclassType) Convert added in v0.11.0

func (b RegclassType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (RegclassType) DeserializeValue added in v0.11.0

func (b RegclassType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (RegclassType) Equals added in v0.11.0

func (b RegclassType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (RegclassType) FormatValue added in v0.11.0

func (b RegclassType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (RegclassType) GetSerializationID added in v0.11.0

func (b RegclassType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (RegclassType) IoInput added in v0.11.0

func (b RegclassType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (RegclassType) IoOutput added in v0.11.0

func (b RegclassType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (RegclassType) IsPreferredType added in v0.11.0

func (b RegclassType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (RegclassType) IsUnbounded added in v0.11.0

func (b RegclassType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (RegclassType) MaxSerializedWidth added in v0.11.0

func (b RegclassType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (RegclassType) MaxTextResponseByteLength added in v0.11.0

func (b RegclassType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (RegclassType) OID added in v0.11.0

func (b RegclassType) OID() uint32

OID implements the DoltgresType interface.

func (RegclassType) Promote added in v0.11.0

func (b RegclassType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (RegclassType) SQL added in v0.11.0

func (b RegclassType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (RegclassType) SerializeType added in v0.11.0

func (b RegclassType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (RegclassType) SerializeValue added in v0.11.0

func (b RegclassType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (RegclassType) SerializedCompare added in v0.11.0

func (b RegclassType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (RegclassType) String added in v0.11.0

func (b RegclassType) String() string

String implements the DoltgresType interface.

func (RegclassType) ToArrayType added in v0.11.0

func (b RegclassType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (RegclassType) Type added in v0.11.0

func (b RegclassType) Type() query.Type

Type implements the DoltgresType interface.

func (RegclassType) ValueType added in v0.11.0

func (b RegclassType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (RegclassType) Zero added in v0.11.0

func (b RegclassType) Zero() any

Zero implements the DoltgresType interface.

type RegprocType added in v0.11.0

type RegprocType struct{}

RegprocType is the extended type implementation of the PostgreSQL regproc.

func (RegprocType) Alignment added in v0.11.0

func (b RegprocType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (RegprocType) BaseID added in v0.11.0

func (b RegprocType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (RegprocType) BaseName added in v0.11.0

func (b RegprocType) BaseName() string

BaseName implements the DoltgresType interface.

func (RegprocType) Category added in v0.11.0

func (b RegprocType) Category() TypeCategory

Category implements the DoltgresType interface.

func (RegprocType) CollationCoercibility added in v0.11.0

func (b RegprocType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (RegprocType) Compare added in v0.11.0

func (b RegprocType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (RegprocType) Convert added in v0.11.0

func (b RegprocType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (RegprocType) DeserializeValue added in v0.11.0

func (b RegprocType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (RegprocType) Equals added in v0.11.0

func (b RegprocType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (RegprocType) FormatValue added in v0.11.0

func (b RegprocType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (RegprocType) GetSerializationID added in v0.11.0

func (b RegprocType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (RegprocType) IoInput added in v0.11.0

func (b RegprocType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (RegprocType) IoOutput added in v0.11.0

func (b RegprocType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (RegprocType) IsPreferredType added in v0.11.0

func (b RegprocType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (RegprocType) IsUnbounded added in v0.11.0

func (b RegprocType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (RegprocType) MaxSerializedWidth added in v0.11.0

func (b RegprocType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (RegprocType) MaxTextResponseByteLength added in v0.11.0

func (b RegprocType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (RegprocType) OID added in v0.11.0

func (b RegprocType) OID() uint32

OID implements the DoltgresType interface.

func (RegprocType) Promote added in v0.11.0

func (b RegprocType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (RegprocType) SQL added in v0.11.0

func (b RegprocType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (RegprocType) SerializeType added in v0.11.0

func (b RegprocType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (RegprocType) SerializeValue added in v0.11.0

func (b RegprocType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (RegprocType) SerializedCompare added in v0.11.0

func (b RegprocType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (RegprocType) String added in v0.11.0

func (b RegprocType) String() string

String implements the DoltgresType interface.

func (RegprocType) ToArrayType added in v0.11.0

func (b RegprocType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (RegprocType) Type added in v0.11.0

func (b RegprocType) Type() query.Type

Type implements the DoltgresType interface.

func (RegprocType) ValueType added in v0.11.0

func (b RegprocType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (RegprocType) Zero added in v0.11.0

func (b RegprocType) Zero() any

Zero implements the DoltgresType interface.

type RegtypeType added in v0.11.0

type RegtypeType struct{}

RegtypeType is the extended type implementation of the PostgreSQL regtype.

func (RegtypeType) Alignment added in v0.11.0

func (b RegtypeType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (RegtypeType) BaseID added in v0.11.0

func (b RegtypeType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (RegtypeType) BaseName added in v0.11.0

func (b RegtypeType) BaseName() string

BaseName implements the DoltgresType interface.

func (RegtypeType) Category added in v0.11.0

func (b RegtypeType) Category() TypeCategory

Category implements the DoltgresType interface.

func (RegtypeType) CollationCoercibility added in v0.11.0

func (b RegtypeType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (RegtypeType) Compare added in v0.11.0

func (b RegtypeType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (RegtypeType) Convert added in v0.11.0

func (b RegtypeType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (RegtypeType) DeserializeValue added in v0.11.0

func (b RegtypeType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (RegtypeType) Equals added in v0.11.0

func (b RegtypeType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (RegtypeType) FormatValue added in v0.11.0

func (b RegtypeType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (RegtypeType) GetSerializationID added in v0.11.0

func (b RegtypeType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (RegtypeType) IoInput added in v0.11.0

func (b RegtypeType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (RegtypeType) IoOutput added in v0.11.0

func (b RegtypeType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (RegtypeType) IsPreferredType added in v0.11.0

func (b RegtypeType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (RegtypeType) IsUnbounded added in v0.11.0

func (b RegtypeType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (RegtypeType) MaxSerializedWidth added in v0.11.0

func (b RegtypeType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (RegtypeType) MaxTextResponseByteLength added in v0.11.0

func (b RegtypeType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (RegtypeType) OID added in v0.11.0

func (b RegtypeType) OID() uint32

OID implements the DoltgresType interface.

func (RegtypeType) Promote added in v0.11.0

func (b RegtypeType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (RegtypeType) SQL added in v0.11.0

func (b RegtypeType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (RegtypeType) SerializeType added in v0.11.0

func (b RegtypeType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (RegtypeType) SerializeValue added in v0.11.0

func (b RegtypeType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (RegtypeType) SerializedCompare added in v0.11.0

func (b RegtypeType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (RegtypeType) String added in v0.11.0

func (b RegtypeType) String() string

String implements the DoltgresType interface.

func (RegtypeType) ToArrayType added in v0.11.0

func (b RegtypeType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (RegtypeType) Type added in v0.11.0

func (b RegtypeType) Type() query.Type

Type implements the DoltgresType interface.

func (RegtypeType) ValueType added in v0.11.0

func (b RegtypeType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (RegtypeType) Zero added in v0.11.0

func (b RegtypeType) Zero() any

Zero implements the DoltgresType interface.

type ResolvableType added in v0.14.0

type ResolvableType struct {
	Typ tree.ResolvableTypeReference
}

ResolvableType represents any non-built-in type that needs resolution at analyzer stage. It is used for domain types, and it can be used for other user-defined types we don't support yet.

func (ResolvableType) Alignment added in v0.14.0

func (b ResolvableType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (ResolvableType) BaseID added in v0.14.0

BaseID implements the DoltgresType interface.

func (ResolvableType) BaseName added in v0.14.0

func (b ResolvableType) BaseName() string

BaseName implements the DoltgresType interface.

func (ResolvableType) Category added in v0.14.0

func (b ResolvableType) Category() TypeCategory

Category implements the DoltgresType interface.

func (ResolvableType) CollationCoercibility added in v0.14.0

func (b ResolvableType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (ResolvableType) Compare added in v0.14.0

func (b ResolvableType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (ResolvableType) Convert added in v0.14.0

func (b ResolvableType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (ResolvableType) DeserializeValue added in v0.14.0

func (b ResolvableType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (ResolvableType) Equals added in v0.14.0

func (b ResolvableType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (ResolvableType) FormatValue added in v0.14.0

func (b ResolvableType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (ResolvableType) GetSerializationID added in v0.14.0

func (b ResolvableType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (ResolvableType) IoInput added in v0.14.0

func (b ResolvableType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (ResolvableType) IoOutput added in v0.14.0

func (b ResolvableType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (ResolvableType) IsPreferredType added in v0.14.0

func (b ResolvableType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (ResolvableType) IsUnbounded added in v0.14.0

func (b ResolvableType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (ResolvableType) MaxSerializedWidth added in v0.14.0

func (b ResolvableType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (ResolvableType) MaxTextResponseByteLength added in v0.14.0

func (b ResolvableType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (ResolvableType) OID added in v0.14.0

func (b ResolvableType) OID() uint32

OID implements the DoltgresType interface.

func (ResolvableType) Promote added in v0.14.0

func (b ResolvableType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (ResolvableType) SQL added in v0.14.0

func (b ResolvableType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (ResolvableType) SerializeType added in v0.14.0

func (b ResolvableType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (ResolvableType) SerializeValue added in v0.14.0

func (b ResolvableType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (ResolvableType) SerializedCompare added in v0.14.0

func (b ResolvableType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (ResolvableType) String added in v0.14.0

func (b ResolvableType) String() string

String implements the DoltgresType interface.

func (ResolvableType) ToArrayType added in v0.14.0

func (b ResolvableType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (ResolvableType) Type added in v0.14.0

func (b ResolvableType) Type() query.Type

Type implements the DoltgresType interface.

func (ResolvableType) ValueType added in v0.14.0

func (b ResolvableType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (ResolvableType) Zero added in v0.14.0

func (b ResolvableType) Zero() any

Zero implements the DoltgresType interface.

type SerializationID added in v0.5.0

type SerializationID uint16

SerializationID is an ID unique to Doltgres that can uniquely identify any type for the purposes of Serialization. These are different from OIDs, as they are unchanging and unique. If we need to add a new type that does not already have a pre-defined ID, then it must use a new number that has never been previously used.

const (
	SerializationID_Invalid               SerializationID = 0
	SerializationID_Bit                   SerializationID = 1
	SerializationID_BitArray              SerializationID = 2
	SerializationID_Bool                  SerializationID = 3
	SerializationID_BoolArray             SerializationID = 4
	SerializationID_Box                   SerializationID = 5
	SerializationID_BoxArray              SerializationID = 6
	SerializationID_Bytea                 SerializationID = 7
	SerializationID_ByteaArray            SerializationID = 8
	SerializationID_Char                  SerializationID = 9
	SerializationID_CharArray             SerializationID = 10
	SerializationID_Cidr                  SerializationID = 11
	SerializationID_CidrArray             SerializationID = 12
	SerializationID_Circle                SerializationID = 13
	SerializationID_CircleArray           SerializationID = 14
	SerializationID_Date                  SerializationID = 15
	SerializationID_DateArray             SerializationID = 16
	SerializationID_DateMultirange        SerializationID = 17
	SerializationID_DateRange             SerializationID = 18
	SerializationID_Enum                  SerializationID = 19
	SerializationID_EnumArray             SerializationID = 20
	SerializationID_Float32               SerializationID = 21
	SerializationID_Float32Array          SerializationID = 22
	SerializationID_Float64               SerializationID = 23
	SerializationID_Float64Array          SerializationID = 24
	SerializationID_Inet                  SerializationID = 25
	SerializationID_InetArray             SerializationID = 26
	SerializationID_Int16                 SerializationID = 27
	SerializationID_Int16Array            SerializationID = 28
	SerializationID_Int32                 SerializationID = 29
	SerializationID_Int32Array            SerializationID = 30
	SerializationID_Int32Multirange       SerializationID = 31
	SerializationID_Int32Range            SerializationID = 32
	SerializationID_Int64                 SerializationID = 33
	SerializationID_Int64Array            SerializationID = 34
	SerializationID_Int64Multirange       SerializationID = 35
	SerializationID_Int64Range            SerializationID = 36
	SerializationID_Interval              SerializationID = 37
	SerializationID_IntervalArray         SerializationID = 38
	SerializationID_Json                  SerializationID = 39
	SerializationID_JsonArray             SerializationID = 40
	SerializationID_JsonB                 SerializationID = 41
	SerializationID_JsonBArray            SerializationID = 42
	SerializationID_Line                  SerializationID = 43
	SerializationID_LineArray             SerializationID = 44
	SerializationID_LineSegment           SerializationID = 45
	SerializationID_LineSegmentArray      SerializationID = 46
	SerializationID_MacAddress            SerializationID = 47
	SerializationID_MacAddress8           SerializationID = 48
	SerializationID_MacAddress8Array      SerializationID = 49
	SerializationID_MacAddressArray       SerializationID = 50
	SerializationID_Money                 SerializationID = 51
	SerializationID_MoneyArray            SerializationID = 52
	SerializationID_Null                  SerializationID = 53
	SerializationID_Numeric               SerializationID = 54
	SerializationID_NumericArray          SerializationID = 55
	SerializationID_NumericMultirange     SerializationID = 56
	SerializationID_NumericRange          SerializationID = 57
	SerializationID_Path                  SerializationID = 58
	SerializationID_PathArray             SerializationID = 59
	SerializationID_Point                 SerializationID = 60
	SerializationID_PointArray            SerializationID = 61
	SerializationID_Polygon               SerializationID = 62
	SerializationID_PolygonArray          SerializationID = 63
	SerializationID_Text                  SerializationID = 64
	SerializationID_TextArray             SerializationID = 65
	SerializationID_Time                  SerializationID = 66
	SerializationID_TimeArray             SerializationID = 67
	SerializationID_TimeTZ                SerializationID = 68
	SerializationID_TimeTZArray           SerializationID = 69
	SerializationID_Timestamp             SerializationID = 70
	SerializationID_TimestampArray        SerializationID = 71
	SerializationID_TimestampMultirange   SerializationID = 72
	SerializationID_TimestampRange        SerializationID = 73
	SerializationID_TimestampTZ           SerializationID = 74
	SerializationID_TimestampTZArray      SerializationID = 75
	SerializationID_TimestampTZMultirange SerializationID = 76
	SerializationID_TimestampTZRange      SerializationID = 77
	SerializationID_TsQuery               SerializationID = 78
	SerializationID_TsQueryArray          SerializationID = 79
	SerializationID_TsVector              SerializationID = 80
	SerializationID_TsVectorArray         SerializationID = 81
	SerializationID_Uuid                  SerializationID = 82
	SerializationID_UuidArray             SerializationID = 83
	SerializationID_VarBit                SerializationID = 84
	SerializationID_VarBitArray           SerializationID = 85
	SerializationID_VarChar               SerializationID = 86
	SerializationID_VarCharArray          SerializationID = 87
	SerializationID_Xml                   SerializationID = 88
	SerializationID_XmlArray              SerializationID = 89
	SerializationID_Name                  SerializationID = 90
	SerializationID_NameArray             SerializationID = 91
	SerializationID_Oid                   SerializationID = 92
	SerializationID_OidArray              SerializationID = 93
	SerializationID_Xid                   SerializationID = 94
	SerializationID_XidArray              SerializationID = 95
	SerializationID_InternalChar          SerializationID = 96
	SerializationID_InternalCharArray     SerializationID = 97
	SerializationId_Domain                SerializationID = 98
)

These are declared as constant numbers to signify their intent. Under no circumstances should we use iota, as that runs the risk of an accidental reordering potentially causing data loss. In addition, numbers for pre-existing IDs should never be changed.

func SerializationIDFromBytes added in v0.5.0

func SerializationIDFromBytes(b []byte) (SerializationID, uint16)

SerializationIDFromBytes reads a SerializationID and version from the given byte slice. The slice must have a length of at least 4 bytes. This function does not perform any validation, and is merely a convenience to ensure that the ID is read correctly.

func (SerializationID) ToByteSlice added in v0.5.0

func (id SerializationID) ToByteSlice(version uint16) []byte

ToByteSlice returns the ID as a byte slice.

type TextType added in v0.6.0

type TextType struct{}

TextType is the extended type implementation of the PostgreSQL text.

func (TextType) Alignment added in v0.10.0

func (b TextType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (TextType) BaseID added in v0.6.0

func (b TextType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (TextType) BaseName added in v0.10.0

func (b TextType) BaseName() string

BaseName implements the DoltgresType interface.

func (TextType) Category added in v0.10.0

func (b TextType) Category() TypeCategory

Category implements the DoltgresType interface.

func (TextType) CollationCoercibility added in v0.6.0

func (b TextType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (TextType) Compare added in v0.6.0

func (b TextType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (TextType) Convert added in v0.6.0

func (b TextType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (TextType) DeserializeValue added in v0.6.0

func (b TextType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (TextType) Equals added in v0.6.0

func (b TextType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (TextType) FormatValue added in v0.6.0

func (b TextType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (TextType) GetSerializationID added in v0.6.0

func (b TextType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (TextType) IoInput added in v0.8.0

func (b TextType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (TextType) IoOutput added in v0.8.0

func (b TextType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (TextType) IsPreferredType added in v0.10.0

func (b TextType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (TextType) IsUnbounded added in v0.6.0

func (b TextType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (TextType) MaxSerializedWidth added in v0.6.0

func (b TextType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (TextType) MaxTextResponseByteLength added in v0.6.0

func (b TextType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (TextType) OID added in v0.6.0

func (b TextType) OID() uint32

OID implements the DoltgresType interface.

func (TextType) Promote added in v0.6.0

func (b TextType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (TextType) SQL added in v0.6.0

func (b TextType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (TextType) SerializeType added in v0.6.0

func (b TextType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (TextType) SerializeValue added in v0.6.0

func (b TextType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (TextType) SerializedCompare added in v0.6.0

func (b TextType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (TextType) String added in v0.6.0

func (b TextType) String() string

String implements the DoltgresType interface.

func (TextType) ToArrayType added in v0.6.0

func (b TextType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (TextType) Type added in v0.6.0

func (b TextType) Type() query.Type

Type implements the DoltgresType interface.

func (TextType) ValueType added in v0.6.0

func (b TextType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (TextType) Zero added in v0.6.0

func (b TextType) Zero() any

Zero implements the DoltgresType interface.

type TimeTZType added in v0.6.0

type TimeTZType struct {
	// TODO: implement precision
	Precision int8
}

TimeTZType is the extended type implementation of the PostgreSQL time with time zone.

func (TimeTZType) Alignment added in v0.10.0

func (b TimeTZType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (TimeTZType) BaseID added in v0.6.0

func (b TimeTZType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (TimeTZType) BaseName added in v0.10.0

func (b TimeTZType) BaseName() string

BaseName implements the DoltgresType interface.

func (TimeTZType) Category added in v0.10.0

func (b TimeTZType) Category() TypeCategory

Category implements the DoltgresType interface.

func (TimeTZType) CollationCoercibility added in v0.6.0

func (b TimeTZType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (TimeTZType) Compare added in v0.6.0

func (b TimeTZType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (TimeTZType) Convert added in v0.6.0

func (b TimeTZType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (TimeTZType) DeserializeValue added in v0.6.0

func (b TimeTZType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (TimeTZType) Equals added in v0.6.0

func (b TimeTZType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (TimeTZType) FormatValue added in v0.6.0

func (b TimeTZType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (TimeTZType) GetSerializationID added in v0.6.0

func (b TimeTZType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (TimeTZType) IoInput added in v0.8.0

func (b TimeTZType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (TimeTZType) IoOutput added in v0.8.0

func (b TimeTZType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (TimeTZType) IsPreferredType added in v0.10.0

func (b TimeTZType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (TimeTZType) IsUnbounded added in v0.6.0

func (b TimeTZType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (TimeTZType) MaxSerializedWidth added in v0.6.0

func (b TimeTZType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (TimeTZType) MaxTextResponseByteLength added in v0.6.0

func (b TimeTZType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (TimeTZType) OID added in v0.6.0

func (b TimeTZType) OID() uint32

OID implements the DoltgresType interface.

func (TimeTZType) Promote added in v0.6.0

func (b TimeTZType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (TimeTZType) SQL added in v0.6.0

func (b TimeTZType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (TimeTZType) SerializeType added in v0.6.0

func (b TimeTZType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (TimeTZType) SerializeValue added in v0.6.0

func (b TimeTZType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (TimeTZType) SerializedCompare added in v0.6.0

func (b TimeTZType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (TimeTZType) String added in v0.6.0

func (b TimeTZType) String() string

String implements the DoltgresType interface.

func (TimeTZType) ToArrayType added in v0.6.0

func (b TimeTZType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (TimeTZType) Type added in v0.6.0

func (b TimeTZType) Type() query.Type

Type implements the DoltgresType interface.

func (TimeTZType) ValueType added in v0.6.0

func (b TimeTZType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (TimeTZType) Zero added in v0.6.0

func (b TimeTZType) Zero() any

Zero implements the DoltgresType interface.

type TimeType added in v0.6.0

type TimeType struct {
	// TODO: implement precision
	Precision int8
}

TimeType is the extended type implementation of the PostgreSQL time without time zone.

func (TimeType) Alignment added in v0.10.0

func (b TimeType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (TimeType) BaseID added in v0.6.0

func (b TimeType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (TimeType) BaseName added in v0.10.0

func (b TimeType) BaseName() string

BaseName implements the DoltgresType interface.

func (TimeType) Category added in v0.10.0

func (b TimeType) Category() TypeCategory

Category implements the DoltgresType interface.

func (TimeType) CollationCoercibility added in v0.6.0

func (b TimeType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (TimeType) Compare added in v0.6.0

func (b TimeType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (TimeType) Convert added in v0.6.0

func (b TimeType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (TimeType) DeserializeValue added in v0.6.0

func (b TimeType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (TimeType) Equals added in v0.6.0

func (b TimeType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (TimeType) FormatValue added in v0.6.0

func (b TimeType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (TimeType) GetSerializationID added in v0.6.0

func (b TimeType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (TimeType) IoInput added in v0.8.0

func (b TimeType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (TimeType) IoOutput added in v0.8.0

func (b TimeType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (TimeType) IsPreferredType added in v0.10.0

func (b TimeType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (TimeType) IsUnbounded added in v0.6.0

func (b TimeType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (TimeType) MaxSerializedWidth added in v0.6.0

func (b TimeType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (TimeType) MaxTextResponseByteLength added in v0.6.0

func (b TimeType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (TimeType) OID added in v0.6.0

func (b TimeType) OID() uint32

OID implements the DoltgresType interface.

func (TimeType) Promote added in v0.6.0

func (b TimeType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (TimeType) SQL added in v0.6.0

func (b TimeType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (TimeType) SerializeType added in v0.6.0

func (b TimeType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (TimeType) SerializeValue added in v0.6.0

func (b TimeType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (TimeType) SerializedCompare added in v0.6.0

func (b TimeType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (TimeType) String added in v0.6.0

func (b TimeType) String() string

String implements the DoltgresType interface.

func (TimeType) ToArrayType added in v0.6.0

func (b TimeType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (TimeType) Type added in v0.6.0

func (b TimeType) Type() query.Type

Type implements the DoltgresType interface.

func (TimeType) ValueType added in v0.6.0

func (b TimeType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (TimeType) Zero added in v0.6.0

func (b TimeType) Zero() any

Zero implements the DoltgresType interface.

type TimestampTZType added in v0.6.0

type TimestampTZType struct {
	// TODO: implement precision
	Precision int8
}

TimestampTZType is the extended type implementation of the PostgreSQL timestamp with time zone.

func (TimestampTZType) Alignment added in v0.10.0

func (b TimestampTZType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (TimestampTZType) BaseID added in v0.6.0

BaseID implements the DoltgresType interface.

func (TimestampTZType) BaseName added in v0.10.0

func (b TimestampTZType) BaseName() string

BaseName implements the DoltgresType interface.

func (TimestampTZType) Category added in v0.10.0

func (b TimestampTZType) Category() TypeCategory

Category implements the DoltgresType interface.

func (TimestampTZType) CollationCoercibility added in v0.6.0

func (b TimestampTZType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (TimestampTZType) Compare added in v0.6.0

func (b TimestampTZType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (TimestampTZType) Convert added in v0.6.0

func (b TimestampTZType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (TimestampTZType) DeserializeValue added in v0.6.0

func (b TimestampTZType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (TimestampTZType) Equals added in v0.6.0

func (b TimestampTZType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (TimestampTZType) FormatValue added in v0.6.0

func (b TimestampTZType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (TimestampTZType) GetSerializationID added in v0.6.0

func (b TimestampTZType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (TimestampTZType) IoInput added in v0.8.0

func (b TimestampTZType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (TimestampTZType) IoOutput added in v0.8.0

func (b TimestampTZType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (TimestampTZType) IsPreferredType added in v0.10.0

func (b TimestampTZType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (TimestampTZType) IsUnbounded added in v0.6.0

func (b TimestampTZType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (TimestampTZType) MaxSerializedWidth added in v0.6.0

func (b TimestampTZType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (TimestampTZType) MaxTextResponseByteLength added in v0.6.0

func (b TimestampTZType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (TimestampTZType) OID added in v0.6.0

func (b TimestampTZType) OID() uint32

OID implements the DoltgresType interface.

func (TimestampTZType) Promote added in v0.6.0

func (b TimestampTZType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (TimestampTZType) SQL added in v0.6.0

func (b TimestampTZType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (TimestampTZType) SerializeType added in v0.6.0

func (b TimestampTZType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (TimestampTZType) SerializeValue added in v0.6.0

func (b TimestampTZType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (TimestampTZType) SerializedCompare added in v0.6.0

func (b TimestampTZType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (TimestampTZType) String added in v0.6.0

func (b TimestampTZType) String() string

String implements the DoltgresType interface.

func (TimestampTZType) ToArrayType added in v0.6.0

func (b TimestampTZType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (TimestampTZType) Type added in v0.6.0

func (b TimestampTZType) Type() query.Type

Type implements the DoltgresType interface.

func (TimestampTZType) ValueType added in v0.6.0

func (b TimestampTZType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (TimestampTZType) Zero added in v0.6.0

func (b TimestampTZType) Zero() any

Zero implements the DoltgresType interface.

type TimestampType added in v0.6.0

type TimestampType struct {
	// TODO: implement precision
	Precision int8
}

TimestampType is the extended type implementation of the PostgreSQL timestamp without time zone.

func (TimestampType) Alignment added in v0.10.0

func (b TimestampType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (TimestampType) BaseID added in v0.6.0

func (b TimestampType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (TimestampType) BaseName added in v0.10.0

func (b TimestampType) BaseName() string

BaseName implements the DoltgresType interface.

func (TimestampType) Category added in v0.10.0

func (b TimestampType) Category() TypeCategory

Category implements the DoltgresType interface.

func (TimestampType) CollationCoercibility added in v0.6.0

func (b TimestampType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (TimestampType) Compare added in v0.6.0

func (b TimestampType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (TimestampType) Convert added in v0.6.0

func (b TimestampType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (TimestampType) DeserializeValue added in v0.6.0

func (b TimestampType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (TimestampType) Equals added in v0.6.0

func (b TimestampType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (TimestampType) FormatValue added in v0.6.0

func (b TimestampType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (TimestampType) GetSerializationID added in v0.6.0

func (b TimestampType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (TimestampType) IoInput added in v0.8.0

func (b TimestampType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (TimestampType) IoOutput added in v0.8.0

func (b TimestampType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (TimestampType) IsPreferredType added in v0.10.0

func (b TimestampType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (TimestampType) IsUnbounded added in v0.6.0

func (b TimestampType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (TimestampType) MaxSerializedWidth added in v0.6.0

func (b TimestampType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (TimestampType) MaxTextResponseByteLength added in v0.6.0

func (b TimestampType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (TimestampType) OID added in v0.6.0

func (b TimestampType) OID() uint32

OID implements the DoltgresType interface.

func (TimestampType) Promote added in v0.6.0

func (b TimestampType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (TimestampType) SQL added in v0.6.0

func (b TimestampType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (TimestampType) SerializeType added in v0.6.0

func (b TimestampType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (TimestampType) SerializeValue added in v0.6.0

func (b TimestampType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (TimestampType) SerializedCompare added in v0.6.0

func (b TimestampType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (TimestampType) String added in v0.6.0

func (b TimestampType) String() string

String implements the DoltgresType interface.

func (TimestampType) ToArrayType added in v0.6.0

func (b TimestampType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (TimestampType) Type added in v0.6.0

func (b TimestampType) Type() query.Type

Type implements the DoltgresType interface.

func (TimestampType) ValueType added in v0.6.0

func (b TimestampType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (TimestampType) Zero added in v0.6.0

func (b TimestampType) Zero() any

Zero implements the DoltgresType interface.

type Type added in v0.14.0

type Type struct {
	Oid           uint32
	Name          string
	Schema        string // TODO: should be `uint32`.
	Owner         string // TODO: should be `uint32`.
	Length        int16
	PassedByVal   bool
	TypType       TypeType
	TypCategory   TypeCategory
	IsPreferred   bool
	IsDefined     bool
	Delimiter     string
	RelID         uint32 // for Composite types
	SubscriptFunc string
	Elem          uint32
	Array         uint32
	InputFunc     string
	OutputFunc    string
	ReceiveFunc   string
	SendFunc      string
	ModInFunc     string
	ModOutFunc    string
	AnalyzeFunc   string
	Align         TypeAlignment
	Storage       TypeStorage
	NotNull       bool   // for Domain types
	BaseTypeOID   uint32 // for Domain types
	TypMod        int32  // for Domain types
	NDims         int32  // for Domain types
	Collation     uint32
	DefaulBin     string // for Domain types
	Default       string
	Acl           string                 // TODO: list of privileges
	Checks        []*sql.CheckDefinition // TODO: this is not part of `pg_type` instead `pg_constraint` for Domain types.
}

Type represents a single type.

func NewDomainType added in v0.14.0

func NewDomainType(
	ctx *sql.Context,
	schema string,
	name string,
	asType DoltgresType,
	defaultExpr string,
	notNull bool,
	checks []*sql.CheckDefinition,
	owner string,
) (*Type, error)

NewDomainType creates new instance of domain Type.

type TypeAlignment added in v0.10.0

type TypeAlignment string

TypeAlignment represents the alignment required when storing a value of this type.

const (
	TypeAlignment_Char   TypeAlignment = "c"
	TypeAlignment_Short  TypeAlignment = "s"
	TypeAlignment_Int    TypeAlignment = "i"
	TypeAlignment_Double TypeAlignment = "d"
)

type TypeCategory added in v0.8.0

type TypeCategory string

TypeCategory represents the type category that a type belongs to. These are used by Postgres to group similar types for parameter resolution, operator resolution, etc.

const (
	TypeCategory_ArrayTypes          TypeCategory = "A"
	TypeCategory_BooleanTypes        TypeCategory = "B"
	TypeCategory_CompositeTypes      TypeCategory = "C"
	TypeCategory_DateTimeTypes       TypeCategory = "D"
	TypeCategory_EnumTypes           TypeCategory = "E"
	TypeCategory_GeometricTypes      TypeCategory = "G"
	TypeCategory_NetworkAddressTypes TypeCategory = "I"
	TypeCategory_NumericTypes        TypeCategory = "N"
	TypeCategory_PseudoTypes         TypeCategory = "P"
	TypeCategory_RangeTypes          TypeCategory = "R"
	TypeCategory_StringTypes         TypeCategory = "S"
	TypeCategory_TimespanTypes       TypeCategory = "T"
	TypeCategory_UserDefinedTypes    TypeCategory = "U"
	TypeCategory_BitStringTypes      TypeCategory = "V"
	TypeCategory_UnknownTypes        TypeCategory = "X"
	TypeCategory_InternalUseTypes    TypeCategory = "Z"
)

func (TypeCategory) IsPreferredType added in v0.10.0

func (cat TypeCategory) IsPreferredType(p DoltgresTypeBaseID) bool

IsPreferredType returns whether the type passed is a preferred type for this TypeCategory.

type TypeStorage added in v0.14.0

type TypeStorage string

TypeStorage represents the storage strategy for storing `varlena` (typlen = -1) types.

const (
	TypeStorage_Plain    TypeStorage = "p"
	TypeStorage_External TypeStorage = "e"
	TypeStorage_Main     TypeStorage = "m"
	TypeStorage_Extended TypeStorage = "x"
)

type TypeType added in v0.14.0

type TypeType string

TypeType represents the type of types that can be created/used. This includes 'base', 'composite', 'domain', 'enum', 'shell', 'range' and 'multirange'.

const (
	TypeType_Base       TypeType = "b"
	TypeType_Composite  TypeType = "c"
	TypeType_Domain     TypeType = "d"
	TypeType_Enum       TypeType = "e"
	TypeType_Pseudo     TypeType = "p"
	TypeType_Range      TypeType = "r"
	TypeType_MultiRange TypeType = "m"
)

type UnknownType added in v0.6.0

type UnknownType struct{}

UnknownType is the extended type implementation of the PostgreSQL unknown type.

func (UnknownType) Alignment added in v0.10.0

func (u UnknownType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (UnknownType) BaseID added in v0.6.0

func (u UnknownType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (UnknownType) BaseName added in v0.10.0

func (u UnknownType) BaseName() string

BaseName implements the DoltgresType interface.

func (UnknownType) BaseType added in v0.6.0

func (u UnknownType) BaseType() DoltgresType

BaseType implements the DoltgresArrayType interface.

func (UnknownType) Category added in v0.10.0

func (u UnknownType) Category() TypeCategory

Category implements the DoltgresType interface.

func (UnknownType) CollationCoercibility added in v0.6.0

func (u UnknownType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (UnknownType) Compare added in v0.6.0

func (u UnknownType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (UnknownType) Convert added in v0.6.0

func (u UnknownType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (UnknownType) DeserializeValue added in v0.6.0

func (u UnknownType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (UnknownType) Equals added in v0.6.0

func (u UnknownType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (UnknownType) FormatValue added in v0.6.0

func (u UnknownType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (UnknownType) GetSerializationID added in v0.6.0

func (u UnknownType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (UnknownType) IoInput added in v0.8.0

func (u UnknownType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (UnknownType) IoOutput added in v0.8.0

func (u UnknownType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (UnknownType) IsPreferredType added in v0.10.0

func (b UnknownType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (UnknownType) IsUnbounded added in v0.6.0

func (u UnknownType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (UnknownType) MaxSerializedWidth added in v0.6.0

func (u UnknownType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (UnknownType) MaxTextResponseByteLength added in v0.6.0

func (u UnknownType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (UnknownType) OID added in v0.6.0

func (u UnknownType) OID() uint32

OID implements the DoltgresType interface.

func (UnknownType) Promote added in v0.6.0

func (u UnknownType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (UnknownType) SQL added in v0.6.0

func (u UnknownType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (UnknownType) SerializeType added in v0.6.0

func (u UnknownType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (UnknownType) SerializeValue added in v0.6.0

func (u UnknownType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (UnknownType) SerializedCompare added in v0.6.0

func (u UnknownType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (UnknownType) String added in v0.6.0

func (u UnknownType) String() string

String implements the DoltgresType interface.

func (UnknownType) ToArrayType added in v0.6.0

func (u UnknownType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (UnknownType) Type added in v0.6.0

func (u UnknownType) Type() query.Type

Type implements the DoltgresType interface.

func (UnknownType) ValueType added in v0.6.0

func (u UnknownType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (UnknownType) Zero added in v0.6.0

func (u UnknownType) Zero() any

Zero implements the DoltgresType interface.

type UuidType

type UuidType struct{}

UuidType is the extended type implementation of the PostgreSQL UUID.

func (UuidType) Alignment added in v0.10.0

func (b UuidType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (UuidType) BaseID added in v0.5.0

func (b UuidType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (UuidType) BaseName added in v0.10.0

func (b UuidType) BaseName() string

BaseName implements the DoltgresType interface.

func (UuidType) Category added in v0.10.0

func (b UuidType) Category() TypeCategory

Category implements the DoltgresType interface.

func (UuidType) CollationCoercibility

func (b UuidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (UuidType) Compare

func (b UuidType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (UuidType) Convert

func (b UuidType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (UuidType) DeserializeValue

func (b UuidType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (UuidType) Equals

func (b UuidType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (UuidType) FormatValue

func (b UuidType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (UuidType) GetSerializationID added in v0.6.0

func (b UuidType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (UuidType) IoInput added in v0.8.0

func (b UuidType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (UuidType) IoOutput added in v0.8.0

func (b UuidType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (UuidType) IsPreferredType added in v0.10.0

func (b UuidType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (UuidType) IsUnbounded added in v0.6.0

func (b UuidType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (UuidType) MaxSerializedWidth

func (b UuidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (UuidType) MaxTextResponseByteLength

func (b UuidType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (UuidType) OID added in v0.5.0

func (b UuidType) OID() uint32

OID implements the DoltgresType interface.

func (UuidType) Promote

func (b UuidType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (UuidType) SQL

func (b UuidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (UuidType) SerializeType added in v0.6.0

func (b UuidType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (UuidType) SerializeValue

func (b UuidType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (UuidType) SerializedCompare

func (b UuidType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (UuidType) String

func (b UuidType) String() string

String implements the DoltgresType interface.

func (UuidType) ToArrayType added in v0.6.0

func (b UuidType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (UuidType) Type

func (b UuidType) Type() query.Type

Type implements the DoltgresType interface.

func (UuidType) ValueType

func (b UuidType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (UuidType) Zero

func (b UuidType) Zero() any

Zero implements the DoltgresType interface.

type VarCharType added in v0.5.0

type VarCharType struct {
	// MaxChars represents the maximum number of characters that the type may hold.
	// When this is zero, we treat it as completely unbounded (which is still limited by the field size limit).
	MaxChars uint32
}

VarCharType is the extended type implementation of the PostgreSQL varchar.

func (VarCharType) Alignment added in v0.10.0

func (b VarCharType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (VarCharType) BaseID added in v0.5.0

func (b VarCharType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (VarCharType) BaseName added in v0.10.0

func (b VarCharType) BaseName() string

BaseName implements the DoltgresType interface.

func (VarCharType) Category added in v0.10.0

func (b VarCharType) Category() TypeCategory

Category implements the DoltgresType interface.

func (VarCharType) CharacterSet added in v0.11.1

func (b VarCharType) CharacterSet() sql.CharacterSetID

CharacterSet implements the sql.StringType interface.

func (VarCharType) Collation added in v0.11.1

func (b VarCharType) Collation() sql.CollationID

Collation implements the sql.StringType interface.

func (VarCharType) CollationCoercibility added in v0.5.0

func (b VarCharType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (VarCharType) Compare added in v0.5.0

func (b VarCharType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (VarCharType) Convert added in v0.5.0

func (b VarCharType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (VarCharType) DeserializeValue added in v0.5.0

func (b VarCharType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (VarCharType) Equals added in v0.5.0

func (b VarCharType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (VarCharType) FormatValue added in v0.5.0

func (b VarCharType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (VarCharType) GetSerializationID added in v0.6.0

func (b VarCharType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (VarCharType) IoInput added in v0.8.0

func (b VarCharType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (VarCharType) IoOutput added in v0.8.0

func (b VarCharType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (VarCharType) IsPreferredType added in v0.10.0

func (b VarCharType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (VarCharType) IsUnbounded added in v0.6.0

func (b VarCharType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (VarCharType) Length added in v0.5.0

func (b VarCharType) Length() int64

Length implements the sql.StringType interface.

func (VarCharType) MaxByteLength added in v0.11.1

func (b VarCharType) MaxByteLength() int64

MaxByteLength implements the sql.StringType interface.

func (VarCharType) MaxCharacterLength added in v0.11.1

func (b VarCharType) MaxCharacterLength() int64

MaxCharacterLength implements the sql.StringType interface.

func (VarCharType) MaxSerializedWidth added in v0.5.0

func (b VarCharType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (VarCharType) MaxTextResponseByteLength added in v0.5.0

func (b VarCharType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (VarCharType) OID added in v0.5.0

func (b VarCharType) OID() uint32

OID implements the DoltgresType interface.

func (VarCharType) Promote added in v0.5.0

func (b VarCharType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (VarCharType) SQL added in v0.5.0

func (b VarCharType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (VarCharType) SerializeType added in v0.6.0

func (b VarCharType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (VarCharType) SerializeValue added in v0.5.0

func (b VarCharType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (VarCharType) SerializedCompare added in v0.5.0

func (b VarCharType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (VarCharType) String added in v0.5.0

func (b VarCharType) String() string

String implements the DoltgresType interface.

func (VarCharType) ToArrayType added in v0.6.0

func (b VarCharType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (VarCharType) Type added in v0.5.0

func (b VarCharType) Type() query.Type

Type implements the DoltgresType interface.

func (VarCharType) ValueType added in v0.5.0

func (b VarCharType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (VarCharType) Zero added in v0.5.0

func (b VarCharType) Zero() any

Zero implements the DoltgresType interface.

type XidType added in v0.7.0

type XidType struct{}

XidType is the extended type implementation of the PostgreSQL xid.

func (XidType) Alignment added in v0.10.0

func (b XidType) Alignment() TypeAlignment

Alignment implements the DoltgresType interface.

func (XidType) BaseID added in v0.7.0

func (b XidType) BaseID() DoltgresTypeBaseID

BaseID implements the DoltgresType interface.

func (XidType) BaseName added in v0.10.0

func (b XidType) BaseName() string

BaseName implements the DoltgresType interface.

func (XidType) Category added in v0.10.0

func (b XidType) Category() TypeCategory

Category implements the DoltgresType interface.

func (XidType) CollationCoercibility added in v0.7.0

func (b XidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the DoltgresType interface.

func (XidType) Compare added in v0.7.0

func (b XidType) Compare(v1 any, v2 any) (int, error)

Compare implements the DoltgresType interface.

func (XidType) Convert added in v0.7.0

func (b XidType) Convert(val any) (any, sql.ConvertInRange, error)

Convert implements the DoltgresType interface.

func (XidType) DeserializeValue added in v0.7.0

func (b XidType) DeserializeValue(val []byte) (any, error)

DeserializeValue implements the DoltgresType interface.

func (XidType) Equals added in v0.7.0

func (b XidType) Equals(otherType sql.Type) bool

Equals implements the DoltgresType interface.

func (XidType) FormatValue added in v0.7.0

func (b XidType) FormatValue(val any) (string, error)

FormatValue implements the DoltgresType interface.

func (XidType) GetSerializationID added in v0.7.0

func (b XidType) GetSerializationID() SerializationID

GetSerializationID implements the DoltgresType interface.

func (XidType) IoInput added in v0.8.0

func (b XidType) IoInput(ctx *sql.Context, input string) (any, error)

IoInput implements the DoltgresType interface.

func (XidType) IoOutput added in v0.8.0

func (b XidType) IoOutput(ctx *sql.Context, output any) (string, error)

IoOutput implements the DoltgresType interface.

func (XidType) IsPreferredType added in v0.10.0

func (b XidType) IsPreferredType() bool

IsPreferredType implements the DoltgresType interface.

func (XidType) IsUnbounded added in v0.7.0

func (b XidType) IsUnbounded() bool

IsUnbounded implements the DoltgresType interface.

func (XidType) MaxSerializedWidth added in v0.7.0

func (b XidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth

MaxSerializedWidth implements the DoltgresType interface.

func (XidType) MaxTextResponseByteLength added in v0.7.0

func (b XidType) MaxTextResponseByteLength(ctx *sql.Context) uint32

MaxTextResponseByteLength implements the DoltgresType interface.

func (XidType) OID added in v0.7.0

func (b XidType) OID() uint32

OID implements the DoltgresType interface.

func (XidType) Promote added in v0.7.0

func (b XidType) Promote() sql.Type

Promote implements the DoltgresType interface.

func (XidType) SQL added in v0.7.0

func (b XidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)

SQL implements the DoltgresType interface.

func (XidType) SerializeType added in v0.7.0

func (b XidType) SerializeType() ([]byte, error)

SerializeType implements the DoltgresType interface.

func (XidType) SerializeValue added in v0.7.0

func (b XidType) SerializeValue(val any) ([]byte, error)

SerializeValue implements the DoltgresType interface.

func (XidType) SerializedCompare added in v0.7.0

func (b XidType) SerializedCompare(v1 []byte, v2 []byte) (int, error)

SerializedCompare implements the DoltgresType interface.

func (XidType) String added in v0.7.0

func (b XidType) String() string

String implements the DoltgresType interface.

func (XidType) ToArrayType added in v0.7.0

func (b XidType) ToArrayType() DoltgresArrayType

ToArrayType implements the DoltgresType interface.

func (XidType) Type added in v0.7.0

func (b XidType) Type() query.Type

Type implements the DoltgresType interface.

func (XidType) ValueType added in v0.7.0

func (b XidType) ValueType() reflect.Type

ValueType implements the DoltgresType interface.

func (XidType) Zero added in v0.7.0

func (b XidType) Zero() any

Zero implements the DoltgresType interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL