values

package
v0.0.0-...-aac2b88 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Null  = &Value{typ: TypeNull}
	True  = &Value{typ: TypeBool, x: 1}
	False = &Value{typ: TypeBool}
)

Functions

This section is empty.

Types

type Type

type Type uint8
const (
	TypeNull Type = iota
	TypeBool
	TypeInt
	TypeFloat
	TypeString
)

func (Type) String

func (t Type) String() string

type Value

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

func MakeBool

func MakeBool(b bool) *Value

func MakeFloat

func MakeFloat(f float64) *Value

func MakeInt

func MakeInt(i int64) *Value

func MakeString

func MakeString(s string) *Value

func (*Value) Bool

func (v *Value) Bool() bool

func (*Value) Equal

func (v *Value) Equal(otherV *Value) bool

func (*Value) Float

func (v *Value) Float() float64

func (*Value) Int

func (v *Value) Int() int64

func (*Value) IsBool

func (v *Value) IsBool() bool

func (*Value) IsFloat

func (v *Value) IsFloat() bool

func (*Value) IsInt

func (v *Value) IsInt() bool

func (*Value) IsNull

func (v *Value) IsNull() bool

func (*Value) IsString

func (v *Value) IsString() bool

func (*Value) String

func (v *Value) String() string

func (*Value) ToPB

func (v *Value) ToPB() *sqlpb.Value

func (*Value) TryCompare

func (v *Value) TryCompare(otherV *Value) (int, bool)

func (*Value) Type

func (v *Value) Type() Type

Jump to

Keyboard shortcuts

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