Documentation
¶
Index ¶
- Constants
- Variables
- func AppendBoolToByteArray(b bool, arr []byte) []byte
- func BoolToIntString(b bool) string
- func CharsetType(oid T) uint8
- func CompareDecimal128(a, b Decimal128) int
- func CompareDecimal128Decimal128(a, b Decimal128, s1, s2 int32) int64
- func CompareDecimal128Decimal128Aligned(a, b Decimal128) int64
- func CompareDecimal64(a, b Decimal64) int
- func CompareDecimal64Decimal64(a, b Decimal64, s1, s2 int32) int64
- func CompareDecimal64Decimal64Aligned(a, b Decimal64) int64
- func CompareRowidRowidAligned(a, b Rowid) int64
- func CompareTSTSAligned(a, b TS) int64
- func CompareUuid(left Uuid, right Uuid) int64
- func Decimal128IsZero(d Decimal128) bool
- func Decimal128ToInt64Raw(d Decimal128) (int64, int64)
- func Decimal64IsZero(d Decimal64) bool
- func Decimal64ToInt64Raw(d Decimal64) int64
- func Decode(data []byte, v interface{}) error
- func DecodeBool(v []byte) bool
- func DecodeFixed[T FixedSizeT](v []byte) T
- func DecodeFloat32(v []byte) float32
- func DecodeFloat64(v []byte) float64
- func DecodeInt16(v []byte) int16
- func DecodeInt32(v []byte) int32
- func DecodeInt64(v []byte) int64
- func DecodeInt8(v []byte) int8
- func DecodeJson(buf []byte) bytejson.ByteJson
- func DecodeSlice[T any](v []byte) []T
- func DecodeStringSlice(data []byte) []string
- func DecodeUint16(v []byte) uint16
- func DecodeUint32(v []byte) uint32
- func DecodeUint64(v []byte) uint64
- func DecodeUint8(v []byte) uint8
- func DecodeValue(val []byte, typ Type) any
- func DefaultVal[T any]() T
- func Encode(v interface{}) ([]byte, error)
- func EncodeBool(v *bool) []byte
- func EncodeDate(v *Date) []byte
- func EncodeDatetime(v *Datetime) []byte
- func EncodeDecimal128(v *Decimal128) []byte
- func EncodeDecimal64(v *Decimal64) []byte
- func EncodeFixed[T FixedSizeT](v T) []byte
- func EncodeFloat32(v *float32) []byte
- func EncodeFloat64(v *float64) []byte
- func EncodeInt16(v *int16) []byte
- func EncodeInt32(v *int32) []byte
- func EncodeInt64(v *int64) []byte
- func EncodeInt8(v *int8) []byte
- func EncodeJson(v bytejson.ByteJson) ([]byte, error)
- func EncodeSlice[T any](v []T) []byte
- func EncodeSliceWithCap[T any](v []T) []byte
- func EncodeStringSlice(vs []string) []byte
- func EncodeTime(v *Time) []byte
- func EncodeTimestamp(v *Timestamp) []byte
- func EncodeType(v *Type) []byte
- func EncodeUint16(v *uint16) []byte
- func EncodeUint32(v *uint32) []byte
- func EncodeUint64(v *uint64) []byte
- func EncodeUint8(v *uint8) []byte
- func EncodeUuid(v *Uuid) []byte
- func EncodeValue(val any, typ Type) []byte
- func EqualUuid(src Uuid, dest Uuid) bool
- func GetUnixEpochSecs() int64
- func Hash(v any, typ Type) (uint64, error)
- func IsAllNumber(s *string) bool
- func IsDateRelate(t T) bool
- func IsDecimal(t T) bool
- func IsFloat(t T) bool
- func IsInteger(t T) bool
- func IsNull(v any) bool
- func IsNumber(s *string, idx int) bool
- func IsSignedInt(t T) bool
- func IsString(t T) bool
- func IsUnsignedInt(t T) bool
- func JudgeIntervalNumOverflow(num int64, it IntervalType) error
- func LastDay(year int32, month uint8) uint8
- func NewPacker(mp *mpool.MPool) *packer
- func NewPackerArray(length int, mp *mpool.MPool) []*packer
- func NewProtoType(oid T) *plan.Type
- func ParseBool(s string) (bool, error)
- func ParseSliceToByteJson(dt []byte) (bytejson.ByteJson, error)
- func ParseStringToByteJson(str string) (bytejson.ByteJson, error)
- func ParseStringToPath(str string) (bytejson.Path, error)
- func ParseValueToBool(num *tree.NumVal) (bool, error)
- func ToNumber(s string) int64
- func TypeSize(oid T) int
- func UnitIsDayOrLarger(it IntervalType) bool
- func UuidToString(muuid Uuid) (string, error)
- func ValidDate(year int32, month, day uint8) bool
- func ValidDatetime(year int32, month, day uint8) bool
- func ValidTime(h, m, s uint64) bool
- func ValidTimeInDay(h, m, s uint8) bool
- func ValidTimestamp(timestamp Timestamp) bool
- func WriteValues(w io.Writer, vals ...any) (n int64, err error)
- type BuiltinNumber
- type Date
- func (d Date) Calendar(full bool) (year int32, month, day uint8, yday uint16)
- func (d Date) Day() uint8
- func (d Date) DayOfWeek() Weekday
- func (d Date) DayOfYear() uint16
- func (d Date) DaysSinceUnixEpoch() int32
- func (d Date) Month() uint8
- func (d Date) Quarter() uint32
- func (d Date) String() string
- func (d Date) ToDatetime() Datetime
- func (d Date) ToTime() Time
- func (d Date) ToTimestamp(loc *time.Location) Timestamp
- func (d Date) Week(mode int) int
- func (d Date) WeekOfYear() (year int32, week uint8)
- func (d Date) WeekOfYear2() uint8
- func (d Date) Year() uint16
- func (d Date) YearMonth() uint32
- func (d Date) YearMonthStr() string
- func (d Date) YearWeek(mode int) (year int, week int)
- type Datetime
- func DatetimeFromClock(year int32, month, day, hour, minute, sec uint8, msec uint32) Datetime
- func DatetimeFromUnix(loc *time.Location, ts int64) Datetime
- func DatetimeFromUnixWithNsec(loc *time.Location, sec int64, nsec int64) Datetime
- func DecodeDatetime(v []byte) Datetime
- func Now(loc *time.Location) Datetime
- func ParseDatetime(s string, precision int32) (Datetime, error)
- func TimestampToDatetime(loc *time.Location, xs []Timestamp, rs []Datetime) ([]Datetime, error)
- func UTC() Datetime
- func (dt Datetime) AddDateTime(addMonth, addYear int64, timeType TimeType) (Datetime, bool)
- func (dt Datetime) AddInterval(nums int64, its IntervalType, timeType TimeType) (Datetime, bool)
- func (dt Datetime) Clock() (hour, minute, sec int8)
- func (dt Datetime) ConvertToGoTime(loc *time.Location) time.Time
- func (dt Datetime) ConvertToMonth(secondDt Datetime) int64
- func (dt Datetime) DateTimeDiffWithUnit(its string, secondDt Datetime) (int64, error)
- func (dt Datetime) DatetimeMinusWithSecond(secondDt Datetime) int64
- func (dt Datetime) Day() uint8
- func (dt Datetime) DayHourStr() string
- func (dt Datetime) DayMicrosecondStr() string
- func (dt Datetime) DayMinuteStr() string
- func (dt Datetime) DayOfWeek() Weekday
- func (dt Datetime) DayOfYear() uint16
- func (dt Datetime) DaySecondStr() string
- func (dt Datetime) Hour() int8
- func (dt Datetime) HourMicrosecondStr() string
- func (dt Datetime) HourMinuteStr() string
- func (dt Datetime) HourSecondStr() string
- func (dt Datetime) MicroSec() int64
- func (dt Datetime) Minute() int8
- func (dt Datetime) MinuteMicrosecondStr() string
- func (dt Datetime) MinuteSecondStr() string
- func (dt Datetime) Month() uint8
- func (dt Datetime) Sec() int8
- func (dt Datetime) SecondMicrosecondStr() string
- func (dt Datetime) SecsSinceUnixEpoch() int64
- func (dt Datetime) String() string
- func (dt Datetime) String2(precision int32) string
- func (dt Datetime) ToDate() Date
- func (dt Datetime) ToTime(precision int32) Time
- func (dt Datetime) ToTimestamp(loc *time.Location) Timestamp
- func (dt Datetime) UnixTimestamp(loc *time.Location) int64
- func (dt Datetime) Week(mode int) int
- func (dt Datetime) WeekOfYear() (int32, uint8)
- func (dt Datetime) Year() uint16
- func (dt Datetime) YearMonthStr() string
- func (dt Datetime) YearWeek(mode int) (year int, week int)
- type Decimal
- type Decimal128
- func AlignDecimal128UsingScaleDiffBatch(src, dst []Decimal128, _ int32) []Decimal128
- func Decimal128Add(a, b Decimal128, s1, s2 int32) Decimal128
- func Decimal128AddAligned(a, b Decimal128) Decimal128
- func Decimal128Decimal128Div(a, b Decimal128) Decimal128
- func Decimal128Decimal128Mul(a, b Decimal128) Decimal128
- func Decimal128FromFloat64(f float64, width, scale int32) (Decimal128, error)
- func Decimal128FromInt32(i int32) Decimal128
- func Decimal128FromInt64Raw(a, b int64) Decimal128
- func Decimal128Int64Div(a Decimal128, b int64) Decimal128
- func Decimal128Int64Mul(a Decimal128, b int64) Decimal128
- func Decimal128Sub(a, b Decimal128, s1, s2 int32) Decimal128
- func Decimal128SubAligned(a, b Decimal128) Decimal128
- func Decimal128_FromDecimal64(d64 Decimal64) Decimal128
- func Decimal128_FromDecimal64WithScale(d64 Decimal64, width, scale int32) (Decimal128, error)
- func Decimal128_FromFloat64(f float64, width, scale int32) (Decimal128, error)
- func Decimal128_FromInt32(i int32) Decimal128
- func Decimal128_FromInt64(i int64, width, scale int32) (Decimal128, error)
- func Decimal128_FromString(s string) (Decimal128, error)
- func Decimal128_FromStringWithScale(s string, width, scale int32) (Decimal128, error)
- func Decimal128_FromUint32(i uint32) Decimal128
- func Decimal128_FromUint64(i uint64, width, scale int32) (Decimal128, error)
- func Decimal128_Inf() Decimal128
- func Decimal128_NaN() Decimal128
- func Decimal128_NegInf() Decimal128
- func Decimal64Decimal64Div(a, b Decimal64) Decimal128
- func Decimal64Decimal64Mul(a, b Decimal64) Decimal128
- func DecodeDecimal128(v []byte) Decimal128
- func InitDecimal128(i int64, width, scale int32) (Decimal128, error)
- func InitDecimal128UsingUint(i uint64, width, scale int32) (Decimal128, error)
- func MustDecimal128FromString(s string) Decimal128
- func NegDecimal128(d Decimal128) Decimal128
- func ParseStringToDecimal128(s string, width int32, scale int32, isBin bool) (Decimal128, error)
- func ParseStringToDecimal128WithoutTable(s string, isBin ...bool) (Decimal128, int32, error)
- func (d Decimal128) Add(x Decimal128) Decimal128
- func (d Decimal128) AddDecimal64(d64 Decimal64) Decimal128
- func (d Decimal128) AddInt64(i int64) Decimal128
- func (d Decimal128) Compare(other Decimal128) int
- func (d Decimal128) Div(x Decimal128) Decimal128
- func (d Decimal128) DivInt64(x int64) Decimal128
- func (d Decimal128) Eq(other Decimal128) bool
- func (d Decimal128) Ge(other Decimal128) bool
- func (d Decimal128) Gt(other Decimal128) bool
- func (d Decimal128) Le(other Decimal128) bool
- func (d Decimal128) Lt(other Decimal128) bool
- func (d Decimal128) Mul(x Decimal128) Decimal128
- func (d Decimal128) MulInt64(x int64) Decimal128
- func (d Decimal128) Ne(other Decimal128) bool
- func (d Decimal128) String() string
- func (d Decimal128) Sub(x Decimal128) Decimal128
- func (d Decimal128) SubInt64(i int64) Decimal128
- func (d Decimal128) ToDecimal64(width, scale int32) (Decimal64, error)
- func (d Decimal128) ToFloat64() float64
- func (d Decimal128) ToInt64() int64
- func (d Decimal128) ToString() string
- func (d Decimal128) ToStringWithScale(scale int32) string
- type Decimal64
- func AlignDecimal64UsingScaleDiffBatch(src, dst []Decimal64, _ int32) []Decimal64
- func Decimal64Add(a, b Decimal64, s1, s2 int32) Decimal64
- func Decimal64AddAligned(a, b Decimal64) Decimal64
- func Decimal64FromFloat64(f float64, width, scale int32) (Decimal64, error)
- func Decimal64FromInt32(i int32) Decimal64
- func Decimal64FromInt64Raw(a int64) Decimal64
- func Decimal64Int64Mul(a Decimal64, b int64) Decimal64
- func Decimal64Sub(a, b Decimal64, s1, s2 int32) Decimal64
- func Decimal64SubAligned(a, b Decimal64) Decimal64
- func Decimal64_FromFloat64(f float64, width int32, scale int32) (Decimal64, error)
- func Decimal64_FromInt32(i int32) Decimal64
- func Decimal64_FromInt64(i int64, width, scale int32) (Decimal64, error)
- func Decimal64_FromString(s string) (Decimal64, error)
- func Decimal64_FromStringWithScale(s string, width, scale int32) (Decimal64, error)
- func Decimal64_FromUint32(i uint32) Decimal64
- func Decimal64_FromUint64(i uint64, width, scale int32) (Decimal64, error)
- func Decimal64_Inf() Decimal64
- func Decimal64_NaN() Decimal64
- func Decimal64_NegInf() Decimal64
- func DecodeDecimal64(v []byte) Decimal64
- func InitDecimal64(i int64, width, scale int32) (Decimal64, error)
- func InitDecimal64UsingUint(i uint64, width, scale int32) (Decimal64, error)
- func MustDecimal64FromString(s string) Decimal64
- func ParseStringToDecimal64(s string, width int32, scale int32, isBin bool) (Decimal64, error)
- func ParseStringToDecimal64WithoutTable(s string, isBin ...bool) (Decimal64, int32, error)
- func (d Decimal64) Add(x Decimal64) Decimal64
- func (d Decimal64) AddInt64(i int64) Decimal64
- func (d Decimal64) Compare(other Decimal64) int
- func (d Decimal64) Div(x Decimal64) Decimal64
- func (d Decimal64) DivInt64(x int64) Decimal64
- func (d Decimal64) DivWiden(x Decimal64) Decimal128
- func (d Decimal64) Eq(other Decimal64) bool
- func (d Decimal64) Ge(other Decimal64) bool
- func (d Decimal64) Gt(other Decimal64) bool
- func (d Decimal64) Le(other Decimal64) bool
- func (d Decimal64) Lt(other Decimal64) bool
- func (d Decimal64) Mul(x Decimal64) Decimal64
- func (d Decimal64) MulInt64(x int64) Decimal64
- func (d Decimal64) MulWiden(x Decimal64) Decimal128
- func (d Decimal64) Ne(other Decimal64) bool
- func (d Decimal64) String() string
- func (d Decimal64) Sub(x Decimal64) Decimal64
- func (d Decimal64) SubInt64(i int64) Decimal64
- func (d Decimal64) ToFloat64() float64
- func (d Decimal64) ToInt64() int64
- func (d Decimal64) ToString() string
- func (d Decimal64) ToStringWithScale(scale int32) string
- type FixedBytes
- type FixedSizeT
- type Floats
- type IntervalType
- type Ints
- type MockHLCClock
- func (c *MockHLCClock) Get() timestamp.Timestamp
- func (c *MockHLCClock) HasNetworkLatency() bool
- func (c *MockHLCClock) MaxOffset() time.Duration
- func (c *MockHLCClock) Now() (timestamp.Timestamp, timestamp.Timestamp)
- func (c *MockHLCClock) SetNodeID(id uint16)
- func (c *MockHLCClock) Update(m timestamp.Timestamp)
- type Null
- type Number
- type OrderedT
- type Rowid
- type T
- type TS
- func (ts TS) Compare(rhs TS) int
- func (ts TS) Equal(rhs TS) bool
- func (ts TS) Greater(rhs TS) bool
- func (ts TS) GreaterEq(rhs TS) bool
- func (ts TS) IsEmpty() bool
- func (ts TS) Less(rhs TS) bool
- func (ts TS) LessEq(rhs TS) bool
- func (ts TS) Logical() uint32
- func (ts TS) Next() TS
- func (ts TS) Physical() int64
- func (ts TS) Prev() TS
- func (ts TS) ToString() string
- func (ts TS) ToTimestamp() timestamp.Timestamp
- type Time
- func DecodeTime(v []byte) Time
- func ParseDecimal128lToTime(input Decimal128, precision int32) (Time, error)
- func ParseDecimal64lToTime(input Decimal64, precision int32) (Time, error)
- func ParseInt64ToTime(input int64, precision int32) (Time, error)
- func ParseTime(s string, precision int32) (Time, error)
- func TimeFromClock(isNegative bool, hour uint64, minute, sec uint8, msec uint32) Time
- func (t Time) AddInterval(nums int64, its IntervalType) (Time, bool)
- func (t Time) ClockFormat() (hour uint64, minute, sec uint8, msec uint64, isNeg bool)
- func (t Time) ConvertToInterval(ctx context.Context, its string) (int64, error)
- func (t Time) Hour() int64
- func (t Time) MicroSec() int64
- func (t Time) Minute() int8
- func (t Time) NumericString(precision int32) string
- func (t Time) Sec() int8
- func (t Time) String() string
- func (t Time) String2(precision int32) string
- func (t Time) ToDate() Date
- func (t Time) ToDatetime(precision int32) Datetime
- func (t Time) ToDecimal128(ctx context.Context, width, precision int32) (Decimal128, error)
- func (t Time) ToDecimal64(ctx context.Context, width, precision int32) (Decimal64, error)
- func (t Time) ToInt64() int64
- type TimeType
- type Timestamp
- func CurrentTimestamp() Timestamp
- func DecodeTimestamp(v []byte) Timestamp
- func FromClockUTC(year int32, month, day, hour, minute, sec uint8, msec uint32) Timestamp
- func FromClockZone(loc *time.Location, year int32, month, day, hour, minute, sec uint8, ...) Timestamp
- func ParseTimestamp(loc *time.Location, s string, precision int32) (Timestamp, error)
- func UnixMicroToTimestamp(ts int64) Timestamp
- func UnixNanoToTimestamp(ts int64) Timestamp
- func UnixToTimestamp(ts int64) Timestamp
- type TsAlloctor
- type Tuple
- type TupleElement
- type Type
- func (t Type) DescString() string
- func (t Type) Eq(b Type) bool
- func (t Type) IsBoolean() bool
- func (t Type) IsFixedLen() bool
- func (t Type) IsFloat() bool
- func (t Type) IsInt() bool
- func (t Type) IsIntOrUint() bool
- func (t Type) IsString() bool
- func (t Type) IsTuple() bool
- func (t Type) IsUInt() bool
- func (t Type) IsVarlen() bool
- func (t Type) String() string
- func (t Type) TypeSize() int
- type UInts
- type Uuid
- func (d Uuid) ClockSequence() int
- func (d Uuid) Compare(other Uuid) int
- func (d Uuid) Eq(other Uuid) bool
- func (d Uuid) Ge(other Uuid) bool
- func (d Uuid) Gt(other Uuid) bool
- func (d Uuid) Le(other Uuid) bool
- func (d Uuid) Lt(other Uuid) bool
- func (d Uuid) Ne(other Uuid) bool
- func (d Uuid) ToString() string
- type Varlena
- func (v *Varlena) ByteSlice() []byte
- func (v *Varlena) GetByteSlice(area []byte) []byte
- func (v *Varlena) GetString(area []byte) string
- func (v *Varlena) IsSmall() bool
- func (v *Varlena) OffsetLen() (uint32, uint32)
- func (v *Varlena) Reset()
- func (v *Varlena) SetOffsetLen(voff, vlen uint32)
- func (v *Varlena) U32Slice() []uint32
- func (v *Varlena) UnsafePtr() unsafe.Pointer
- type Weekday
Constants ¶
const ( VarlenaInlineSize = 23 VarlenaSize = 24 MaxStringSize = 10485760 VarlenaBigHdr = 0xffffffff MaxVarcharLen = 65535 MaxCharLen = 255 )
const ( MaxDateYear = 9999 MinDateYear = 1 MaxMonthInYear = 12 MinMonthInYear = 1 )
const ( DateType = 0 DateTimeType = 1 TimeStampType = 2 )
const ( Start = iota YearState MonthState DayState HourState MinuteState SecondState MsState End )
const ( // WeekMondayFirst: set Monday as first day of week; otherwise Sunday is first day of week WeekMondayFirst weekBehaviour = 1 // WeekYear: If set, Week is in range 1-53, otherwise Week is in range 0-53. // Week 0 is returned for the the last week of the previous year (for // a date at start of january) In this case one can get 53 for the // first week of next year. This flag ensures that the week is // relevant for the given year. Note that this flag is only // releveant if WEEK_JANUARY is not set. WeekYear = 2 //WeekFirstWeekday: If not set, Weeks are numbered according to ISO 8601:1988. // If set, the week that contains the first 'first-day-of-week' is week 1. // ISO 8601:1988 means that if the week containing January 1 has // four or more days in the new year, then it is week 1; // Otherwise it is the last week of the previous year, and the next week is week 1. WeekFirstWeekday = 4 )
const ( NanoSecsPerSec = 1000000000 // 10^9 MillisecsPerSec = 1000 // 10^3 MaxDatetimeYear = 9999 MinDatetimeYear = 1 )
const ( // Max string buf + 1 (\0) needed by decimal64 DECIMAL64_ZSTR_LEN = 25 DECIMAL64_WIDTH = 16 DECIMAL64_NBYTES = 8 // Max string buf + 1 (\0) needed by decimal128 DECIMAL128_ZSTR_LEN = 43 DECIMAL128_WIDTH = 34 DECIMAL128_NBYTES = 16 MYSQL_DEFAULT_SCALE = 4 )
const ( TSize int = int(unsafe.Sizeof(Type{})) DateSize int = 4 TimeSize int = 8 DatetimeSize int = 8 TimestampSize int = 8 Decimal64Size int = 8 Decimal128Size int = 16 UuidSize int = 16 )
const ( // Time range is [-2562047787:59:59.999999,2562047787:59:59.999999] // This is the max hour that int64 with solution msec can present // (9223372036854775807(max int64)/1000000(msec) - 1)/3600(sec per hour) - 1 = 2562047787 MinHourInTime, MaxHourInTime = 0, 2562047787 MinInputIntTime, MaxInputIntTime = -25620477875959, 25620477875959 )
const ( TxnTsSize = 12 RowidSize = 16 )
const IntervalNumMAX = int64(^uint64(0) >> 21)
const PackerMemUnit = 64
Variables ¶
var Decimal128Max = Decimal128_Inf()
var Decimal128Min = Decimal128_NegInf()
var Decimal64Max = Decimal64_Inf()
var Decimal64Min = Decimal64_NegInf()
var (
FillString = []string{"", "0", "00", "000", "0000", "00000", "000000", "0000000"}
)
var OneSecInMicroSeconds = uint32(1000000)
var Types map[string]T = map[string]T{ "bool": T_bool, "tinyint": T_int8, "smallint": T_int16, "int": T_int32, "integer": T_int32, "bigint": T_int64, "tinyint unsigned": T_uint8, "smallint unsigned": T_uint16, "int unsigned": T_uint32, "integer unsigned": T_uint32, "bigint unsigned": T_uint64, "decimal64": T_decimal64, "decimal128": T_decimal128, "float": T_float32, "double": T_float64, "date": T_date, "datetime": T_datetime, "time": T_time, "timestamp": T_timestamp, "interval": T_interval, "char": T_char, "varchar": T_varchar, "json": T_json, "text": T_text, "blob": T_blob, "uuid": T_uuid, "transaction timestamp": T_TS, "rowid": T_Rowid, }
Functions ¶
func AppendBoolToByteArray ¶ added in v0.5.0
func BoolToIntString ¶ added in v0.6.0
ToIntString print out 1 or 0 as true/false.
func CharsetType ¶ added in v0.6.0
func CompareDecimal128 ¶ added in v0.6.0
func CompareDecimal128(a, b Decimal128) int
func CompareDecimal128Decimal128 ¶
func CompareDecimal128Decimal128(a, b Decimal128, s1, s2 int32) int64
func CompareDecimal128Decimal128Aligned ¶
func CompareDecimal128Decimal128Aligned(a, b Decimal128) int64
func CompareRowidRowidAligned ¶ added in v0.6.0
func CompareTSTSAligned ¶ added in v0.6.0
func CompareUuid ¶ added in v0.6.0
func Decimal128IsZero ¶
func Decimal128IsZero(d Decimal128) bool
func Decimal128ToInt64Raw ¶ added in v0.6.0
func Decimal128ToInt64Raw(d Decimal128) (int64, int64)
func Decimal64IsZero ¶ added in v0.6.0
func Decimal64ToInt64Raw ¶ added in v0.6.0
func DecodeBool ¶ added in v0.6.0
func DecodeFixed ¶ added in v0.6.0
func DecodeFixed[T FixedSizeT](v []byte) T
func DecodeFloat32 ¶ added in v0.6.0
func DecodeFloat64 ¶ added in v0.6.0
func DecodeInt16 ¶ added in v0.6.0
func DecodeInt32 ¶ added in v0.6.0
func DecodeInt64 ¶ added in v0.6.0
func DecodeInt8 ¶ added in v0.6.0
func DecodeJson ¶ added in v0.6.0
func DecodeSlice ¶ added in v0.6.0
func DecodeStringSlice ¶ added in v0.6.0
func DecodeUint16 ¶ added in v0.6.0
func DecodeUint32 ¶ added in v0.6.0
func DecodeUint64 ¶ added in v0.6.0
func DecodeUint8 ¶ added in v0.6.0
func DecodeValue ¶ added in v0.6.0
func EncodeBool ¶ added in v0.6.0
func EncodeDate ¶ added in v0.6.0
func EncodeDatetime ¶ added in v0.6.0
func EncodeDecimal128 ¶ added in v0.6.0
func EncodeDecimal128(v *Decimal128) []byte
func EncodeDecimal64 ¶ added in v0.6.0
func EncodeFixed ¶ added in v0.6.0
func EncodeFixed[T FixedSizeT](v T) []byte
func EncodeFloat32 ¶ added in v0.6.0
func EncodeFloat64 ¶ added in v0.6.0
func EncodeInt16 ¶ added in v0.6.0
func EncodeInt32 ¶ added in v0.6.0
func EncodeInt64 ¶ added in v0.6.0
func EncodeInt8 ¶ added in v0.6.0
func EncodeSlice ¶ added in v0.6.0
func EncodeSliceWithCap ¶ added in v0.6.0
func EncodeStringSlice ¶ added in v0.6.0
func EncodeTime ¶ added in v0.6.0
func EncodeTimestamp ¶ added in v0.6.0
func EncodeType ¶ added in v0.6.0
func EncodeUint16 ¶ added in v0.6.0
func EncodeUint32 ¶ added in v0.6.0
func EncodeUint64 ¶ added in v0.6.0
func EncodeUint8 ¶ added in v0.6.0
func EncodeUuid ¶ added in v0.6.0
func EncodeValue ¶ added in v0.6.0
func GetUnixEpochSecs ¶ added in v0.7.0
func GetUnixEpochSecs() int64
func IsAllNumber ¶ added in v0.7.0
func IsDateRelate ¶ added in v0.6.0
func IsSignedInt ¶ added in v0.6.0
isSignedInt: return true if the types.T is Signed integer type
func IsUnsignedInt ¶ added in v0.6.0
isUnsignedInt: return true if the types.T is UnSigned integer type
func JudgeIntervalNumOverflow ¶ added in v0.5.0
func JudgeIntervalNumOverflow(num int64, it IntervalType) error
func NewPackerArray ¶ added in v0.6.0
func NewProtoType ¶ added in v0.6.0
func ParseSliceToByteJson ¶ added in v0.6.0
func ParseStringToByteJson ¶ added in v0.6.0
func UnitIsDayOrLarger ¶ added in v0.5.0
func UnitIsDayOrLarger(it IntervalType) bool
UnitIsDayOrLarger if interval type unit is day or larger, we return true else return false use to judge a string whether it needs to become date/datetime type when we use date_add/sub(str string, interval type)
func UuidToString ¶ added in v0.6.0
func ValidDatetime ¶ added in v0.6.0
date[0001-01-01 00:00:00 to 9999-12-31 23:59:59]
func ValidTimeInDay ¶ added in v0.6.0
validTimeInDay return true if hour, minute and second can be a time during a day
func ValidTimestamp ¶ added in v0.5.0
Types ¶
type BuiltinNumber ¶ added in v0.6.0
type Date ¶
type Date int32
func DateFromCalendar ¶ added in v0.7.0
func DecodeDate ¶ added in v0.6.0
func ParseDateCast ¶ added in v0.5.0
rewrite ParseDateCast, don't use regexp, that's too slow the format we need to support: 1.yyyy-mm-dd hh:mm:ss.ms 2.yyyy-mm-dd 3.yyyymmdd
func (Date) DaysSinceUnixEpoch ¶ added in v0.7.0
func (Date) ToDatetime ¶ added in v0.6.0
func (Date) Week ¶ added in v0.6.0
Week (00..53), where Sunday is the first day of the week; WEEK() mode 0 Week (00..53), where Monday is the first day of the week; WEEK() mode 1
func (Date) WeekOfYear ¶
func (Date) WeekOfYear2 ¶ added in v0.5.0
func (Date) YearMonthStr ¶ added in v0.5.0
type Datetime ¶
type Datetime int64
func DatetimeFromClock ¶ added in v0.7.0
func DatetimeFromUnix ¶ added in v0.7.0
func DatetimeFromUnixWithNsec ¶ added in v0.7.0
func DecodeDatetime ¶ added in v0.6.0
func ParseDatetime ¶
ParseDatetime will parse a string to be a Datetime Support Format: 1. all the Date value 2. yyyy-mm-dd hh:mm:ss(.msec) now support mm/dd/hh/mm/ss can be single number 3. yyyymmddhhmmss(.msec) during parsing, the Datetime value will be rounded(away from zero) to the predefined precision, for example: Datetime(3) input string parsing result
"1999-09-09 11:11:11.1234" "1999-09-09 11:11:11.123" "1999-09-09 11:11:11.1235" "1999-09-09 11:11:11.124" "1999-09-09 11:11:11.9994" "1999-09-09 11:11:11.999" "1999-09-09 11:11:11.9995" "1999-09-09 11:11:12.000"
func TimestampToDatetime ¶ added in v0.5.0
func (Datetime) AddDateTime ¶ added in v0.5.0
func (Datetime) AddInterval ¶ added in v0.5.0
AddInterval now date or datetime use the function to add/sub date, we need a bool arg to tell isDate/isDatetime date/datetime have different regions, so we don't use same valid function return type bool means the if the date/datetime is valid
func (Datetime) ConvertToGoTime ¶ added in v0.5.0
func (Datetime) ConvertToMonth ¶ added in v0.6.0
func (Datetime) DateTimeDiffWithUnit ¶ added in v0.6.0
func (Datetime) DatetimeMinusWithSecond ¶ added in v0.6.0
func (Datetime) DayHourStr ¶ added in v0.5.0
func (Datetime) DayMicrosecondStr ¶ added in v0.5.0
func (Datetime) DayMinuteStr ¶ added in v0.5.0
func (Datetime) DaySecondStr ¶ added in v0.5.0
func (Datetime) HourMicrosecondStr ¶ added in v0.5.0
func (Datetime) HourMinuteStr ¶ added in v0.5.0
func (Datetime) HourSecondStr ¶ added in v0.5.0
func (Datetime) MinuteMicrosecondStr ¶ added in v0.5.0
func (Datetime) MinuteSecondStr ¶ added in v0.5.0
func (Datetime) SecondMicrosecondStr ¶ added in v0.5.0
func (Datetime) SecsSinceUnixEpoch ¶ added in v0.7.0
func (Datetime) ToTime ¶ added in v0.6.0
We need to truncate the part after precision position when cast between different precision.
func (Datetime) ToTimestamp ¶ added in v0.6.0
func (Datetime) UnixTimestamp ¶ added in v0.5.0
func (Datetime) WeekOfYear ¶ added in v0.5.0
func (Datetime) YearMonthStr ¶ added in v0.5.0
type Decimal ¶ added in v0.5.0
type Decimal interface { Decimal64 | Decimal128 }
type Decimal128 ¶
type Decimal128 [16]byte
var Decimal128_One Decimal128 = Decimal128FromInt32(1)
var Decimal128_Ten Decimal128 = Decimal128FromInt32(10)
var Decimal128_Three Decimal128 = Decimal128FromInt32(3)
var Decimal128_Two Decimal128 = Decimal128FromInt32(2)
var Decimal128_Zero Decimal128 = Decimal128FromInt32(0)
func AlignDecimal128UsingScaleDiffBatch ¶ added in v0.5.0
func AlignDecimal128UsingScaleDiffBatch(src, dst []Decimal128, _ int32) []Decimal128
func Decimal128Add ¶
func Decimal128Add(a, b Decimal128, s1, s2 int32) Decimal128
func Decimal128AddAligned ¶
func Decimal128AddAligned(a, b Decimal128) Decimal128
func Decimal128Decimal128Div ¶
func Decimal128Decimal128Div(a, b Decimal128) Decimal128
func Decimal128Decimal128Mul ¶
func Decimal128Decimal128Mul(a, b Decimal128) Decimal128
func Decimal128FromFloat64 ¶ added in v0.6.0
func Decimal128FromFloat64(f float64, width, scale int32) (Decimal128, error)
func Decimal128FromInt32 ¶ added in v0.6.0
func Decimal128FromInt32(i int32) Decimal128
func Decimal128FromInt64Raw ¶ added in v0.6.0
func Decimal128FromInt64Raw(a, b int64) Decimal128
func Decimal128Int64Div ¶ added in v0.5.0
func Decimal128Int64Div(a Decimal128, b int64) Decimal128
func Decimal128Int64Mul ¶ added in v0.5.0
func Decimal128Int64Mul(a Decimal128, b int64) Decimal128
func Decimal128Sub ¶
func Decimal128Sub(a, b Decimal128, s1, s2 int32) Decimal128
func Decimal128SubAligned ¶
func Decimal128SubAligned(a, b Decimal128) Decimal128
func Decimal128_FromDecimal64 ¶ added in v0.6.0
func Decimal128_FromDecimal64(d64 Decimal64) Decimal128
func Decimal128_FromDecimal64WithScale ¶ added in v0.6.0
func Decimal128_FromDecimal64WithScale(d64 Decimal64, width, scale int32) (Decimal128, error)
func Decimal128_FromFloat64 ¶ added in v0.6.0
func Decimal128_FromFloat64(f float64, width, scale int32) (Decimal128, error)
func Decimal128_FromInt32 ¶ added in v0.6.0
func Decimal128_FromInt32(i int32) Decimal128
Conversions, from go type to decimal128
func Decimal128_FromInt64 ¶ added in v0.6.0
func Decimal128_FromInt64(i int64, width, scale int32) (Decimal128, error)
func Decimal128_FromString ¶ added in v0.6.0
func Decimal128_FromString(s string) (Decimal128, error)
func Decimal128_FromStringWithScale ¶ added in v0.6.0
func Decimal128_FromStringWithScale(s string, width, scale int32) (Decimal128, error)
func Decimal128_FromUint32 ¶ added in v0.6.0
func Decimal128_FromUint32(i uint32) Decimal128
func Decimal128_FromUint64 ¶ added in v0.6.0
func Decimal128_FromUint64(i uint64, width, scale int32) (Decimal128, error)
func Decimal128_Inf ¶ added in v0.6.0
func Decimal128_Inf() Decimal128
func Decimal128_NaN ¶ added in v0.6.0
func Decimal128_NaN() Decimal128
func Decimal128_NegInf ¶ added in v0.6.0
func Decimal128_NegInf() Decimal128
func Decimal64Decimal64Div ¶
func Decimal64Decimal64Div(a, b Decimal64) Decimal128
func Decimal64Decimal64Mul ¶
func Decimal64Decimal64Mul(a, b Decimal64) Decimal128
func DecodeDecimal128 ¶ added in v0.6.0
func DecodeDecimal128(v []byte) Decimal128
func InitDecimal128 ¶
func InitDecimal128(i int64, width, scale int32) (Decimal128, error)
func InitDecimal128UsingUint ¶ added in v0.5.0
func InitDecimal128UsingUint(i uint64, width, scale int32) (Decimal128, error)
func MustDecimal128FromString ¶ added in v0.6.0
func MustDecimal128FromString(s string) Decimal128
func NegDecimal128 ¶
func NegDecimal128(d Decimal128) Decimal128
func ParseStringToDecimal128 ¶
func ParseStringToDecimal128WithoutTable ¶
func ParseStringToDecimal128WithoutTable(s string, isBin ...bool) (Decimal128, int32, error)
func (Decimal128) Add ¶ added in v0.6.0
func (d Decimal128) Add(x Decimal128) Decimal128
func (Decimal128) AddDecimal64 ¶ added in v0.6.0
func (d Decimal128) AddDecimal64(d64 Decimal64) Decimal128
func (Decimal128) AddInt64 ¶ added in v0.6.0
func (d Decimal128) AddInt64(i int64) Decimal128
func (Decimal128) Compare ¶ added in v0.6.0
func (d Decimal128) Compare(other Decimal128) int
func (Decimal128) Div ¶ added in v0.6.0
func (d Decimal128) Div(x Decimal128) Decimal128
func (Decimal128) DivInt64 ¶ added in v0.6.0
func (d Decimal128) DivInt64(x int64) Decimal128
func (Decimal128) Eq ¶ added in v0.6.0
func (d Decimal128) Eq(other Decimal128) bool
func (Decimal128) Ge ¶ added in v0.6.0
func (d Decimal128) Ge(other Decimal128) bool
func (Decimal128) Gt ¶ added in v0.6.0
func (d Decimal128) Gt(other Decimal128) bool
func (Decimal128) Le ¶ added in v0.6.0
func (d Decimal128) Le(other Decimal128) bool
func (Decimal128) Lt ¶ added in v0.6.0
func (d Decimal128) Lt(other Decimal128) bool
func (Decimal128) Mul ¶ added in v0.6.0
func (d Decimal128) Mul(x Decimal128) Decimal128
func (Decimal128) MulInt64 ¶ added in v0.6.0
func (d Decimal128) MulInt64(x int64) Decimal128
func (Decimal128) Ne ¶ added in v0.6.0
func (d Decimal128) Ne(other Decimal128) bool
func (Decimal128) String ¶ added in v0.6.0
func (d Decimal128) String() string
func (Decimal128) Sub ¶ added in v0.6.0
func (d Decimal128) Sub(x Decimal128) Decimal128
func (Decimal128) SubInt64 ¶ added in v0.6.0
func (d Decimal128) SubInt64(i int64) Decimal128
func (Decimal128) ToDecimal64 ¶ added in v0.6.0
func (d Decimal128) ToDecimal64(width, scale int32) (Decimal64, error)
func (Decimal128) ToFloat64 ¶ added in v0.6.0
func (d Decimal128) ToFloat64() float64
func (Decimal128) ToInt64 ¶ added in v0.6.0
func (d Decimal128) ToInt64() int64
func (Decimal128) ToString ¶ added in v0.6.0
func (d Decimal128) ToString() string
func (Decimal128) ToStringWithScale ¶ added in v0.6.0
func (d Decimal128) ToStringWithScale(scale int32) string
type Decimal64 ¶
type Decimal64 [8]byte
var Decimal64_One Decimal64 = Decimal64FromInt32(1)
var Decimal64_Ten Decimal64 = Decimal64FromInt32(10)
var Decimal64_Three Decimal64 = Decimal64FromInt32(3)
var Decimal64_Two Decimal64 = Decimal64FromInt32(2)
var Decimal64_Zero Decimal64 = Decimal64FromInt32(0)
func AlignDecimal64UsingScaleDiffBatch ¶ added in v0.5.0
func Decimal64Add ¶
func Decimal64AddAligned ¶
func Decimal64FromFloat64 ¶ added in v0.6.0
func Decimal64FromInt32 ¶ added in v0.6.0
func Decimal64FromInt64Raw ¶ added in v0.6.0
func Decimal64Int64Mul ¶ added in v0.5.0
func Decimal64Sub ¶
func Decimal64SubAligned ¶
func Decimal64_FromFloat64 ¶ added in v0.6.0
func Decimal64_FromInt32 ¶ added in v0.6.0
Conversions, from go type to decimal64
func Decimal64_FromInt64 ¶ added in v0.6.0
func Decimal64_FromString ¶ added in v0.6.0
func Decimal64_FromStringWithScale ¶ added in v0.6.0
func Decimal64_FromUint32 ¶ added in v0.6.0
func Decimal64_FromUint64 ¶ added in v0.6.0
func Decimal64_Inf ¶ added in v0.6.0
func Decimal64_Inf() Decimal64
func Decimal64_NaN ¶ added in v0.6.0
func Decimal64_NaN() Decimal64
func Decimal64_NegInf ¶ added in v0.6.0
func Decimal64_NegInf() Decimal64
func DecodeDecimal64 ¶ added in v0.6.0
func InitDecimal64 ¶ added in v0.5.0
func InitDecimal64UsingUint ¶ added in v0.6.0
func MustDecimal64FromString ¶ added in v0.6.0
func ParseStringToDecimal64 ¶
Wrap old decimal api. Most likely we should delete them.
func ParseStringToDecimal64WithoutTable ¶ added in v0.6.0
func (Decimal64) DivWiden ¶ added in v0.6.0
func (d Decimal64) DivWiden(x Decimal64) Decimal128
func (Decimal64) MulWiden ¶ added in v0.6.0
func (d Decimal64) MulWiden(x Decimal64) Decimal128
func (Decimal64) ToStringWithScale ¶ added in v0.6.0
type FixedBytes ¶ added in v0.6.0
Fixed bytes. Deciaml64/128 and Varlena are not included because they has special meanings. In general you cannot compare them as bytes.
type FixedSizeT ¶ added in v0.6.0
FixedSized types in our type system. Esp, Varlena.
type IntervalType ¶ added in v0.5.0
type IntervalType int8
const ( IntervalTypeInvalid IntervalType = iota MicroSecond Second Minute Hour Day Week Month Quarter Year Second_MicroSecond Minute_MicroSecond Minute_Second Hour_MicroSecond Hour_Second Hour_Minute Day_MicroSecond Day_Second Day_Minute Day_Hour Year_Month IntervalTypeMax )
func IntervalTypeOf ¶ added in v0.5.0
func IntervalTypeOf(s string) (IntervalType, error)
func NormalizeInterval ¶ added in v0.5.0
func NormalizeInterval(s string, it IntervalType) (ret int64, rettype IntervalType, err error)
func (IntervalType) String ¶ added in v0.5.0
func (it IntervalType) String() string
type MockHLCClock ¶ added in v0.6.0
type MockHLCClock struct {
// contains filtered or unexported fields
}
func NewMockHLCClock ¶ added in v0.6.0
func NewMockHLCClock(start int64) *MockHLCClock
Just for test , start >= 1
func (*MockHLCClock) Get ¶ added in v0.6.0
func (c *MockHLCClock) Get() timestamp.Timestamp
TODO::will be removed
func (*MockHLCClock) HasNetworkLatency ¶ added in v0.6.0
func (c *MockHLCClock) HasNetworkLatency() bool
func (*MockHLCClock) MaxOffset ¶ added in v0.6.0
func (c *MockHLCClock) MaxOffset() time.Duration
func (*MockHLCClock) Now ¶ added in v0.6.0
func (c *MockHLCClock) Now() (timestamp.Timestamp, timestamp.Timestamp)
func (*MockHLCClock) SetNodeID ¶ added in v0.6.0
func (c *MockHLCClock) SetNodeID(id uint16)
func (*MockHLCClock) Update ¶ added in v0.6.0
func (c *MockHLCClock) Update(m timestamp.Timestamp)
type Null ¶ added in v0.6.0
type Null struct{}
Very opinioned code, almost surely a bug, but there you go.
type T ¶
type T uint8
const ( // any family T_any T = 0 T_star T = 1 // bool family T_bool T = 10 // numeric/integer family T_int8 T = 20 T_int16 T = 21 T_int32 T = 22 T_int64 T = 23 T_int128 T = 24 T_uint8 T = 25 T_uint16 T = 26 T_uint32 T = 27 T_uint64 T = 28 T_uint128 T = 29 // numeric/float family T_float32 T = 30 T_float64 T = 31 // numeric/decimals T_decimal64 T = 32 T_decimal128 T = 33 // date and time T_date T = 50 T_time T = 51 T_datetime T = 52 T_timestamp T = 53 T_interval T = 54 // string family T_char T = 60 T_varchar T = 61 T_json T = 62 T_uuid T = 63 // blobs T_blob T = 70 T_text T = 71 // Transaction TS T_TS T = 100 T_Rowid T = 101 // system family T_tuple T = 201 )
func (T) FixedLength ¶
FixedLength dangerous code, use TypeLen() if you don't want -8, -16, -24
type TS ¶ added in v0.6.0
timestamp for transaction: physical time (higher 8 bytes) + logical (lower 4 bytes) See txts.go for impl.
var SystemDBTS TS
Why this was in package types?
func NextGlobalTsForTest ¶ added in v0.6.0
func NextGlobalTsForTest() TS
func StringToTS ¶ added in v0.6.0
func TimestampToTS ¶ added in v0.6.0
TODO::need to take "NodeID" account into
func (TS) Physical ¶ added in v0.6.0
Transaction ts contains a physical ts in higher 8 bytes and a logical in lower 4 bytes. higher lower in little ending sense.
func (TS) ToTimestamp ¶ added in v0.6.0
type Time ¶ added in v0.6.0
type Time int64
func DecodeTime ¶ added in v0.6.0
func ParseDecimal128lToTime ¶ added in v0.7.0
func ParseDecimal128lToTime(input Decimal128, precision int32) (Time, error)
func ParseDecimal64lToTime ¶ added in v0.7.0
func ParseInt64ToTime ¶ added in v0.6.0
func ParseTime ¶ added in v0.6.0
During parsing, if the input length of msec is larger than predefined precision, it will be rounded eg.
Time(3) input string parsing result "11:11:11.1234" "11:11:11.123" "11:11:11.1235" "11:11:11.124" "11:11:11.9994" "11:11:11.999" "11:11:11.9995" "11:11:12.000" "-11:11:11.1235" "-11:11:11.124" "-11:11:11.9995" "-11:11:12.000"
func TimeFromClock ¶ added in v0.7.0
func (Time) AddInterval ¶ added in v0.6.0
func (t Time) AddInterval(nums int64, its IntervalType) (Time, bool)
AddInterval now date or time use the function to add/sub date, return type bool means the if the time is valid
func (Time) ClockFormat ¶ added in v0.6.0
ClockFormat: symbol part/hour part/minute part/second part/msecond part
func (Time) ConvertToInterval ¶ added in v0.6.0
func (Time) NumericString ¶ added in v0.6.0
Format: hhmmss.msec TODO: add the carry when truncate
func (Time) ToDatetime ¶ added in v0.6.0
We need to truncate the part after precision position when cast between different precision.
func (Time) ToDecimal128 ¶ added in v0.6.0
func (Time) ToDecimal64 ¶ added in v0.6.0
type Timestamp ¶ added in v0.5.0
type Timestamp int64
var TimestampMaxValue Timestamp
var TimestampMinValue Timestamp
func CurrentTimestamp ¶ added in v0.6.0
func CurrentTimestamp() Timestamp
func DecodeTimestamp ¶ added in v0.6.0
func FromClockUTC ¶ added in v0.5.0
FromClockUTC gets the utc time value in Timestamp
func FromClockZone ¶ added in v0.6.0
func FromClockZone(loc *time.Location, year int32, month, day, hour, minute, sec uint8, msec uint32) Timestamp
FromClockZone gets the local time value in Timestamp
func ParseTimestamp ¶ added in v0.5.0
ParseTimestamp will parse a string to be a Timestamp Support Format: 1. all the Date value 2. yyyy-mm-dd hh:mm:ss(.msec) 3. yyyymmddhhmmss(.msec)
func UnixMicroToTimestamp ¶ added in v0.6.0
func UnixNanoToTimestamp ¶ added in v0.7.0
func UnixToTimestamp ¶ added in v0.5.0
func (Timestamp) String2 ¶ added in v0.5.0
String2 stringify timestamp, including its fractional seconds precision part(fsp)
func (Timestamp) UnixToDecimal128 ¶ added in v0.6.0
func (ts Timestamp) UnixToDecimal128() (Decimal128, error)
func (Timestamp) UnixToFloat ¶ added in v0.6.0
type TsAlloctor ¶ added in v0.6.0
type TsAlloctor struct {
// contains filtered or unexported fields
}
var ( //just for test GlobalTsAlloctor *TsAlloctor )
TAE test infra, should move out
func NewTsAlloctor ¶ added in v0.6.0
func NewTsAlloctor(clock clock.Clock) *TsAlloctor
func (*TsAlloctor) Alloc ¶ added in v0.6.0
func (alloc *TsAlloctor) Alloc() TS
func (*TsAlloctor) SetStart ¶ added in v0.6.0
func (alloc *TsAlloctor) SetStart(start TS)
type Tuple ¶ added in v0.6.0
type Tuple []TupleElement
type TupleElement ¶ added in v0.6.0
type TupleElement interface{}
type Type ¶
type Type struct { Oid T // XXX Dummies. T is uint8, make it 4 bytes aligned, otherwise, it may contain // garbage data. In theory these unused garbage should not be a problem, but // it is. Give it a name will zero fill it ... Charset uint8 // Width means max Display width for float and double, char and varchar // todo: need to add new attribute DisplayWidth ? Size int32 Width int32 Scale int32 Precision int32 // contains filtered or unexported fields }
var CompoundKeyType Type
CompoundKeyType -- this is simply deadly wrong thing.
func DecodeType ¶ added in v0.6.0
func MockColTypes ¶ added in v0.6.0
func (Type) DescString ¶ added in v0.7.0
func (Type) IsFixedLen ¶ added in v0.6.0
func (Type) IsIntOrUint ¶ added in v0.6.0
type Uuid ¶ added in v0.6.0
type Uuid [16]byte
UUID is Version 1 UUID based on the current NodeID and clock sequence, and the current time.
func DecodeUuid ¶ added in v0.6.0
func (Uuid) ClockSequence ¶ added in v0.6.0
type Varlena ¶ added in v0.6.0
type Varlena [VarlenaSize]byte
func BuildVarlena ¶ added in v0.6.0
func (*Varlena) GetByteSlice ¶ added in v0.6.0
For short slice, this one will return a slice stored internal in the varlena. Caller must ensure that v has a longer life span than the returned byte slice.
Main user of Varlena is vector. v that comes from vector.Data will be fine.