Documentation ¶
Index ¶
- Constants
- Variables
- func DeserializeType(serializedType []byte) (types.ExtendedType, error)
- func InitBaseIDs()
- func MustSerializeType(extendedType types.ExtendedType) []byte
- func SerializeType(extendedType types.ExtendedType) ([]byte, error)
- type AnyArrayType
- func (aa AnyArrayType) BaseID() DoltgresTypeBaseID
- func (aa AnyArrayType) BaseType() DoltgresType
- func (aa AnyArrayType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (aa AnyArrayType) Compare(v1 any, v2 any) (int, error)
- func (aa AnyArrayType) Convert(val any) (any, sql.ConvertInRange, error)
- func (aa AnyArrayType) DeserializeValue(val []byte) (any, error)
- func (aa AnyArrayType) Equals(otherType sql.Type) bool
- func (aa AnyArrayType) FormatSerializedValue(val []byte) (string, error)
- func (aa AnyArrayType) FormatValue(val any) (string, error)
- func (aa AnyArrayType) GetSerializationID() SerializationID
- func (aa AnyArrayType) IsUnbounded() bool
- func (aa AnyArrayType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (aa AnyArrayType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (aa AnyArrayType) OID() uint32
- func (aa AnyArrayType) Promote() sql.Type
- func (aa AnyArrayType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (aa AnyArrayType) SerializeType() ([]byte, error)
- func (aa AnyArrayType) SerializeValue(val any) ([]byte, error)
- func (aa AnyArrayType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (aa AnyArrayType) String() string
- func (aa AnyArrayType) ToArrayType() DoltgresArrayType
- func (aa AnyArrayType) Type() query.Type
- func (aa AnyArrayType) ValueType() reflect.Type
- func (aa AnyArrayType) Zero() any
- type BoolType
- func (b BoolType) BaseID() DoltgresTypeBaseID
- func (b BoolType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b BoolType) Compare(v1 any, v2 any) (int, error)
- func (b BoolType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b BoolType) DeserializeValue(val []byte) (any, error)
- func (b BoolType) Equals(otherType sql.Type) bool
- func (b BoolType) FormatSerializedValue(val []byte) (string, error)
- func (b BoolType) FormatValue(val any) (string, error)
- func (b BoolType) GetSerializationID() SerializationID
- func (b BoolType) IsUnbounded() bool
- func (b BoolType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b BoolType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b BoolType) OID() uint32
- func (b BoolType) Promote() sql.Type
- func (b BoolType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b BoolType) SerializeType() ([]byte, error)
- func (b BoolType) SerializeValue(val any) ([]byte, error)
- func (b BoolType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b BoolType) String() string
- func (b BoolType) ToArrayType() DoltgresArrayType
- func (b BoolType) Type() query.Type
- func (b BoolType) ValueType() reflect.Type
- func (b BoolType) Zero() any
- type ByteaType
- func (b ByteaType) BaseID() DoltgresTypeBaseID
- func (b ByteaType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b ByteaType) Compare(v1 any, v2 any) (int, error)
- func (b ByteaType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b ByteaType) DeserializeValue(val []byte) (any, error)
- func (b ByteaType) Equals(otherType sql.Type) bool
- func (b ByteaType) FormatSerializedValue(val []byte) (string, error)
- func (b ByteaType) FormatValue(val any) (string, error)
- func (b ByteaType) GetSerializationID() SerializationID
- func (b ByteaType) IsUnbounded() bool
- func (b ByteaType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b ByteaType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b ByteaType) OID() uint32
- func (b ByteaType) Promote() sql.Type
- func (b ByteaType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b ByteaType) SerializeType() ([]byte, error)
- func (b ByteaType) SerializeValue(val any) ([]byte, error)
- func (b ByteaType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b ByteaType) String() string
- func (b ByteaType) ToArrayType() DoltgresArrayType
- func (b ByteaType) Type() query.Type
- func (b ByteaType) ValueType() reflect.Type
- func (b ByteaType) Zero() any
- type CharType
- func (b CharType) BaseID() DoltgresTypeBaseID
- func (b CharType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b CharType) Compare(v1 any, v2 any) (int, error)
- func (b CharType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b CharType) DeserializeValue(val []byte) (any, error)
- func (b CharType) Equals(otherType sql.Type) bool
- func (b CharType) FormatSerializedValue(val []byte) (string, error)
- func (b CharType) FormatValue(val any) (string, error)
- func (b CharType) GetSerializationID() SerializationID
- func (b CharType) IsUnbounded() bool
- func (b CharType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b CharType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b CharType) OID() uint32
- func (b CharType) Promote() sql.Type
- func (b CharType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b CharType) SerializeType() ([]byte, error)
- func (b CharType) SerializeValue(val any) ([]byte, error)
- func (b CharType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b CharType) String() string
- func (b CharType) ToArrayType() DoltgresArrayType
- func (b CharType) Type() query.Type
- func (b CharType) ValueType() reflect.Type
- func (b CharType) Zero() any
- type DateType
- func (b DateType) BaseID() DoltgresTypeBaseID
- func (b DateType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b DateType) Compare(v1 any, v2 any) (int, error)
- func (b DateType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b DateType) DeserializeValue(val []byte) (any, error)
- func (b DateType) Equals(otherType sql.Type) bool
- func (b DateType) FormatSerializedValue(val []byte) (string, error)
- func (b DateType) FormatValue(val any) (string, error)
- func (b DateType) GetSerializationID() SerializationID
- func (b DateType) IsUnbounded() bool
- func (b DateType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b DateType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b DateType) OID() uint32
- func (b DateType) Promote() sql.Type
- func (b DateType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b DateType) SerializeType() ([]byte, error)
- func (b DateType) SerializeValue(val any) ([]byte, error)
- func (b DateType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b DateType) String() string
- func (b DateType) ToArrayType() DoltgresArrayType
- func (b DateType) Type() query.Type
- func (b DateType) ValueType() reflect.Type
- func (b DateType) Zero() any
- type DoltgresArrayType
- type DoltgresType
- type DoltgresTypeBaseID
- type Float32Type
- func (b Float32Type) BaseID() DoltgresTypeBaseID
- func (b Float32Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b Float32Type) Compare(v1 any, v2 any) (int, error)
- func (b Float32Type) Convert(val any) (any, sql.ConvertInRange, error)
- func (b Float32Type) DeserializeValue(val []byte) (any, error)
- func (b Float32Type) Equals(otherType sql.Type) bool
- func (b Float32Type) FormatSerializedValue(val []byte) (string, error)
- func (b Float32Type) FormatValue(val any) (string, error)
- func (b Float32Type) GetSerializationID() SerializationID
- func (b Float32Type) IsUnbounded() bool
- func (b Float32Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b Float32Type) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b Float32Type) OID() uint32
- func (b Float32Type) Promote() sql.Type
- func (b Float32Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b Float32Type) SerializeType() ([]byte, error)
- func (b Float32Type) SerializeValue(val any) ([]byte, error)
- func (b Float32Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b Float32Type) String() string
- func (b Float32Type) ToArrayType() DoltgresArrayType
- func (b Float32Type) Type() query.Type
- func (b Float32Type) ValueType() reflect.Type
- func (b Float32Type) Zero() any
- type Float64Type
- func (b Float64Type) BaseID() DoltgresTypeBaseID
- func (b Float64Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b Float64Type) Compare(v1 any, v2 any) (int, error)
- func (b Float64Type) Convert(val any) (any, sql.ConvertInRange, error)
- func (b Float64Type) DeserializeValue(val []byte) (any, error)
- func (b Float64Type) Equals(otherType sql.Type) bool
- func (b Float64Type) FormatSerializedValue(val []byte) (string, error)
- func (b Float64Type) FormatValue(val any) (string, error)
- func (b Float64Type) GetSerializationID() SerializationID
- func (b Float64Type) IsUnbounded() bool
- func (b Float64Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b Float64Type) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b Float64Type) OID() uint32
- func (b Float64Type) Promote() sql.Type
- func (b Float64Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b Float64Type) SerializeType() ([]byte, error)
- func (b Float64Type) SerializeValue(val any) ([]byte, error)
- func (b Float64Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b Float64Type) String() string
- func (b Float64Type) ToArrayType() DoltgresArrayType
- func (b Float64Type) Type() query.Type
- func (b Float64Type) ValueType() reflect.Type
- func (b Float64Type) Zero() any
- type Int16Type
- func (b Int16Type) BaseID() DoltgresTypeBaseID
- func (b Int16Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b Int16Type) Compare(v1 any, v2 any) (int, error)
- func (b Int16Type) Convert(val any) (any, sql.ConvertInRange, error)
- func (b Int16Type) DeserializeValue(val []byte) (any, error)
- func (b Int16Type) Equals(otherType sql.Type) bool
- func (b Int16Type) FormatSerializedValue(val []byte) (string, error)
- func (b Int16Type) FormatValue(val any) (string, error)
- func (b Int16Type) GetSerializationID() SerializationID
- func (b Int16Type) IsUnbounded() bool
- func (b Int16Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b Int16Type) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b Int16Type) OID() uint32
- func (b Int16Type) Promote() sql.Type
- func (b Int16Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b Int16Type) SerializeType() ([]byte, error)
- func (b Int16Type) SerializeValue(val any) ([]byte, error)
- func (b Int16Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b Int16Type) String() string
- func (b Int16Type) ToArrayType() DoltgresArrayType
- func (b Int16Type) Type() query.Type
- func (b Int16Type) ValueType() reflect.Type
- func (b Int16Type) Zero() any
- type Int32Type
- func (b Int32Type) BaseID() DoltgresTypeBaseID
- func (b Int32Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b Int32Type) Compare(v1 any, v2 any) (int, error)
- func (b Int32Type) Convert(val any) (any, sql.ConvertInRange, error)
- func (b Int32Type) DeserializeValue(val []byte) (any, error)
- func (b Int32Type) Equals(otherType sql.Type) bool
- func (b Int32Type) FormatSerializedValue(val []byte) (string, error)
- func (b Int32Type) FormatValue(val any) (string, error)
- func (b Int32Type) GetSerializationID() SerializationID
- func (b Int32Type) IsUnbounded() bool
- func (b Int32Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b Int32Type) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b Int32Type) OID() uint32
- func (b Int32Type) Promote() sql.Type
- func (b Int32Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b Int32Type) SerializeType() ([]byte, error)
- func (b Int32Type) SerializeValue(val any) ([]byte, error)
- func (b Int32Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b Int32Type) String() string
- func (b Int32Type) ToArrayType() DoltgresArrayType
- func (b Int32Type) Type() query.Type
- func (b Int32Type) ValueType() reflect.Type
- func (b Int32Type) Zero() any
- type Int64Type
- func (b Int64Type) BaseID() DoltgresTypeBaseID
- func (b Int64Type) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b Int64Type) Compare(v1 any, v2 any) (int, error)
- func (b Int64Type) Convert(val any) (any, sql.ConvertInRange, error)
- func (b Int64Type) DeserializeValue(val []byte) (any, error)
- func (b Int64Type) Equals(otherType sql.Type) bool
- func (b Int64Type) FormatSerializedValue(val []byte) (string, error)
- func (b Int64Type) FormatValue(val any) (string, error)
- func (b Int64Type) GetSerializationID() SerializationID
- func (b Int64Type) IsUnbounded() bool
- func (b Int64Type) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b Int64Type) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b Int64Type) OID() uint32
- func (b Int64Type) Promote() sql.Type
- func (b Int64Type) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b Int64Type) SerializeType() ([]byte, error)
- func (b Int64Type) SerializeValue(val any) ([]byte, error)
- func (b Int64Type) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b Int64Type) String() string
- func (b Int64Type) ToArrayType() DoltgresArrayType
- func (b Int64Type) Type() query.Type
- func (b Int64Type) ValueType() reflect.Type
- func (b Int64Type) Zero() any
- type NameType
- func (b NameType) BaseID() DoltgresTypeBaseID
- func (b NameType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b NameType) Compare(v1 any, v2 any) (int, error)
- func (b NameType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b NameType) DeserializeValue(val []byte) (any, error)
- func (b NameType) Equals(otherType sql.Type) bool
- func (b NameType) FormatSerializedValue(val []byte) (string, error)
- func (b NameType) FormatValue(val any) (string, error)
- func (b NameType) GetSerializationID() SerializationID
- func (b NameType) IsUnbounded() bool
- func (b NameType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b NameType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b NameType) OID() uint32
- func (b NameType) Promote() sql.Type
- func (b NameType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b NameType) SerializeType() ([]byte, error)
- func (b NameType) SerializeValue(val any) ([]byte, error)
- func (b NameType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b NameType) String() string
- func (b NameType) ToArrayType() DoltgresArrayType
- func (b NameType) Type() query.Type
- func (b NameType) ValueType() reflect.Type
- func (b NameType) Zero() any
- type NullType
- func (b NullType) BaseID() DoltgresTypeBaseID
- func (b NullType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b NullType) Compare(v1 any, v2 any) (int, error)
- func (b NullType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b NullType) DeserializeValue(val []byte) (any, error)
- func (b NullType) Equals(otherType sql.Type) bool
- func (b NullType) FormatSerializedValue(val []byte) (string, error)
- func (b NullType) FormatValue(val any) (string, error)
- func (b NullType) GetSerializationID() SerializationID
- func (b NullType) IsUnbounded() bool
- func (b NullType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b NullType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b NullType) OID() uint32
- func (b NullType) Promote() sql.Type
- func (b NullType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b NullType) SerializeType() ([]byte, error)
- func (b NullType) SerializeValue(val any) ([]byte, error)
- func (b NullType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b NullType) String() string
- func (b NullType) ToArrayType() DoltgresArrayType
- func (b NullType) Type() query.Type
- func (b NullType) ValueType() reflect.Type
- func (b NullType) Zero() any
- type NumericType
- func (b NumericType) BaseID() DoltgresTypeBaseID
- func (b NumericType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b NumericType) Compare(v1 any, v2 any) (int, error)
- func (b NumericType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b NumericType) DeserializeValue(val []byte) (any, error)
- func (b NumericType) Equals(otherType sql.Type) bool
- func (b NumericType) FormatSerializedValue(val []byte) (string, error)
- func (b NumericType) FormatValue(val any) (string, error)
- func (b NumericType) GetSerializationID() SerializationID
- func (b NumericType) IsUnbounded() bool
- func (b NumericType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b NumericType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b NumericType) OID() uint32
- func (b NumericType) Promote() sql.Type
- func (b NumericType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b NumericType) SerializeType() ([]byte, error)
- func (b NumericType) SerializeValue(val any) ([]byte, error)
- func (b NumericType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b NumericType) String() string
- func (b NumericType) ToArrayType() DoltgresArrayType
- func (b NumericType) Type() query.Type
- func (b NumericType) ValueType() reflect.Type
- func (b NumericType) Zero() any
- type OidType
- func (b OidType) BaseID() DoltgresTypeBaseID
- func (b OidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b OidType) Compare(v1 any, v2 any) (int, error)
- func (b OidType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b OidType) DeserializeValue(val []byte) (any, error)
- func (b OidType) Equals(otherType sql.Type) bool
- func (b OidType) FormatSerializedValue(val []byte) (string, error)
- func (b OidType) FormatValue(val any) (string, error)
- func (b OidType) GetSerializationID() SerializationID
- func (b OidType) IsUnbounded() bool
- func (b OidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b OidType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b OidType) OID() uint32
- func (b OidType) Promote() sql.Type
- func (b OidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b OidType) SerializeType() ([]byte, error)
- func (b OidType) SerializeValue(val any) ([]byte, error)
- func (b OidType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b OidType) String() string
- func (b OidType) ToArrayType() DoltgresArrayType
- func (b OidType) Type() query.Type
- func (b OidType) ValueType() reflect.Type
- func (b OidType) Zero() any
- type SerializationID
- type TextType
- func (b TextType) BaseID() DoltgresTypeBaseID
- func (b TextType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b TextType) Compare(v1 any, v2 any) (int, error)
- func (b TextType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b TextType) DeserializeValue(val []byte) (any, error)
- func (b TextType) Equals(otherType sql.Type) bool
- func (b TextType) FormatSerializedValue(val []byte) (string, error)
- func (b TextType) FormatValue(val any) (string, error)
- func (b TextType) GetSerializationID() SerializationID
- func (b TextType) IsUnbounded() bool
- func (b TextType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b TextType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b TextType) OID() uint32
- func (b TextType) Promote() sql.Type
- func (b TextType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b TextType) SerializeType() ([]byte, error)
- func (b TextType) SerializeValue(val any) ([]byte, error)
- func (b TextType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b TextType) String() string
- func (b TextType) ToArrayType() DoltgresArrayType
- func (b TextType) Type() query.Type
- func (b TextType) ValueType() reflect.Type
- func (b TextType) Zero() any
- type TimeTZType
- func (b TimeTZType) BaseID() DoltgresTypeBaseID
- func (b TimeTZType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b TimeTZType) Compare(v1 any, v2 any) (int, error)
- func (b TimeTZType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b TimeTZType) DeserializeValue(val []byte) (any, error)
- func (b TimeTZType) Equals(otherType sql.Type) bool
- func (b TimeTZType) FormatSerializedValue(val []byte) (string, error)
- func (b TimeTZType) FormatValue(val any) (string, error)
- func (b TimeTZType) GetSerializationID() SerializationID
- func (b TimeTZType) IsUnbounded() bool
- func (b TimeTZType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b TimeTZType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b TimeTZType) OID() uint32
- func (b TimeTZType) Promote() sql.Type
- func (b TimeTZType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b TimeTZType) SerializeType() ([]byte, error)
- func (b TimeTZType) SerializeValue(val any) ([]byte, error)
- func (b TimeTZType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b TimeTZType) String() string
- func (b TimeTZType) ToArrayType() DoltgresArrayType
- func (b TimeTZType) Type() query.Type
- func (b TimeTZType) ValueType() reflect.Type
- func (b TimeTZType) Zero() any
- type TimeType
- func (b TimeType) BaseID() DoltgresTypeBaseID
- func (b TimeType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b TimeType) Compare(v1 any, v2 any) (int, error)
- func (b TimeType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b TimeType) DeserializeValue(val []byte) (any, error)
- func (b TimeType) Equals(otherType sql.Type) bool
- func (b TimeType) FormatSerializedValue(val []byte) (string, error)
- func (b TimeType) FormatValue(val any) (string, error)
- func (b TimeType) GetSerializationID() SerializationID
- func (b TimeType) IsUnbounded() bool
- func (b TimeType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b TimeType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b TimeType) OID() uint32
- func (b TimeType) Promote() sql.Type
- func (b TimeType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b TimeType) SerializeType() ([]byte, error)
- func (b TimeType) SerializeValue(val any) ([]byte, error)
- func (b TimeType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b TimeType) String() string
- func (b TimeType) ToArrayType() DoltgresArrayType
- func (b TimeType) Type() query.Type
- func (b TimeType) ValueType() reflect.Type
- func (b TimeType) Zero() any
- type TimestampTZType
- func (b TimestampTZType) BaseID() DoltgresTypeBaseID
- func (b TimestampTZType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b TimestampTZType) Compare(v1 any, v2 any) (int, error)
- func (b TimestampTZType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b TimestampTZType) DeserializeValue(val []byte) (any, error)
- func (b TimestampTZType) Equals(otherType sql.Type) bool
- func (b TimestampTZType) FormatSerializedValue(val []byte) (string, error)
- func (b TimestampTZType) FormatValue(val any) (string, error)
- func (b TimestampTZType) GetSerializationID() SerializationID
- func (b TimestampTZType) IsUnbounded() bool
- func (b TimestampTZType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b TimestampTZType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b TimestampTZType) OID() uint32
- func (b TimestampTZType) Promote() sql.Type
- func (b TimestampTZType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b TimestampTZType) SerializeType() ([]byte, error)
- func (b TimestampTZType) SerializeValue(val any) ([]byte, error)
- func (b TimestampTZType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b TimestampTZType) String() string
- func (b TimestampTZType) ToArrayType() DoltgresArrayType
- func (b TimestampTZType) Type() query.Type
- func (b TimestampTZType) ValueType() reflect.Type
- func (b TimestampTZType) Zero() any
- type TimestampType
- func (b TimestampType) BaseID() DoltgresTypeBaseID
- func (b TimestampType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b TimestampType) Compare(v1 any, v2 any) (int, error)
- func (b TimestampType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b TimestampType) DeserializeValue(val []byte) (any, error)
- func (b TimestampType) Equals(otherType sql.Type) bool
- func (b TimestampType) FormatSerializedValue(val []byte) (string, error)
- func (b TimestampType) FormatValue(val any) (string, error)
- func (b TimestampType) GetSerializationID() SerializationID
- func (b TimestampType) IsUnbounded() bool
- func (b TimestampType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b TimestampType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b TimestampType) OID() uint32
- func (b TimestampType) Promote() sql.Type
- func (b TimestampType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b TimestampType) SerializeType() ([]byte, error)
- func (b TimestampType) SerializeValue(val any) ([]byte, error)
- func (b TimestampType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b TimestampType) String() string
- func (b TimestampType) ToArrayType() DoltgresArrayType
- func (b TimestampType) Type() query.Type
- func (b TimestampType) ValueType() reflect.Type
- func (b TimestampType) Zero() any
- type UnknownType
- func (u UnknownType) BaseID() DoltgresTypeBaseID
- func (u UnknownType) BaseType() DoltgresType
- func (u UnknownType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (u UnknownType) Compare(v1 any, v2 any) (int, error)
- func (u UnknownType) Convert(val any) (any, sql.ConvertInRange, error)
- func (u UnknownType) DeserializeValue(val []byte) (any, error)
- func (u UnknownType) Equals(otherType sql.Type) bool
- func (u UnknownType) FormatSerializedValue(val []byte) (string, error)
- func (u UnknownType) FormatValue(val any) (string, error)
- func (u UnknownType) GetSerializationID() SerializationID
- func (u UnknownType) IsUnbounded() bool
- func (u UnknownType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (u UnknownType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (u UnknownType) OID() uint32
- func (u UnknownType) Promote() sql.Type
- func (u UnknownType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (u UnknownType) SerializeType() ([]byte, error)
- func (u UnknownType) SerializeValue(val any) ([]byte, error)
- func (u UnknownType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (u UnknownType) String() string
- func (u UnknownType) ToArrayType() DoltgresArrayType
- func (u UnknownType) Type() query.Type
- func (u UnknownType) ValueType() reflect.Type
- func (u UnknownType) Zero() any
- type UuidType
- func (b UuidType) BaseID() DoltgresTypeBaseID
- func (b UuidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b UuidType) Compare(v1 any, v2 any) (int, error)
- func (b UuidType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b UuidType) DeserializeValue(val []byte) (any, error)
- func (b UuidType) Equals(otherType sql.Type) bool
- func (b UuidType) FormatSerializedValue(val []byte) (string, error)
- func (b UuidType) FormatValue(val any) (string, error)
- func (b UuidType) GetSerializationID() SerializationID
- func (b UuidType) IsUnbounded() bool
- func (b UuidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b UuidType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b UuidType) OID() uint32
- func (b UuidType) Promote() sql.Type
- func (b UuidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b UuidType) SerializeType() ([]byte, error)
- func (b UuidType) SerializeValue(val any) ([]byte, error)
- func (b UuidType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b UuidType) String() string
- func (b UuidType) ToArrayType() DoltgresArrayType
- func (b UuidType) Type() query.Type
- func (b UuidType) ValueType() reflect.Type
- func (b UuidType) Zero() any
- type VarCharType
- func (b VarCharType) BaseID() DoltgresTypeBaseID
- func (b VarCharType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b VarCharType) Compare(v1 any, v2 any) (int, error)
- func (b VarCharType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b VarCharType) DeserializeValue(val []byte) (any, error)
- func (b VarCharType) Equals(otherType sql.Type) bool
- func (b VarCharType) FormatSerializedValue(val []byte) (string, error)
- func (b VarCharType) FormatValue(val any) (string, error)
- func (b VarCharType) GetSerializationID() SerializationID
- func (b VarCharType) IsUnbounded() bool
- func (b VarCharType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b VarCharType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b VarCharType) OID() uint32
- func (b VarCharType) Promote() sql.Type
- func (b VarCharType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b VarCharType) SerializeType() ([]byte, error)
- func (b VarCharType) SerializeValue(val any) ([]byte, error)
- func (b VarCharType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b VarCharType) String() string
- func (b VarCharType) ToArrayType() DoltgresArrayType
- func (b VarCharType) Type() query.Type
- func (b VarCharType) ValueType() reflect.Type
- func (b VarCharType) Zero() any
- type XidType
- func (b XidType) BaseID() DoltgresTypeBaseID
- func (b XidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b XidType) Compare(v1 any, v2 any) (int, error)
- func (b XidType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b XidType) DeserializeValue(val []byte) (any, error)
- func (b XidType) Equals(otherType sql.Type) bool
- func (b XidType) FormatSerializedValue(val []byte) (string, error)
- func (b XidType) FormatValue(val any) (string, error)
- func (b XidType) GetSerializationID() SerializationID
- func (b XidType) IsUnbounded() bool
- func (b XidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b XidType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b XidType) OID() uint32
- func (b XidType) Promote() sql.Type
- func (b XidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b XidType) SerializeType() ([]byte, error)
- func (b XidType) SerializeValue(val any) ([]byte, error)
- func (b XidType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b XidType) String() string
- func (b XidType) ToArrayType() DoltgresArrayType
- func (b XidType) Type() query.Type
- func (b XidType) ValueType() reflect.Type
- func (b XidType) Zero() any
Constants ¶
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_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) )
const ( MaxUint32 = 4294967295 // MaxUint32 is the largest possible value of Uint32 MinInt32 = -2147483648 // MinInt32 is the smallest possible value of Int32 )
const NameLength = 63
const (
// StringMaxLength is the maximum number of characters (not bytes) that a Char, VarChar, or BpChar may contain.
StringMaxLength = 10485760
)
Variables ¶
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 )
var AnyArray = AnyArrayType{}
AnyArray is an array that may contain elements of any type.
var Bool = BoolType{}
Bool is the standard boolean.
var BoolArray = createArrayType(Bool, SerializationID_BoolArray, oid.T__bool)
BoolArray is the array variant of Bool.
var BpChar = CharType{Length: stringUnbounded}
BpChar is a char that has an unbounded length. "bpchar" and "char" are the same type, distinguished by the length being bounded or unbounded.
var BpCharArray = createArrayTypeWithFuncs(BpChar, SerializationID_CharArray, oid.T__bpchar, arrayContainerFunctions{
SQL: stringArraySQL,
})
BpCharArray is the array variant of BpChar.
var Bytea = ByteaType{}
Bytea is the byte string type.
var ByteaArray = createArrayType(Bytea, SerializationID_ByteaArray, oid.T__bytea)
ByteaArray is the array variant of Bytea.
var CharArray = BpCharArray
CharArray is the array variant of BpChar. This is an alias of BpCharArray, since the documentation references "char" more so than "bpchar" in PostgreSQL 15. They're the same type with different characteristics depending on the length.
var Date = DateType{}
Date is the day, month, and year.
var DateArray = createArrayType(Date, SerializationID_DateArray, oid.T__date)
DateArray is the array variant of Date.
var Float32 = Float32Type{}
Float32 is an float32.
var Float32Array = createArrayType(Float32, SerializationID_Float32Array, oid.T__float4)
Float32Array is the array variant of Float32.
var Float64 = Float64Type{}
Float64 is an float64.
var Float64Array = createArrayType(Float64, SerializationID_Float64Array, oid.T__float8)
Float64Array is the array variant of Float64.
var Int16 = Int16Type{}
Int16 is an int16.
var Int16Array = createArrayType(Int16, SerializationID_Int16Array, oid.T__int2)
Int16Array is the array variant of Int16.
var Int32 = Int32Type{}
Int32 is an int32.
var Int32Array = createArrayType(Int32, SerializationID_Int32Array, oid.T__int4)
Int32Array is the array variant of Int32.
var Int64 = Int64Type{}
Int64 is an int64.
var Int64Array = createArrayType(Int64, SerializationID_Int64Array, oid.T__int8)
Int64Array is the array variant of Int64.
var Name = NameType{Length: NameLength}
Name is a 63-byte internal type for object names.
var NameArray = createArrayTypeWithFuncs(Name, SerializationID_NameArray, oid.T__name, arrayContainerFunctions{
SQL: stringArraySQL,
})
NameArray is the array variant of Name.
var Null = NullType{}
Null is the null type
var Numeric = NumericType{-1, -1}
Numeric is a precise and unbounded decimal value.
var NumericArray = createArrayType(Numeric, SerializationID_NumericArray, oid.T__numeric)
NumericArray is the array variant of Numeric.
var Oid = OidType{}
Oid is a data type used for identifying internal objects. It is implemented as an unsigned 32 bit integer.
var OidArray = createArrayType(Oid, SerializationID_OidArray, oid.T__oid)
OidArray is the array variant of Oid.
var Text = TextType{}
Text is the text type.
var TextArray = createArrayTypeWithFuncs(Text, SerializationID_TextArray, oid.T__text, arrayContainerFunctions{
SQL: stringArraySQL,
})
TextArray is the array variant of Text.
var Time = TimeType{-1}
Time is the time without a time zone. Precision is unbounded.
var TimeArray = createArrayType(Time, SerializationID_TimeArray, oid.T__time)
TimeArray is the array variant of Time.
var TimeTZ = TimeTZType{-1}
TimeTZ is the time with a time zone. Precision is unbounded.
var TimeTZArray = createArrayType(TimeTZ, SerializationID_TimeTZArray, oid.T__timetz)
TimeTZArray is the array variant of TimeTZ.
var Timestamp = TimestampType{-1}
Timestamp is the timestamp without a time zone. Precision is unbounded.
var TimestampArray = createArrayType(Timestamp, SerializationID_TimestampArray, oid.T__timestamp)
TimestampArray is the array variant of Timestamp.
var TimestampTZ = TimestampTZType{-1}
TimestampTZ is the timestamp with a time zone. Precision is unbounded.
var TimestampTZArray = createArrayType(TimestampTZ, SerializationID_TimestampTZArray, oid.T__timestamptz)
TimestampTZArray is the array variant of TimestampTZ.
var Unknown = UnknownType{}
Unknown represents an invalid or indeterminate type. This is primarily used internally.
var Uuid = UuidType{}
Uuid is the UUID type.
var UuidArray = createArrayType(Uuid, SerializationID_UuidArray, oid.T__uuid)
UuidArray is the array variant of Uuid.
var VarChar = VarCharType{Length: stringUnbounded}
VarChar is a varchar that has an unbounded length.
var VarCharArray = createArrayTypeWithFuncs(VarChar, SerializationID_VarCharArray, oid.T__varchar, arrayContainerFunctions{
SQL: stringArraySQL,
})
VarCharArray is the array variant of VarChar.
var Xid = XidType{}
Xid is a data type used for internal transaction IDs. It is implemented as an unsigned 32 bit integer.
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 InitBaseIDs ¶ added in v0.7.0
func InitBaseIDs()
InitBaseIDs reads the list of all types and creates a mapping of the base ID for each array variant.
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 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) BaseID ¶ added in v0.6.0
func (aa AnyArrayType) BaseID() DoltgresTypeBaseID
BaseID implements the DoltgresType interface.
func (AnyArrayType) BaseType ¶ added in v0.6.0
func (aa AnyArrayType) BaseType() DoltgresType
BaseType implements the DoltgresArrayType 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) FormatSerializedValue ¶ added in v0.6.0
func (aa AnyArrayType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) IsUnbounded ¶ added in v0.6.0
func (aa AnyArrayType) IsUnbounded() bool
IsUnbounded implements the DoltgresType 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) 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 BoolType ¶
type BoolType struct{}
BoolType is the extended type implementation of the PostgreSQL boolean.
func (BoolType) BaseID ¶ added in v0.5.0
func (b BoolType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶
DeserializeValue implements the DoltgresType interface.
func (BoolType) FormatSerializedValue ¶
FormatSerializedValue implements the DoltgresType interface.
func (BoolType) FormatValue ¶
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) IsUnbounded ¶ added in v0.6.0
IsUnbounded implements the DoltgresType interface.
func (BoolType) MaxSerializedWidth ¶
func (b BoolType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
MaxSerializedWidth implements the DoltgresType interface.
func (BoolType) MaxTextResponseByteLength ¶
MaxTextResponseByteLength implements the DoltgresType interface.
func (BoolType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (BoolType) SerializeValue ¶
SerializeValue implements the DoltgresType interface.
func (BoolType) SerializedCompare ¶
SerializedCompare implements the DoltgresType interface.
func (BoolType) ToArrayType ¶ added in v0.6.0
func (b BoolType) ToArrayType() DoltgresArrayType
ToArrayType 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) BaseID ¶ added in v0.6.0
func (b ByteaType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.6.0
DeserializeValue implements the DoltgresType interface.
func (ByteaType) FormatSerializedValue ¶ added in v0.6.0
FormatSerializedValue implements the DoltgresType interface.
func (ByteaType) FormatValue ¶ added in v0.6.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (ByteaType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (ByteaType) SerializeValue ¶ added in v0.6.0
SerializeValue implements the DoltgresType interface.
func (ByteaType) SerializedCompare ¶ added in v0.6.0
SerializedCompare implements the DoltgresType interface.
func (ByteaType) ToArrayType ¶ added in v0.6.0
func (b ByteaType) ToArrayType() DoltgresArrayType
ToArrayType 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 extended type implementation of the PostgreSQL char and bpchar, which are the same type internally.
func (CharType) BaseID ¶ added in v0.6.0
func (b CharType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.6.0
DeserializeValue implements the DoltgresType interface.
func (CharType) FormatSerializedValue ¶ added in v0.6.0
FormatSerializedValue implements the DoltgresType interface.
func (CharType) FormatValue ¶ added in v0.6.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (CharType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (CharType) SerializeValue ¶ added in v0.6.0
SerializeValue implements the DoltgresType interface.
func (CharType) SerializedCompare ¶ added in v0.6.0
SerializedCompare implements the DoltgresType interface.
func (CharType) ToArrayType ¶ added in v0.6.0
func (b CharType) ToArrayType() DoltgresArrayType
ToArrayType 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) BaseID ¶ added in v0.6.0
func (b DateType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.6.0
DeserializeValue implements the DoltgresType interface.
func (DateType) FormatSerializedValue ¶ added in v0.6.0
FormatSerializedValue implements the DoltgresType interface.
func (DateType) FormatValue ¶ added in v0.6.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (DateType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (DateType) SerializeValue ¶ added in v0.6.0
SerializeValue implements the DoltgresType interface.
func (DateType) SerializedCompare ¶ added in v0.6.0
SerializedCompare implements the DoltgresType interface.
func (DateType) ToArrayType ¶ added in v0.6.0
func (b DateType) ToArrayType() DoltgresArrayType
ToArrayType 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.
func IsBaseIDArrayType ¶ added in v0.6.0
func IsBaseIDArrayType(id DoltgresTypeBaseID) (DoltgresArrayType, bool)
IsBaseIDArrayType returns whether the given base ID is an array type. If it is, it also returns the type.
type DoltgresType ¶ added in v0.5.0
type DoltgresType interface { types.ExtendedType // BaseID returns the DoltgresTypeBaseID for this type. BaseID() DoltgresTypeBaseID // GetSerializationID returns the SerializationID for this type. GetSerializationID() SerializationID // 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.
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 + 2147483648 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 )
type Float32Type ¶ added in v0.5.0
type Float32Type struct{}
Float32Type is the extended type implementation of the PostgreSQL real.
func (Float32Type) BaseID ¶ added in v0.5.0
func (b Float32Type) BaseID() DoltgresTypeBaseID
BaseID 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) FormatSerializedValue ¶ added in v0.5.0
func (b Float32Type) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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) BaseID ¶ added in v0.5.0
func (b Float64Type) BaseID() DoltgresTypeBaseID
BaseID 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) FormatSerializedValue ¶ added in v0.5.0
func (b Float64Type) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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) BaseID ¶ added in v0.5.0
func (b Int16Type) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.5.0
DeserializeValue implements the DoltgresType interface.
func (Int16Type) FormatSerializedValue ¶ added in v0.5.0
FormatSerializedValue implements the DoltgresType interface.
func (Int16Type) FormatValue ¶ added in v0.5.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (Int16Type) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (Int16Type) SerializeValue ¶ added in v0.5.0
SerializeValue implements the DoltgresType interface.
func (Int16Type) SerializedCompare ¶ added in v0.5.0
SerializedCompare implements the DoltgresType interface.
func (Int16Type) ToArrayType ¶ added in v0.6.0
func (b Int16Type) ToArrayType() DoltgresArrayType
ToArrayType 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) BaseID ¶ added in v0.5.0
func (b Int32Type) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.5.0
DeserializeValue implements the DoltgresType interface.
func (Int32Type) FormatSerializedValue ¶ added in v0.5.0
FormatSerializedValue implements the DoltgresType interface.
func (Int32Type) FormatValue ¶ added in v0.5.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (Int32Type) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (Int32Type) SerializeValue ¶ added in v0.5.0
SerializeValue implements the DoltgresType interface.
func (Int32Type) SerializedCompare ¶ added in v0.5.0
SerializedCompare implements the DoltgresType interface.
func (Int32Type) ToArrayType ¶ added in v0.6.0
func (b Int32Type) ToArrayType() DoltgresArrayType
ToArrayType 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) BaseID ¶ added in v0.5.0
func (b Int64Type) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.5.0
DeserializeValue implements the DoltgresType interface.
func (Int64Type) FormatSerializedValue ¶ added in v0.5.0
FormatSerializedValue implements the DoltgresType interface.
func (Int64Type) FormatValue ¶ added in v0.5.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (Int64Type) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (Int64Type) SerializeValue ¶ added in v0.5.0
SerializeValue implements the DoltgresType interface.
func (Int64Type) SerializedCompare ¶ added in v0.5.0
SerializedCompare implements the DoltgresType interface.
func (Int64Type) ToArrayType ¶ added in v0.6.0
func (b Int64Type) ToArrayType() DoltgresArrayType
ToArrayType implements the DoltgresType interface.
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) BaseID ¶ added in v0.7.0
func (b NameType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.7.0
DeserializeValue implements the DoltgresType interface.
func (NameType) FormatSerializedValue ¶ added in v0.7.0
FormatSerializedValue implements the DoltgresType interface.
func (NameType) FormatValue ¶ added in v0.7.0
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) IsUnbounded ¶ added in v0.7.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (NameType) SerializeType ¶ added in v0.7.0
SerializeType implements the DoltgresType interface.
func (NameType) SerializeValue ¶ added in v0.7.0
SerializeValue implements the DoltgresType interface.
func (NameType) SerializedCompare ¶ added in v0.7.0
SerializedCompare implements the DoltgresType interface.
func (NameType) ToArrayType ¶ added in v0.7.0
func (b NameType) ToArrayType() DoltgresArrayType
ToArrayType implements the DoltgresType interface.
type NullType ¶ added in v0.5.0
type NullType struct{}
NullType is the extended type implementation of the PostgreSQL null.
func (NullType) BaseID ¶ added in v0.5.0
func (b NullType) BaseID() DoltgresTypeBaseID
BaseID implements the DoltgresType interface.
func (NullType) CollationCoercibility ¶ added in v0.5.0
func (b NullType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
CollationCoercibility implements the DoltgresType interface.
func (NullType) DeserializeValue ¶ added in v0.5.0
DeserializeValue implements the DoltgresType interface.
func (NullType) FormatSerializedValue ¶ added in v0.5.0
FormatSerializedValue implements the DoltgresType interface.
func (NullType) FormatValue ¶ added in v0.5.0
FormatValue implements the DoltgresType interface.
func (NullType) GetSerializationID ¶ added in v0.6.0
func (b NullType) GetSerializationID() SerializationID
GetSerializationID implements the DoltgresType interface.
func (NullType) IsUnbounded ¶ added in v0.6.0
IsUnbounded implements the DoltgresType interface.
func (NullType) MaxSerializedWidth ¶ added in v0.5.0
func (b NullType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
MaxSerializedWidth implements the DoltgresType interface.
func (NullType) MaxTextResponseByteLength ¶ added in v0.5.0
MaxTextResponseByteLength implements the DoltgresType interface.
func (NullType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (NullType) SerializeValue ¶ added in v0.5.0
SerializeValue implements the DoltgresType interface.
func (NullType) SerializedCompare ¶ added in v0.5.0
SerializedCompare implements the DoltgresType interface.
func (NullType) ToArrayType ¶ added in v0.6.0
func (b NullType) ToArrayType() DoltgresArrayType
ToArrayType implements the DoltgresType interface.
type NumericType ¶ added in v0.5.0
NumericType is the extended type implementation of the PostgreSQL numeric.
func (NumericType) BaseID ¶ added in v0.5.0
func (b NumericType) BaseID() DoltgresTypeBaseID
BaseID 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) FormatSerializedValue ¶ added in v0.5.0
func (b NumericType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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) BaseID ¶ added in v0.7.0
func (b OidType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.7.0
DeserializeValue implements the DoltgresType interface.
func (OidType) FormatSerializedValue ¶ added in v0.7.0
FormatSerializedValue implements the DoltgresType interface.
func (OidType) FormatValue ¶ added in v0.7.0
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) IsUnbounded ¶ added in v0.7.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (OidType) SerializeType ¶ added in v0.7.0
SerializeType implements the DoltgresType interface.
func (OidType) SerializeValue ¶ added in v0.7.0
SerializeValue implements the DoltgresType interface.
func (OidType) SerializedCompare ¶ added in v0.7.0
SerializedCompare implements the DoltgresType interface.
func (OidType) ToArrayType ¶ added in v0.7.0
func (b OidType) ToArrayType() DoltgresArrayType
ToArrayType 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 )
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) BaseID ¶ added in v0.6.0
func (b TextType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.6.0
DeserializeValue implements the DoltgresType interface.
func (TextType) FormatSerializedValue ¶ added in v0.6.0
FormatSerializedValue implements the DoltgresType interface.
func (TextType) FormatValue ¶ added in v0.6.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (TextType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (TextType) SerializeValue ¶ added in v0.6.0
SerializeValue implements the DoltgresType interface.
func (TextType) SerializedCompare ¶ added in v0.6.0
SerializedCompare implements the DoltgresType interface.
func (TextType) ToArrayType ¶ added in v0.6.0
func (b TextType) ToArrayType() DoltgresArrayType
ToArrayType 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) BaseID ¶ added in v0.6.0
func (b TimeTZType) BaseID() DoltgresTypeBaseID
BaseID 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) FormatSerializedValue ¶ added in v0.6.0
func (b TimeTZType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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) BaseID ¶ added in v0.6.0
func (b TimeType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.6.0
DeserializeValue implements the DoltgresType interface.
func (TimeType) FormatSerializedValue ¶ added in v0.6.0
FormatSerializedValue implements the DoltgresType interface.
func (TimeType) FormatValue ¶ added in v0.6.0
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) IsUnbounded ¶ added in v0.6.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (TimeType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (TimeType) SerializeValue ¶ added in v0.6.0
SerializeValue implements the DoltgresType interface.
func (TimeType) SerializedCompare ¶ added in v0.6.0
SerializedCompare implements the DoltgresType interface.
func (TimeType) ToArrayType ¶ added in v0.6.0
func (b TimeType) ToArrayType() DoltgresArrayType
ToArrayType 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) BaseID ¶ added in v0.6.0
func (b TimestampTZType) BaseID() DoltgresTypeBaseID
BaseID 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) FormatSerializedValue ¶ added in v0.6.0
func (b TimestampTZType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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) BaseID ¶ added in v0.6.0
func (b TimestampType) BaseID() DoltgresTypeBaseID
BaseID 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) FormatSerializedValue ¶ added in v0.6.0
func (b TimestampType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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 UnknownType ¶ added in v0.6.0
type UnknownType struct{}
UnknownType is the extended type implementation of the PostgreSQL unknown type.
func (UnknownType) BaseID ¶ added in v0.6.0
func (u UnknownType) BaseID() DoltgresTypeBaseID
BaseID implements the DoltgresType interface.
func (UnknownType) BaseType ¶ added in v0.6.0
func (u UnknownType) BaseType() DoltgresType
BaseType implements the DoltgresArrayType 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) FormatSerializedValue ¶ added in v0.6.0
func (u UnknownType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) 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) 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) BaseID ¶ added in v0.5.0
func (b UuidType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶
DeserializeValue implements the DoltgresType interface.
func (UuidType) FormatSerializedValue ¶
FormatSerializedValue implements the DoltgresType interface.
func (UuidType) FormatValue ¶
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) IsUnbounded ¶ added in v0.6.0
IsUnbounded implements the DoltgresType interface.
func (UuidType) MaxSerializedWidth ¶
func (b UuidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
MaxSerializedWidth implements the DoltgresType interface.
func (UuidType) MaxTextResponseByteLength ¶
MaxTextResponseByteLength implements the DoltgresType interface.
func (UuidType) SerializeType ¶ added in v0.6.0
SerializeType implements the DoltgresType interface.
func (UuidType) SerializeValue ¶
SerializeValue implements the DoltgresType interface.
func (UuidType) SerializedCompare ¶
SerializedCompare implements the DoltgresType interface.
func (UuidType) ToArrayType ¶ added in v0.6.0
func (b UuidType) ToArrayType() DoltgresArrayType
ToArrayType implements the DoltgresType interface.
type VarCharType ¶ added in v0.5.0
type VarCharType struct { // Length 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). Length uint32 }
VarCharType is the extended type implementation of the PostgreSQL varchar.
func (VarCharType) BaseID ¶ added in v0.5.0
func (b VarCharType) BaseID() DoltgresTypeBaseID
BaseID implements the DoltgresType 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) FormatSerializedValue ¶ added in v0.5.0
func (b VarCharType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue 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) IsUnbounded ¶ added in v0.6.0
func (b VarCharType) IsUnbounded() bool
IsUnbounded implements the DoltgresType 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) 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) BaseID ¶ added in v0.7.0
func (b XidType) BaseID() DoltgresTypeBaseID
BaseID 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) DeserializeValue ¶ added in v0.7.0
DeserializeValue implements the DoltgresType interface.
func (XidType) FormatSerializedValue ¶ added in v0.7.0
FormatSerializedValue implements the DoltgresType interface.
func (XidType) FormatValue ¶ added in v0.7.0
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) IsUnbounded ¶ added in v0.7.0
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
MaxTextResponseByteLength implements the DoltgresType interface.
func (XidType) SerializeType ¶ added in v0.7.0
SerializeType implements the DoltgresType interface.
func (XidType) SerializeValue ¶ added in v0.7.0
SerializeValue implements the DoltgresType interface.
func (XidType) SerializedCompare ¶ added in v0.7.0
SerializedCompare implements the DoltgresType interface.
func (XidType) ToArrayType ¶ added in v0.7.0
func (b XidType) ToArrayType() DoltgresArrayType
ToArrayType implements the DoltgresType interface.
Source Files ¶
- any_array.go
- array.go
- base_ids.go
- bool.go
- bool_array.go
- bytea.go
- bytea_array.go
- char.go
- char_array.go
- date.go
- date_array.go
- float32.go
- float32_array.go
- float64.go
- float64_array.go
- int16.go
- int16_array.go
- int32.go
- int32_array.go
- int64.go
- int64_array.go
- interface.go
- name.go
- name_array.go
- null.go
- numeric.go
- numeric_array.go
- oid.go
- oid_array.go
- serialization.go
- text.go
- text_array.go
- time.go
- time_array.go
- timestamp.go
- timestamp_array.go
- timestamptz.go
- timestamptz_array.go
- timetz.go
- timetz_array.go
- unknown.go
- uuid.go
- uuid_array.go
- varchar.go
- varchar_array.go
- xid.go
- xid_array.go