stmt

package
v0.0.0-...-3f8b912 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BetweenCondition

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

BetweenCondition ...

func NewBetweenCondition

func NewBetweenCondition(a, x, y Expression) *BetweenCondition

NewBetweenCondition returns a new BetweenCondition.

func NewNotBetweenCondition

func NewNotBetweenCondition(a, x, y Expression) *BetweenCondition

NewNotBetweenCondition returns a new BetweenCondition.

func (*BetweenCondition) BuildCondition

func (c *BetweenCondition) BuildCondition(ctx *builder.Context)

BuildCondition ...

func (*BetweenCondition) IsList

func (c *BetweenCondition) IsList() bool

IsList ...

type Column

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

Column ...

func NewColumn

func NewColumn(table Table, name string) *Column

NewColumn returns a new Column.

func (*Column) Alias

func (c *Column) Alias() string

Alias ...

func (*Column) As

func (c *Column) As(alias string) *Column

func (*Column) Between

func (c *Column) Between(x, y Expression) Condition

Between ...

func (*Column) BuildExpression

func (c *Column) BuildExpression(ctx *builder.Context)

BuildExpression ...

func (*Column) Eq

func (c *Column) Eq(expr Expression) Condition

Eq ...

func (*Column) Gt

func (c *Column) Gt(expr Expression) Condition

Gt ...

func (*Column) Gte

func (c *Column) Gte(expr Expression) Condition

Gte ...

func (*Column) ILike

func (c *Column) ILike(expr Expression) Condition

ILike ...

func (*Column) In

func (c *Column) In(expr Expression) Condition

In ... TODO: This might not be right.

func (*Column) Is

func (c *Column) Is(expr Expression) Condition

Is ...

func (*Column) IsNot

func (c *Column) IsNot(expr Expression) Condition

IsNot ...

func (*Column) Like

func (c *Column) Like(expr Expression) Condition

Like ...

func (*Column) Lt

func (c *Column) Lt(expr Expression) Condition

Lt ...

func (*Column) Lte

func (c *Column) Lte(expr Expression) Condition

Lte ...

func (*Column) Ne

func (c *Column) Ne(expr Expression) Condition

Ne ...

func (*Column) NotBetween

func (c *Column) NotBetween(x, y Expression) Condition

NotBetween ...

func (*Column) NotILike

func (c *Column) NotILike(expr Expression) Condition

NotILike ...

func (*Column) NotIn

func (c *Column) NotIn(expr Expression) Condition

NotIn ... TODO: This might not be right.

func (*Column) NotLike

func (c *Column) NotLike(expr Expression) Condition

NotLike ...

type ComparisonCondition

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

ComparisonCondition ...

func NewComparisonCondition

func NewComparisonCondition(operator token.ComparisonOperator, left, right Expression) *ComparisonCondition

NewComparisonCondition returns a new ComparisonCondition.

func (*ComparisonCondition) BuildCondition

func (c *ComparisonCondition) BuildCondition(ctx *builder.Context)

BuildCondition ...

func (*ComparisonCondition) IsList

func (c *ComparisonCondition) IsList() bool

IsList ...

type Condition

type Condition interface {
	IsList() bool
	BuildCondition(ctx *builder.Context)
}

Condition ...

type ConditionList

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

ConditionList ...

func NewConditionList

func NewConditionList(operator token.LogicalOperator, conditions ...Condition) *ConditionList

func (*ConditionList) BuildCondition

func (c *ConditionList) BuildCondition(ctx *builder.Context)

BuildCondition ...

func (*ConditionList) IsList

func (c *ConditionList) IsList() bool

IsList ...

type Expression

type Expression interface {
	BuildExpression(ctx *builder.Context)
}

Expression ...

type FromItem

type FromItem interface {
	WriteFromItem(ctx *builder.Context)
}

FromItem ...

type Function

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

Function ...

func NewFunction

func NewFunction(name string, args ...Expression) *Function

NewFunction ...

func (*Function) Alias

func (f *Function) Alias() string

Alias ...

func (*Function) As

func (f *Function) As(alias string) *Function

As ...

func (*Function) Between

func (c *Function) Between(x, y Expression) Condition

Between ...

func (*Function) BuildExpression

func (f *Function) BuildExpression(ctx *builder.Context)

BuildExpression ...

func (*Function) Eq

func (c *Function) Eq(expr Expression) Condition

Eq ...

func (*Function) Gt

func (c *Function) Gt(expr Expression) Condition

Gt ...

func (*Function) Gte

func (c *Function) Gte(expr Expression) Condition

Gte ...

func (*Function) ILike

func (c *Function) ILike(expr Expression) Condition

ILike ...

func (*Function) In

