# Functions
TODO: unexport.
No description provided by the author
TODO: move me.
ApproximateTypeFromValue returns the closest matching type to the given value.
CoalesceInt converts a int8/int16/..
ColumnTypeToType gets the column type using the column definition.
CompareJSON compares two JSON values.
CompareNulls compares two values, and returns true if either is null.
No description provided by the author
No description provided by the author
ConvertToCollatedString returns the given interface as a string, along with its collation.
No description provided by the author
No description provided by the author
CreateBinary creates a StringType with a binary collation and character set of the given size.
CreateBitType creates a BitType.
CreateColumnDecimalType creates a DecimalType for VALID-TABLE-COLUMN.
CreateDatetimeType creates a Type dealing with all temporal types that are not TIME nor YEAR.
CreateDecimalType creates a DecimalType for NON-TABLE-COLUMN.
CreateEnumType creates a EnumType.
CreateLongText creates a LONGTEXT with the given collation.
CreateMediumText creates a MEDIUMTEXT with the given collation.
CreateNumberType creates a NumberType.
CreateNumberTypeWithDisplayWidth creates a NumberType that includes optional |displayWidth| metadata.
CreateSetType creates a SetType.
CreateString creates a new StringType based on the specified type, length, and collation.
CreateStringWithDefaults creates a StringType with the default character set and collation of the given size.
CreateText creates a TEXT with the given collation.
CreateTinyText creates a TINYTEXT with the given collation.
CreateTuple returns a new tuple type with the given element types.
DeepCopyJson implements deep copy of JSON document.
DeserializeEWKBHeader parses the header portion of a byte array in EWKB format to extract endianness and type.
DeserializeGeomColl parses the data portion of a byte array in WKB format to a GeometryCollection object.
DeserializeLine parses the data portion of a byte array in WKB format to a LineString object.
DeserializeMLine parses the data portion of a byte array in WKB format to a MultiLineString object.
DeserializeMPoint parses the data portion of a byte array in WKB format to a MultiPoint object.
DeserializeMPoly parses the data portion of a byte array in WKB format to a MultiPolygon object.
DeserializePoint parses the data portion of a byte array in WKB format to a Point object.
DeserializePoly parses the data portion of a byte array in WKB format to a Polygon object.
DeserializeType deserializes a byte slice representing a serialized extended type.
DeserializeTypeFromString deserializes a hex-encoded string representing a serialized extended type.
DeserializeWKBHeader parses the header potion of a byte array in WKB format There is no SRID.
ErrIfMismatchedColumns returns an operand error if the number of columns in t1 is not equal to the number of columns in t2.
ErrIfMismatchedColumnsInTuple returns an operand error is t2 is not a tuple type whose subtypes are structurally identical to t1.
GetOkResult extracts the OkResult from the row given.
IsBinary returns whether the type represents binary data.
IsBinaryType checks if t is BINARY, VARBINARY, or BLOB.
IsBit checks if t is a BIT type.
IsBlobType checks if t is BLOB.
IsDatetimeType checks if t is a datetime.
IsDateType checks if t is a date.
IsDecimal checks if t is a DECIMAL type.
No description provided by the author
IsEnum checks if t is a enum.
IsExtendedType returns whether the given sql.Type is an ExtendedType.
IsFloat checks if t is float type.
IsGeometry returns true if the specified type is a Geometry type.
IsInteger checks if t is an integer type.
IsJSON returns true if the specified type is a JSON type.
IsNull returns true if expression is nil or is Null Type, otherwise false.
IsNumber checks if t is a number type.
IsOkResult returns whether the given row represents an OkResult.
No description provided by the author
IsSet checks if t is a set.
IsSigned checks if t is a signed type.
IsText checks if t is a CHAR, VARCHAR, TEXT, BINARY, VARBINARY, or BLOB (including TEXT and BLOB variants).
IsTextBlob checks if t is one of the TEXTs or BLOBs.
IsTextOnly checks if t is CHAR, VARCHAR, or one of the TEXTs.
IsTime checks if t is a timestamp, date or datetime.
IsTimespan checks if t is a time (timespan).
IsTimestampType checks if t is a timestamp.
IsTuple checks if t is a tuple type.
IsUnsigned checks if t is an unsigned type.
IsYear checks if t is a year type.
No description provided by the author
MustCreateBinary is the same as CreateBinary except it panics on errors.
MustCreateBitType is the same as CreateBitType except it panics on errors.
MustCreateColumnDecimalType is the same as CreateDecimalType except it panics on errors and for VALID-TABLE-COLUMN.
MustCreateDatetimeType is the same as CreateDatetimeType except it panics on errors.
MustCreateDecimalType is the same as CreateDecimalType except it panics on errors and for NON-TABLE-COLUMN.
MustCreateEnumType is the same as CreateEnumType except it panics on errors.
MustCreateNumberType is the same as CreateNumberType except it panics on errors.
MustCreateNumberTypeWithDisplayWidth is the same as CreateNumberTypeWithDisplayWidth except it panics on errors.
MustCreateSetType is the same as CreateSetType except it panics on errors.
MustCreateString is the same as CreateString except it panics on errors.
MustCreateStringWithDefaults creates a StringType with the default CharacterSet and Collation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewOkResult returns a new OkResult with the given number of rows affected.
NewSystemBoolType returns a new systemBoolType.
NewSystemDoubleType returns a new systemDoubleType.
NewSystemEnumType returns a new systemEnumType.
NewSystemIntType returns a new systemIntType.
NewSystemSetType returns a new systemSetType.
NewSystemStringType returns a new systemStringType.
NewSystemUintType returns a new systemUintType.
NumColumns returns the number of columns in a type.
No description provided by the author
SerializeType serializes the given extended type into a byte slice.
SerializeTypeToString serializes the given extended type into a hex-encoded string.
SetExtendedTypeSerializers sets the handlers that are able to serialize and deserialize extended types.
TypesEqual compares two Types and returns whether they are equivalent.
No description provided by the author
ValidateTime receives a time and returns either that time or nil if it's not a valid time.
TODO: rename me, unexport.
WriteEWKBHeader will write EWKB header to the given buffer.
No description provided by the author
WriteWKBHeader will write WKB header to the given buffer.
# Constants
No description provided by the author
No description provided by the author
BitTypeMaxBits returns the maximum number of bits for Bit.
BitTypeMinBits returns the minimum number of bits for Bit.
No description provided by the author
No description provided by the author
DecimalTypeMaxPrecision returns the maximum precision allowed for the Decimal type.
DecimalTypeMaxScale returns the maximum scale allowed for the Decimal type, assuming the maximum precision is used.
No description provided by the author
EnumTypeMaxElements returns the maximum number of enumerations for the Enum type.
EnumTypeMinElements returns the minimum number of enumerations for the Enum type.
No description provided by the author
Represents a variably-sized value.
Represents a variably-sized value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OkResultColumnName should be used as the schema column name for Nodes that return an OkResult.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SetTypeMaxElements returns the maximum number of elements for the Set type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Type IDs.
No description provided by the author
Type IDs.
Type IDs.
Type IDs.
Type IDs.
Type IDs.
Type IDs.
Type IDs.
# Variables
No description provided by the author
Boolean is a synonym for TINYINT(1).
Date is a date with day, month and year.
Datetime is a date and a time with default precision (no fractional seconds).
DatetimeMaxPrecision is a date and a time with maximum precision.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrConvertingToTime is thrown when a value cannot be converted to a Time.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrLengthTooLarge is thrown when a string's length is too large given the other parameters.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrValueNotNil is thrown when a value that was expected to be nil, is not.
Float32 is a floating point number of 32 bits.
Float64 is a floating point number of 64 bits.
Int16 is an integer of 16 bits.
Int24 is an integer of 24 bits.
Int32 is an integer of 32 bits.
Int64 is an integer of 64 bytes.
Int8 is an integer of 8 bits.
InternalDecimalType is a special DecimalType that is used internally for Decimal comparisons.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OkResultColumnType should be used as the schema column type for Nodes that return an OkResult.
OkResultSchema should be used as the schema of Nodes that return an OkResult.
No description provided by the author
No description provided by the author
No description provided by the author
Timestamp is a UNIX timestamp with default precision (no fractional seconds).
TimestampDatetimeLayouts hold extra timestamps allowed for parsing.
TimestampMaxPrecision is a UNIX timestamp with maximum precision.
No description provided by the author
No description provided by the author
Uint16 is an unsigned integer of 16 bits.
Uint24 is an unsigned integer of 24 bits.
Uint32 is an unsigned integer of 32 bits.
Uint64 is an unsigned integer of 64 bits.
Uint8 is an unsigned integer of 8 bits.
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
GeomColl is the value type returned from GeomCollType.
GeomCollType represents the GeometryCollection type.
GeometryType represents the GEOMETRY type.
No description provided by the author
No description provided by the author
No description provided by the author
LineString is the value type returned from LineStringType.
LineStringType represents the LINESTRING type.
MultiLineString is the value type returned from MultiLineStringType.
MultiLineStringType represents the MUTILINESTRING type.
MultiPoint is the value type returned from MultiPointType.
MultiPointType represents the MULTIPOINT type.
MultiPolygon is the value type returned from MultiPolygonType.
MultiPolygonType represents the MULTIPOLYGON type.
No description provided by the author
No description provided by the author
OkResult is a representation of the OK packet MySQL sends for non-select queries such as UPDATE, INSERT, etc.
Point is the value type returned from PointType.
PointType represents the POINT type.
Polygon is the value type returned from PolygonType.
PolygonType represents the POLYGON type.
No description provided by the author
No description provided by the author
No description provided by the author
SystemBoolType is an internal boolean type ONLY for system variables.
No description provided by the author
No description provided by the author
# Interfaces
BitType represents the BIT type.
ExtendedType is a serializable type that offers an extended interface for interacting with types in a wider context.
GeometryValue is the value type returned from GeometryType, which is an interface over the following types: Point, Polygon, LineString, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection.
No description provided by the author
No description provided by the author
TimeType represents the TIME type.
# Type aliases
ExtendedTypeDeserializer is the function signature for the extended type deserializer.
No description provided by the author
ExtendedTypeSerializer is the function signature for the extended type serializer.
No description provided by the author
No description provided by the author
Timespan is the value type returned by TimeType.Convert().
No description provided by the author