Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
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 ¶
type Int128 ¶
Int128 is an unsigned 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 ¶
From128 converts 128-bit value v to a Int256 value. Upper 128-bit half will be zero.
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 Tuple4 ¶ added in v2.2.0
type Tuple4[T1, T2, T3, T4 any] struct { Col1 T1 Col2 T2 Col3 T3 Col4 T4 }
type Tuple5 ¶ added in v2.2.0
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.
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.