func (c *Function) In(expr Expression) Condition

In ... TODO: This might not be right.

func (*Function) Is

func (c *Function) Is(expr Expression) Condition

Is ...

func (*Function) IsNot

func (c *Function) IsNot(expr Expression) Condition

IsNot ...

func (*Function) Like

func (c *Function) Like(expr Expression) Condition

Like ...

func (*Function) Lt

func (c *Function) Lt(expr Expression) Condition

Lt ...

func (*Function) Lte

func (c *Function) Lte(expr Expression) Condition

Lte ...

func (*Function) Ne

func (c *Function) Ne(expr Expression) Condition

Ne ...

func (*Function) NotBetween

func (c *Function) NotBetween(x, y Expression) Condition

NotBetween ...

func (*Function) NotILike

func (c *Function) NotILike(expr Expression) Condition

NotILike ...

func (*Function) NotIn

func (c *Function) NotIn(expr Expression) Condition

NotIn ... TODO: This might not be right.

func (*Function) NotLike

func (c *Function) NotLike(expr Expression) Condition

NotLike ...

type Int

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

Int ...

func NewInt

func NewInt(val int) *Int

NewInt ...

func (*Int) Alias

func (i *Int) Alias() string

Alias ...

func (*Int) As

func (i *Int) As(alias string) *Int

As ...

func (*Int) Between

func (c *Int) Between(x, y Expression) Condition

Between ...

func (*Int) BuildExpression

func (i *Int) BuildExpression(ctx *builder.Context)

BuildExpression ...

func (*Int) Eq

func (c *Int) Eq(expr Expression) Condition

Eq ...

func (*Int) Gt

func (c *Int) Gt(expr Expression) Condition

Gt ...

func (*Int) Gte

func (c *Int) Gte(expr Expression) Condition

Gte ...

func (*Int) ILike

func (c *Int) ILike(expr Expression) Condition

ILike ...

func (*Int) In

func (c *Int) In(expr Expression) Condition

In ... TODO: This might not be right.

func (*Int) Is

func (c *Int) Is(expr Expression) Condition

Is ...

func (*Int) IsNot

func (c *Int) IsNot(expr Expression) Condition

IsNot ...

func (*Int) Like

func (c *Int) Like(expr Expression) Condition

Like ...

func (*Int) Lt

func (c *Int) Lt(expr Expression) Condition

Lt ...

func (*Int) Lte

func (c *Int) Lte(expr Expression) Condition

Lte ...

func (*Int) Ne

func (c *Int) Ne(expr Expression) Condition

Ne ...

func (*Int) NotBetween

func (c *Int) NotBetween(x, y Expression) Condition

NotBetween ...

func (*Int) NotILike

func (c *Int) NotILike(expr Expression) Condition

NotILike ...

func (*Int) NotIn

func (c *Int) NotIn(expr Expression) Condition

NotIn ... TODO: This might not be right.

func (*Int) NotLike

func (c *Int) NotLike(expr Expression) Condition

NotLike ...

type Join

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

Join ...

func NewJoin

func NewJoin(joinType token.JoinType, fromItem FromItem) *Join

NewJoin returns a new Join instance.

func (*Join) Natural

func (j *Join) Natural() *Join

Natural ...

func (*Join) On

func (j *Join) On(conditions ...Condition) *Join

On ...

func (*Join) WriteJoin

func (j *Join) WriteJoin(ctx *builder.Context)

WriteJoin ...

type Null

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

func NewNull

func NewNull() *Null

NewNull ...

func (*Null) Alias

func (n *Null) Alias() string

Alias ...

func (*Null) As

func (n *Null) As(alias string) *Null

As ...

func (*Null) Between

func (c *Null) Between(x, y Expression) Condition

Between ...

func (*Null) BuildExpression

func (n *Null) BuildExpression(ctx *builder.Context)

BuildExpression ...

func (*Null) Eq

func (c *Null) Eq(expr Expression) Condition

Eq ...

func (*Null) Gt

func (c *Null) Gt(expr Expression) Condition

Gt ...

func (*Null) Gte

func (c *Null) Gte(expr Expression) Condition

Gte ...

func (*Null) ILike

func (c *Null) ILike(expr Expression) Condition

ILike ...

func (*Null) In

func (c *Null) In(expr Expression) Condition

In ... TODO: This might not be right.

func (*Null) Is

func (c *Null) Is(expr Expression) Condition

Is ...

func (*Null) IsNot

func (c *Null) IsNot(expr Expression) Condition

IsNot ...

func (*Null) Like

func (c *Null) Like(expr Expression) Condition

Like ...

func (*Null) Lt

func (c *Null) Lt(expr Expression) Condition

Lt ...

func (*Null) Lte

