clause

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type And

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

func (*And) Args

func (and *And) Args() []any

func (*And) Clause

func (and *And) Clause() (string, error)

type AndJoin added in v1.0.5

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

func (*AndJoin) Args added in v1.0.5

func (clause *AndJoin) Args() []any

func (*AndJoin) Clause added in v1.0.5

func (clause *AndJoin) Clause() (string, error)

type Clause

type Clause interface {
	Clause() (string, error)
	Args() []any
}

type CommonClause added in v1.0.6

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

func NewCommonClause added in v1.0.6

func NewCommonClause(clause string, args ...any) CommonClause

func (CommonClause) Args added in v1.0.6

func (clause CommonClause) Args() []any

func (CommonClause) Clause added in v1.0.6

func (clause CommonClause) Clause() (string, error)

type ConditionJoin added in v1.0.5

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

func NewConditionJoin added in v1.0.5

func NewConditionJoin(left Clause, right Clause) *ConditionJoin

func (*ConditionJoin) And added in v1.0.5

func (clause *ConditionJoin) And() *AndJoin

func (*ConditionJoin) Or added in v1.0.5

func (clause *ConditionJoin) Or() *OrJoin

type Conditions

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

func NewConditions

func NewConditions() *Conditions

func (*Conditions) AddCondition

func (conditions *Conditions) AddCondition(query string, args ...any) *Conditions

func (*Conditions) And

func (conditions *Conditions) And() *And

func (*Conditions) Equal

func (conditions *Conditions) Equal(columnName string, arg any) *Conditions

func (*Conditions) GreaterThan

func (conditions *Conditions) GreaterThan(columnName string, arg any) *Conditions

func (*Conditions) GreaterThanAndEqual

func (conditions *Conditions) GreaterThanAndEqual(columnName string, arg any) *Conditions

func (*Conditions) In

func (conditions *Conditions) In(columnName string, arg any) *Conditions

func (*Conditions) LessThan

func (conditions *Conditions) LessThan(columnName string, arg any) *Conditions

func (*Conditions) LessThanAndEqual

func (conditions *Conditions) LessThanAndEqual(columnName string, arg any) *Conditions

func (*Conditions) Like

func (conditions *Conditions) Like(columnName string, arg string) *Conditions

func (*Conditions) Not

func (conditions *Conditions) Not(columnName string, arg any) *Conditions

func (*Conditions) NotIn

func (conditions *Conditions) NotIn(columnName string, arg any) *Conditions

func (*Conditions) Or

func (conditions *Conditions) Or() *Or

type From

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

func NewFrom

func NewFrom(otherClauses []Clause) *From

func (*From) Args

func (clause *From) Args() []any

func (*From) Clause

func (clause *From) Clause() (string, error)

type GroupBy added in v1.0.0

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

func NewGroupBy added in v1.0.0

func NewGroupBy(columnName string) *GroupBy

func (*GroupBy) Args added in v1.0.0

func (clause *GroupBy) Args() []any

func (*GroupBy) Clause added in v1.0.0

func (clause *GroupBy) Clause() (string, error)

type Join

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

func NewJoin

func NewJoin(tableName string, on string) *Join

func (*Join) Args

func (clause *Join) Args() []any

func (*Join) Clause

func (clause *Join) Clause() (string, error)

func (*Join) Inner

func (clause *Join) Inner() *Join

func (*Join) Left

func (clause *Join) Left() *Join

func (*Join) Right

func (clause *Join) Right() *Join

type Limit

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

func NewLimit

func NewLimit(pageNo int, pageSize int) *Limit

func (*Limit) Args

func (limit *Limit) Args() []any

func (*Limit) Clause

func (limit *Limit) Clause() (string, error)

type Or

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

func (*Or) Args

func (or *Or) Args() []any

func (*Or) Clause

func (or *Or) Clause() (string, error)

type OrJoin added in v1.0.5

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

func (*OrJoin) Args added in v1.0.5

func (clause *OrJoin) Args() []any

func (*OrJoin) Clause added in v1.0.5

func (clause *OrJoin) Clause() (string, error)

type OrderBy added in v1.0.0

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

func NewOrderBy added in v1.0.0

func NewOrderBy(columnName string, aes bool) *OrderBy

func (*OrderBy) Args added in v1.0.0

func (clause *OrderBy) Args() []any

func (*OrderBy) Clause added in v1.0.0

func (clause *OrderBy) Clause() (string, error)

type Select

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

func NewSelect

func NewSelect(selectClauses []string, fromClause *From, otherClauses ...Clause) *Select

func (*Select) Args

func (clause *Select) Args() []any

func (*Select) Clause

func (clause *Select) Clause() (string, error)

type TableName

type TableName string

func (TableName) Args

func (s TableName) Args() []any

func (TableName) Clause

func (s TableName) Clause() (string, error)

type Where

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

func NewWhere

func NewWhere(condition Clause) *Where

func (*Where) Args

func (clause *Where) Args() []any

func (*Where) Clause

func (clause *Where) Clause() (string, error)

Jump to

Keyboard shortcuts

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