primitive

package
v2.0.0-...-d0150a3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON_CONTAINS jsonFunction = iota + 1
	JSON_PRETTY
	JSON_KEYS
	JSON_TYPE
	JSON_VALID
	JSON_QUOTE
	JSON_UNQUOTE
	JSON_SET
	JSON_EXTRACT
	JSON_INSERT
	JSON_REPLACE
	JSON_REMOVE
	MEMBER_OF
)

sql functions :

View Source
const (
	Add operator = iota
	Deduct
)

operators :

View Source
const (
	Ascending order = iota
	Descending
)

orders :

View Source
const (
	Sum aggregate = iota + 1
	Count
	Average
	Max
	Min
)

aggregation :

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregate

type Aggregate struct {
	Field any
	By    aggregate
}

Aggregate :

type Alias

type Alias struct {
	Name  string
	Alias string
}

Alias :

type As

type As struct {
	Field any
	Name  string
}

As :

type C

type C struct {
	Field    any
	Operator Operator
	Value    any
}

C :

type Case

type Case struct {
	WhenClauses [][2]any
	ElseClause  any
}

Case :

func (*Case) Else

func (c *Case) Else(result any) *Case

Else :

func (*Case) When

func (c *Case) When(cond, result any) *Case

When :

type CastAs

type CastAs struct {
	Value    any
	DataType DataType
}

CastAs :

type Column

type Column struct {
	Table string
	Name  string
}

Column :

type DataType

type DataType string

DataType :

const (
	JSON    DataType = "JSON"
	Varchar DataType = "VARCHAR"
	Char    DataType = "CHAR"
	Date    DataType = "DATE"
)

data types :

type Encoding

type Encoding struct {
	Charset *string
	Column  any
	Collate string
}

Encoding :

type Field

type Field struct {
	Name   string
	Values []any
}

Field :

type Func

type Func struct {
	Name string
	Args []any
}

Func :

type Group

type Group struct {
	Values []any
}

Group :

type JSONColumn

type JSONColumn struct {
	Column        string
	Nested        []string
	UnquoteResult bool
}

JSONColumn :

func (JSONColumn) String

func (x JSONColumn) String() string

func (JSONColumn) WithQuote

func (x JSONColumn) WithQuote() JSONColumn

WithQuote :

type JSONFunc

type JSONFunc struct {
	Prefix any
	Type   jsonFunction
	Args   []any
}

JSONFunc :

type Join

type Join struct {
	Type     JoinType
	SubQuery any
	On       [2]any
}

type JoinType

type JoinType int
const (
	InnerJoin JoinType = iota
	CrossJoin
	LeftJoin
	RightJoin
)

type KV

type KV struct {
	Field string
	Value any
}

KV :

type L

type L struct {
	Field any
	IsNot bool
	Value any
}

L :

type Lock

type Lock struct {
	Type   LockType
	Option LockOption
	Of     *Pair
}

Lock :

type LockOption

type LockOption int
const (
	NoWait LockOption = iota + 1
	SkipLocked
)

type LockType

type LockType int
const (
	LockForUpdate LockType = iota + 1
	LockForShare
)

type Math

type Math struct {
	Field string
	Mode  operator
	Value uint
}

Math :

type Nil

type Nil struct {
	Field any
	IsNot bool
}

Nil :

type Operator

type Operator int

Operator :

const (
	Equal Operator = iota
	NotEqual
	GreaterThan
	LesserThan
	GreaterOrEqual
	LesserOrEqual
	Like
	NotLike
	In
	NotIn
	Between
	NotBetween
	And
	Or
	IsNull
	NotNull
)

operators :

func (Operator) String

func (op Operator) String() (n string)

type Pair

type Pair [2]string

type R

type R struct {
	From any
	To   any
}

R :

type Raw

type Raw struct {
	Value string
}

Raw :

type Sort

type Sort struct {
	Field any
	Order order
}

Sort :

type Value

type Value struct {
	Raw any
}

Value :

Jump to

Keyboard shortcuts

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