func (c *Null) Lte(expr Expression) Condition

Lte ...

func (*Null) Ne

func (c *Null) Ne(expr Expression) Condition

Ne ...

func (*Null) NotBetween

func (c *Null) NotBetween(x, y Expression) Condition

NotBetween ...

func (*Null) NotILike

func (c *Null) NotILike(expr Expression) Condition

NotILike ...

func (*Null) NotIn

func (c *Null) NotIn(expr Expression) Condition

NotIn ... TODO: This might not be right.

func (*Null) NotLike

func (c *Null) NotLike(expr Expression) Condition

NotLike ...

type Schema

type Schema struct {
	Name string
}

Schema ...

func NewSchema

func NewSchema(name string) *Schema

NewSchema returns a new Schema.

func (Schema) IsEmpty

func (s Schema) IsEmpty() bool

IsEmpty ...

func (Schema) T

func (s Schema) T(name string) *Table

T ...

func (Schema) Table

func (s Schema) Table(name string) *Table

Table ...

type Select

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

Select ...

func NewSelect

func NewSelect(selectExpressions ...SelectExpression) *Select

NewSelect ...

func (*Select) As

func (s *Select) As(alias string) *Select

As ...

func (*Select) Build

func (s *Select) Build() (string, []interface{})

Build ...

func (*Select) Distinct

func (s *Select) Distinct() *Select

Distinct ...

func (*Select) From

func (s *Select) From(fromItems ...FromItem) *Select

From ...

func (*Select) Having

func (s *Select) Having(conditions ...Condition) *Select

Having ...

func (*Select) InnerJoin

func (s *Select) InnerJoin(fromItem FromItem, conditions ...Condition) *Select

InnerJoin ...

func (*Select) Join

func (s *Select) Join(join *Join) *Select

Join ...

func (*Select) Select

func (s *Select) Select(expressions ...SelectExpression) *Select

Select ...

func (*Select) Where

func (s *Select) Where(conditions ...Condition) *Select

Where ...

func (*Select) WriteFromItem

func (s *Select) WriteFromItem(ctx *builder.Context)

WriteFromItem ...

func (*Select) WriteStatement

func (s *Select) WriteStatement(ctx *builder.Context)

WriteStatement ...

type SelectExpression

type SelectExpression interface {
	Expression
	Alias() string
}

SelectExpression ...

type String

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

String ...

func NewString

func NewString(val string) *String

NewString ...

func (*String) Alias

func (s *String) Alias() string

Alias ...

func (*String) As

func (s *String) As(alias string) *String

As ...

func (*String) Between

func (c *String) Between(x, y Expression) Condition

Between ...

func (*String) BuildExpression

func (s *String) BuildExpression(ctx *builder.Context)

BuildExpression ...

func (*String) Eq

func (c *String) Eq(expr Expression) Condition

Eq ...

func (*String) Gt

func (c *String) Gt(expr Expression) Condition

Gt ...

func (*String) Gte

func (c *String) Gte(expr Expression) Condition

Gte ...

func (*String) ILike

func (c *String) ILike(expr Expression) Condition

ILike ...

func (*String) In

func (c *String) In(expr Expression) Condition

In ... TODO: This might not be right.

func (*String) Is

func (c *String) Is(expr Expression) Condition

Is ...

func (*String) IsNot

func (c *String) IsNot(expr Expression) Condition

IsNot ...

func (*String) Like

func (c *String) Like(expr Expression) Condition

Like ...

func (*String) Lt

func (c *String) Lt(expr Expression) Condition

Lt ...

func (*String) Lte

func (c *String) Lte(expr Expression) Condition

Lte ...

func (*String) Ne

func (c *String) Ne(expr Expression) Condition

Ne ...

func (*String) NotBetween

func (c *String) NotBetween(x, y Expression) Condition

NotBetween ...

func (*String) NotILike

func (c *String) NotILike(expr Expression) Condition

NotILike ...

func (*String) NotIn

func (c *String) NotIn(expr Expression) Condition

NotIn ... TODO: This might not be right.

func (*String) NotLike

func (c *String) NotLike(expr Expression) Condition

NotLike ...

type Table

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

Table ...

func NewTable

func NewTable(schema Schema, name string) *Table

NewTable returns a new Table.

func (Table) As

func (t Table) As(alias string) Table

As ...

func (Table) C

func (t Table) C(name string) *Column

C ...

func (Table) Column

func (t Table) Column(name string) *Column

Column ...

func (Table) IsEmpty

func (t Table) IsEmpty() bool

IsEmpty ...

func (Table) WriteFromItem

func (t Table) WriteFromItem(ctx *builder.Context)

WriteFromItem ...

Jump to

Keyboard shortcuts

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