primitive

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MIT Imports: 3 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 interface{}
	By    aggregate
}

Aggregate :

type Alias

type Alias struct {
	Name  string
	Alias string
}

Alias :

type As

type As struct {
	Field interface{}
	Name  string
}

As :

type C

type C struct {
	Field    interface{}
	Operator Operator
	Value    interface{}
}

C :

type Case added in v1.2.2

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

Case :

func (*Case) Else added in v1.3.0

func (c *Case) Else(result interface{}) *Case

Else :

func (*Case) When added in v1.3.0

func (c *Case) When(cond, result interface{}) *Case

When :

type CastAs

type CastAs struct {
	Value    interface{}
	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 added in v1.6.0

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

Encoding :

type Field

type Field struct {
	Name   string
	Values []interface{}
}

Field :

type Func

type Func struct {
	Name string
	Args []interface{}
}

Func :

type Group

type Group struct {
	Values []interface{}
}

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 interface{}
	Type   jsonFunction
	Args   []interface{}
}

JSONFunc :

type KV

type KV struct {
	Field string
	Value interface{}
}

KV :

type L

type L struct {
	Field interface{}
	IsNot bool
	Value interface{}
}

L :

type Math

type Math struct {
	Field string
	Mode  operator
	Value int
}

Math :

type Nil

type Nil struct {
	Field interface{}
	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 R

type R struct {
	From interface{}
	To   interface{}
}

R :

type Raw

type Raw struct {
	Value string
}

Raw :

type Sort

type Sort struct {
	Field interface{}
	Order order
}

Sort :

type TypeSafe added in v1.6.0

type TypeSafe struct {
	Type  reflect.Kind
	Value interface{}
}

TypeSafe :

type Value

type Value struct {
	Raw interface{}
}

Value :

Jump to

Keyboard shortcuts

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