Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Date ¶
type Date uint16
two bytes as the number of days since 1970-01-01 (unsigned).
func TimeToDate ¶
type DateTime64 ¶
type DateTime64 int64
func TimeToDateTime64 ¶
func TimeToDateTime64(t time.Time, precision int) DateTime64
func (DateTime64) FromTime ¶
func (d DateTime64) FromTime(v time.Time, precision int) DateTime64
func (DateTime64) GetCHType ¶
func (d DateTime64) GetCHType() string
type Decimal128 ¶
type Decimal128 Int128
Decimal128 represents a 128-bit decimal number.
func (Decimal128) Append ¶
func (d Decimal128) Append(scale int, b []byte) []byte
Float64 converts decimal number to float64.
func (Decimal128) Float64 ¶
func (d Decimal128) Float64(scale int) float64
Float64 converts decimal number to float64.
func (Decimal128) String ¶
func (d Decimal128) String(scale int) string
Float64 converts decimal number to string.
func (Decimal128) ToInt128 ¶
func (d Decimal128) ToInt128(scale int) Int128
type Decimal256 ¶
type Decimal256 Int256
Decimal256 represents a 256-bit decimal number.
func (Decimal256) Append ¶
func (d Decimal256) Append(scale int, b []byte) []byte
Float64 converts decimal number to float64.
func (Decimal256) Float64 ¶
func (d Decimal256) Float64(scale int) float64
Float64 converts decimal number to float64.
func (Decimal256) String ¶
func (d Decimal256) String(scale int) string
Float64 converts decimal number to string.
func (Decimal256) ToInt256 ¶
func (d Decimal256) ToInt256(scale int) Int256
type Decimal32 ¶
type Decimal32 int32
Decimal32 represents a 32-bit decimal number.
func Decimal32FromFloat64 ¶
Decimal32FromFloat64 converts float64 to decimal32 number.
type Decimal64 ¶
type Decimal64 int64
Decimal64 represents a 64-bit decimal number.
func Decimal64FromFloat64 ¶
Decimal64FromFloat64 converts float64 to decimal64 number.
type IPv4 ¶
type IPv4 [4]byte
IPv4 is a compatible type for IPv4 address in clickhouse.
clickhouse use Little endian for IPv4. but golang use big endian
func IPv4FromAddr ¶
func (IPv4) MarshalText ¶
type Int128 ¶
Int128 is an signed 128-bit number. All methods are immutable, works just like standard uint64.
func Int128From64 ¶
From64 converts 64-bit value v to a Int128 value. Upper 64-bit half will be zero.
func Int128FromBig ¶
FromBig converts *big.Int to 128-bit Int128 value ignoring overflows. If input integer is nil or negative then return Zero. If input interger overflows 128-bit then return Max.
func Int128FromBigEx ¶
FromBigEx converts *big.Int to 128-bit Int128 value (eXtended version). Provides ok successful flag as a second return value. If input integer is negative or overflows 128-bit then ok=false. If input is nil then zero 128-bit returned.
type Int256 ¶
Int256 is an unsigned 256-bit number. All methods are immutable, works just like standard uint64.
func Int256From128 ¶
func Int256From64 ¶
From64 converts 64-bit value v to a Int256 value. Upper 128-bit half will be zero.
func Int256FromBig ¶
FromBig converts *big.Int to 256-bit Int256 value ignoring overflows. If input integer is nil or negative then return Zero. If input integer overflows 256-bit then return Max.
func Int256FromBigEx ¶
FromBigEx converts *big.Int to 256-bit Int256 value (eXtended version). Provides ok successful flag as a second return value. If input integer is negative or overflows 256-bit then ok=false. If input is nil then zero 256-bit returned.
type Tuple5 ¶
type Tuple5[T1, T2, T3, T4, T5 any] struct { Col1 T1 Col2 T2 Col3 T3 Col4 T4 Col5 T5 }
type Uint128 ¶
Uint128 is an unsigned 128-bit number. All methods are immutable, works just like standard uint64.
func Uint128From64 ¶
From64 converts 64-bit value v to a Uint128 value. Upper 64-bit half will be zero.
func Uint128FromBig ¶
FromBig converts *big.Int to 128-bit Uint128 value ignoring overflows. If input integer is nil or negative then return Zero. If input interger overflows 128-bit then return Max.
func Uint128FromBigEx ¶
FromBigEx converts *big.Int to 128-bit Uint128 value (eXtended version). Provides ok successful flag as a second return value. If input integer is negative or overflows 128-bit then ok=false. If input is nil then zero 128-bit returned.
func (Uint128) Equals ¶
Equals returns true if two 128-bit values are equal. Uint128 values can be compared directly with == operator but use of the Equals method is preferred for consistency.
type Uint256 ¶
Uint256 is an unsigned 256-bit number. All methods are immutable, works just like standard uint64.
func Uint256From128 ¶
From128 converts 128-bit value v to a Uint256 value. Upper 128-bit half will be zero.
func Uint256From64 ¶
From64 converts 64-bit value v to a Uint256 value. Upper 128-bit half will be zero.
func Uint256FromBig ¶
FromBig converts *big.Int to 256-bit Uint256 value ignoring overflows. If input integer is nil or negative then return Zero. If input interger overflows 256-bit then return Max.
func Uint256FromBigEx ¶
FromBigEx converts *big.Int to 256-bit Uint256 value (eXtended version). Provides ok successful flag as a second return value. If input integer is negative or overflows 256-bit then ok=false. If input is nil then zero 256-bit returned.