literal

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBool

func NewBool(value bool) (expr.Literal, error)

func NewDate

func NewDate(days int) (expr.Literal, error)

func NewDecimalFromString

func NewDecimalFromString(value string) (expr.Literal, error)

NewDecimalFromString create a Decimal literal from decimal value string

func NewDecimalFromTwosComplement

func NewDecimalFromTwosComplement(twosComplement []byte, precision, scale int32) (expr.Literal, error)

NewDecimalFromTwosComplement create a Decimal literal from twosComplement. twosComplement is a little-endian twos-complement integer representation of complete value

func NewFixedBinary

func NewFixedBinary(value []byte) (expr.Literal, error)

func NewFixedChar

func NewFixedChar(value string) (expr.Literal, error)

func NewFloat32

func NewFloat32(value float32) (expr.Literal, error)

func NewFloat64

func NewFloat64(value float64) (expr.Literal, error)

func NewInt16

func NewInt16(value int16) (expr.Literal, error)

func NewInt32

func NewInt32(value int32) (expr.Literal, error)

func NewInt64

func NewInt64(value int64) (expr.Literal, error)

func NewInt8

func NewInt8(value int8) (expr.Literal, error)

func NewIntervalDaysToSecond

func NewIntervalDaysToSecond(days, seconds int32, micros int64) (expr.Literal, error)

func NewIntervalYearsToMonth

func NewIntervalYearsToMonth(years, months int32) (expr.Literal, error)

func NewPrecisionTimestamp

func NewPrecisionTimestamp(precision types.TimePrecision, value int64) (expr.Literal, error)

NewPrecisionTimestamp creates a new PrecisionTimestamp literal with given precision and value.

func NewPrecisionTimestampFromTime

func NewPrecisionTimestampFromTime(precision types.TimePrecision, tm time.Time) (expr.Literal, error)

NewPrecisionTimestampFromTime creates a new PrecisionTimestamp literal from a time.Time timestamp value with given precision.

func NewPrecisionTimestampTz

func NewPrecisionTimestampTz(precision types.TimePrecision, value int64) (expr.Literal, error)

NewPrecisionTimestampTz creates a new PrecisionTimestampTz literal with given precision and value.

func NewPrecisionTimestampTzFromTime

func NewPrecisionTimestampTzFromTime(precision types.TimePrecision, tm time.Time) (expr.Literal, error)

NewPrecisionTimestampTzFromTime creates a new PrecisionTimestampTz literal from a time.Time timestamp value with given precision.

func NewString

func NewString(value string) (expr.Literal, error)

func NewTime

func NewTime(hours, minutes, seconds, microseconds int32) (expr.Literal, error)

NewTime creates a new Time literal from the given hours, minutes, seconds and microseconds. The total microseconds should be in the range [0, 86400_000_000) to represent a valid time within a day.

func NewTimeFromMicros

func NewTimeFromMicros(micros int64) (expr.Literal, error)

NewTimeFromMicros creates a new Time literal from the given microseconds.

func NewTimestamp

func NewTimestamp(timestamp time.Time) (expr.Literal, error)

NewTimestamp creates a new Timestamp literal from a time.Time timestamp value. This uses the number of microseconds elapsed since January 1, 1970 00:00:00 UTC

func NewTimestampFromMicros

func NewTimestampFromMicros(micros int64) (expr.Literal, error)

func NewTimestampTZ

func NewTimestampTZ(timestamp time.Time) (expr.Literal, error)

NewTimestampTZ creates a new TimestampTz literal from a time.Time timestamp value. This uses the number of microseconds elapsed since January 1, 1970 00:00:00 UTC

func NewTimestampTZFromMicros

func NewTimestampTZFromMicros(micros int64) (expr.Literal, error)

func NewUUID

func NewUUID(guid uuid.UUID) (expr.Literal, error)

func NewUUIDFromBytes

func NewUUIDFromBytes(value []byte) (expr.Literal, error)

func NewVarChar

func NewVarChar(value string) (expr.Literal, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL