value

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatetimeFormats = NewDatetimeFormatMap()

Functions

func Compare

func Compare(p1 Primary, p2 Primary, operator string, datetimeFormats []string, location *time.Location) ternary.Value

func CompareRowValues

func CompareRowValues(rowValue1 RowValue, rowValue2 RowValue, operator string, datetimeFormats []string, location *time.Location) (ternary.Value, error)

func ConvertDatetimeFormat

func ConvertDatetimeFormat(format string) string

func Discard added in v1.10.3

func Discard(p Primary)

func Equal

func Equal(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func Equivalent

func Equivalent(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func Float64ToStr

func Float64ToStr(f float64, useScientificNotation bool) string

func Float64ToTime

func Float64ToTime(f float64, location *time.Location) time.Time

func Greater

func Greater(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func GreaterOrEqual

func GreaterOrEqual(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func Identical added in v1.6.4

func Identical(p1 Primary, p2 Primary) ternary.Value

func Int64ToStr

func Int64ToStr(i int64) string

func IsFalse added in v1.9.15

func IsFalse(v Primary) bool

func IsNull

func IsNull(v Primary) bool

func IsTrue added in v1.9.15

func IsTrue(v Primary) bool

func IsUnknown added in v1.9.15

func IsUnknown(v Primary) bool

func Less

func Less(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func LessOrEqual

func LessOrEqual(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func NotEqual

func NotEqual(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ternary.Value

func StrToTime

func StrToTime(s string, formats []string, location *time.Location) (time.Time, bool)

func TimeFromUnixTime added in v1.10.3

func TimeFromUnixTime(sec int64, nano int64, location *time.Location) time.Time

Types

type Boolean

type Boolean struct {
	// contains filtered or unexported fields
}

func NewBoolean

func NewBoolean(b bool) *Boolean

func (Boolean) Raw

func (b Boolean) Raw() bool

func (Boolean) String

func (b Boolean) String() string

func (Boolean) Ternary

func (b Boolean) Ternary() ternary.Value

type ComparisonResult

type ComparisonResult int
const (
	IsEqual ComparisonResult = iota
	IsBoolEqual
	IsNotEqual
	IsLess
	IsGreater
	IsIncommensurable
)

func CompareCombinedly

func CompareCombinedly(p1 Primary, p2 Primary, datetimeFormats []string, location *time.Location) ComparisonResult

func (ComparisonResult) String

func (cr ComparisonResult) String() string

type Datetime

type Datetime struct {
	// contains filtered or unexported fields
}

func NewDatetime

func NewDatetime(t time.Time) *Datetime

func NewDatetimeFromString

func NewDatetimeFromString(s string, formats []string, location *time.Location) *Datetime

func (Datetime) Format

func (dt Datetime) Format(s string) string

func (Datetime) Raw

func (dt Datetime) Raw() time.Time

func (Datetime) String

func (dt Datetime) String() string

func (Datetime) Ternary

func (dt Datetime) Ternary() ternary.Value

type DatetimeFormatMap

type DatetimeFormatMap struct {
	// contains filtered or unexported fields
}

func NewDatetimeFormatMap added in v1.9.3

func NewDatetimeFormatMap() DatetimeFormatMap

func (DatetimeFormatMap) Get

func (dfmap DatetimeFormatMap) Get(s string) string

type Float

type Float struct {
	// contains filtered or unexported fields
}

func NewFloat

func NewFloat(f float64) *Float

func NewFloatFromString

func NewFloatFromString(s string) *Float

func (Float) Raw

func (f Float) Raw() float64

func (Float) String

func (f Float) String() string

func (Float) Ternary

func (f Float) Ternary() ternary.Value

type Integer

type Integer struct {
	// contains filtered or unexported fields
}

func NewInteger

func NewInteger(i int64) *Integer

func NewIntegerFromString

func NewIntegerFromString(s string) *Integer

func (Integer) Raw

func (i Integer) Raw() int64

func (Integer) String

func (i Integer) String() string

func (Integer) Ternary

func (i Integer) Ternary() ternary.Value

type Null

type Null struct{}

func NewNull

func NewNull() *Null

func (Null) String

func (n Null) String() string

func (Null) Ternary

func (n Null) Ternary() ternary.Value

type Primary

type Primary interface {
	String() string
	Ternary() ternary.Value
}

func ToBoolean

func ToBoolean(p Primary) Primary

func ToDatetime

func ToDatetime(p Primary, formats []string, location *time.Location) Primary

func ToFloat

func ToFloat(p Primary) Primary

func ToInteger

func ToInteger(p Primary) Primary

func ToIntegerStrictly added in v1.17.0

func ToIntegerStrictly(p Primary) Primary

func ToString

func ToString(p Primary) Primary

type RowValue

type RowValue []Primary

type String

type String struct {
	// contains filtered or unexported fields
}

func NewString

func NewString(s string) *String

func (String) Raw

func (s String) Raw() string

func (String) String

func (s String) String() string

func (String) Ternary

func (s String) Ternary() ternary.Value

type Ternary

type Ternary struct {
	// contains filtered or unexported fields
}

func NewTernary

func NewTernary(t ternary.Value) *Ternary

func NewTernaryFromString

func NewTernaryFromString(s string) *Ternary

func (Ternary) String

func (t Ternary) String() string

func (Ternary) Ternary

func (t Ternary) Ternary() ternary.Value

Jump to

Keyboard shortcuts

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