Documentation ¶
Index ¶
- Variables
- func DeserializeType(serializedType []byte) (types.ExtendedType, error)
- func MustSerializeType(extendedType types.ExtendedType) []byte
- func SerializeType(extendedType types.ExtendedType) ([]byte, error)
- type BoolArrayType
- func (b BoolArrayType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
- func (b BoolArrayType) Compare(v1 any, v2 any) (int, error)
- func (b BoolArrayType) Convert(val any) (any, sql.ConvertInRange, error)
- func (b BoolArrayType) DeserializeValue(val []byte) (any, error)
- func (b BoolArrayType) Equals(otherType sql.Type) bool
- func (b BoolArrayType) FormatSerializedValue(val []byte) (string, error)
- func (b BoolArrayType) FormatValue(val any) (string, error)
- func (b BoolArrayType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b BoolArrayType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b BoolArrayType) Promote() sql.Type
- func (b BoolArrayType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, error)
- func (b BoolArrayType) SerializeValue(val any) ([]byte, error)
- func (b BoolArrayType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
- func (b BoolArrayType) String() string
- func (b BoolArrayType) Type() query.Type
- func (b BoolArrayType) ValueType() reflect.Type
- func (b BoolArrayType) Zero() any
- type BoolType
- 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) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b BoolType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b BoolType) Promote() sql.Type
- func (b BoolType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, 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) Type() query.Type
- func (b BoolType) ValueType() reflect.Type
- func (b BoolType) Zero() any
- type UuidType
- 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) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
- func (b UuidType) MaxTextResponseByteLength(ctx *sql.Context) uint32
- func (b UuidType) Promote() sql.Type
- func (b UuidType) SQL(ctx *sql.Context, dest []byte, v any) (sqltypes.Value, 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) Type() query.Type
- func (b UuidType) ValueType() reflect.Type
- func (b UuidType) Zero() any
Constants ¶
This section is empty.
Variables ¶
var Bool = BoolType{}
Bool is the standard boolean.
var BoolArray = BoolArrayType{}
BoolArray is the standard boolean array.
var Uuid = UuidType{}
Uuid is the UUID type.
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 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 BoolArrayType ¶
type BoolArrayType struct{}
BoolArrayType is the extended type implementation of the PostgreSQL boolean.
func (BoolArrayType) CollationCoercibility ¶
func (b BoolArrayType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
CollationCoercibility implements the types.ExtendedType interface.
func (BoolArrayType) Compare ¶
func (b BoolArrayType) Compare(v1 any, v2 any) (int, error)
Compare implements the types.ExtendedType interface.
func (BoolArrayType) Convert ¶
func (b BoolArrayType) Convert(val any) (any, sql.ConvertInRange, error)
Convert implements the types.ExtendedType interface.
func (BoolArrayType) DeserializeValue ¶
func (b BoolArrayType) DeserializeValue(val []byte) (any, error)
DeserializeValue implements the types.ExtendedType interface.
func (BoolArrayType) Equals ¶
func (b BoolArrayType) Equals(otherType sql.Type) bool
Equals implements the types.ExtendedType interface.
func (BoolArrayType) FormatSerializedValue ¶
func (b BoolArrayType) FormatSerializedValue(val []byte) (string, error)
FormatSerializedValue implements the types.ExtendedType interface.
func (BoolArrayType) FormatValue ¶
func (b BoolArrayType) FormatValue(val any) (string, error)
FormatValue implements the types.ExtendedType interface.
func (BoolArrayType) MaxSerializedWidth ¶
func (b BoolArrayType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
MaxSerializedWidth implements the types.ExtendedType interface.
func (BoolArrayType) MaxTextResponseByteLength ¶
func (b BoolArrayType) MaxTextResponseByteLength(ctx *sql.Context) uint32
MaxTextResponseByteLength implements the types.ExtendedType interface.
func (BoolArrayType) Promote ¶
func (b BoolArrayType) Promote() sql.Type
Promote implements the types.ExtendedType interface.
func (BoolArrayType) SerializeValue ¶
func (b BoolArrayType) SerializeValue(val any) ([]byte, error)
SerializeValue implements the types.ExtendedType interface.
func (BoolArrayType) SerializedCompare ¶
func (b BoolArrayType) SerializedCompare(v1 []byte, v2 []byte) (int, error)
SerializedCompare implements the types.ExtendedType interface.
func (BoolArrayType) String ¶
func (b BoolArrayType) String() string
String implements the types.ExtendedType interface.
func (BoolArrayType) Type ¶
func (b BoolArrayType) Type() query.Type
Type implements the types.ExtendedType interface.
func (BoolArrayType) ValueType ¶
func (b BoolArrayType) ValueType() reflect.Type
ValueType implements the types.ExtendedType interface.
func (BoolArrayType) Zero ¶
func (b BoolArrayType) Zero() any
Zero implements the types.ExtendedType interface.
type BoolType ¶
type BoolType struct{}
BoolType is the extended type implementation of the PostgreSQL boolean.
func (BoolType) CollationCoercibility ¶
func (b BoolType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
CollationCoercibility implements the types.ExtendedType interface.
func (BoolType) DeserializeValue ¶
DeserializeValue implements the types.ExtendedType interface.
func (BoolType) FormatSerializedValue ¶
FormatSerializedValue implements the types.ExtendedType interface.
func (BoolType) FormatValue ¶
FormatValue implements the types.ExtendedType interface.
func (BoolType) MaxSerializedWidth ¶
func (b BoolType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
MaxSerializedWidth implements the types.ExtendedType interface.
func (BoolType) MaxTextResponseByteLength ¶
MaxTextResponseByteLength implements the types.ExtendedType interface.
func (BoolType) SerializeValue ¶
SerializeValue implements the types.ExtendedType interface.
func (BoolType) SerializedCompare ¶
SerializedCompare implements the types.ExtendedType interface.
type UuidType ¶
type UuidType struct{}
UuidType is the extended type implementation of the PostgreSQL UUID.
func (UuidType) CollationCoercibility ¶
func (b UuidType) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)
CollationCoercibility implements the types.ExtendedType interface.
func (UuidType) DeserializeValue ¶
DeserializeValue implements the types.ExtendedType interface.
func (UuidType) FormatSerializedValue ¶
FormatSerializedValue implements the types.ExtendedType interface.
func (UuidType) FormatValue ¶
FormatValue implements the types.ExtendedType interface.
func (UuidType) MaxSerializedWidth ¶
func (b UuidType) MaxSerializedWidth() types.ExtendedTypeSerializedWidth
MaxSerializedWidth implements the types.ExtendedType interface.
func (UuidType) MaxTextResponseByteLength ¶
MaxTextResponseByteLength implements the types.ExtendedType interface.
func (UuidType) SerializeValue ¶
SerializeValue implements the types.ExtendedType interface.
func (UuidType) SerializedCompare ¶
SerializedCompare implements the types.ExtendedType interface.