builder

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ToggleMultiTable    = "MultiTable"
	ToggleNeedAutoAlias = "NeedAlias"
	ToggleUseValues     = "UseValues"
)
View Source
var (
	UpdateNeedLimitByWhere = errors.New("no where limit for update")
)

Functions

func Alias added in v1.0.1

func Alias(expr SqlExpr, name string) *exAlias

func Comment added in v1.0.1

func Comment(c string) *comment

func ContextWithToggles added in v1.0.1

func ContextWithToggles(ctx context.Context, toggles Toggles) context.Context

func CrossJoin added in v1.0.1

func CrossJoin(table *Table) *join

func Expect added in v1.0.1

func Expect() *combination

func ForEachStructFieldValue added in v1.0.1

func ForEachStructFieldValue(rv reflect.Value, fn func(structFieldValue reflect.Value, structField reflect.StructField, columnName string, tagValue string))

func FullJoin added in v1.0.1

func FullJoin(table *Table) *join

func GetColumnName added in v1.0.1

func GetColumnName(fieldName, tagValue string) string

func GroupBy added in v1.0.1

func GroupBy(groups ...SqlExpr) *groupBy

func InnerJoin added in v1.0.1

func InnerJoin(table *Table) *join

func Intersect added in v1.0.1

func Intersect() *combination

func IsNilExpr added in v1.0.1

func IsNilExpr(e SqlExpr) bool

func Join added in v1.0.1

func Join(table *Table, prefixes ...string) *join

func LeftJoin added in v1.0.1

func LeftJoin(table *Table) *join

func Limit added in v1.0.1

func Limit(rowCount int64) *limit

func MultiMayAutoAlias added in v1.0.1

func MultiMayAutoAlias(columns ...SqlExpr) *exMayAutoAlias

func OnConflict added in v1.0.1

func OnConflict(columns *Columns) *onConflict

func OrderBy added in v1.0.1

func OrderBy(orders ...*Order) *orderBy

func RangeNotNilExpr added in v1.0.1

func RangeNotNilExpr(exprs []SqlExpr, each func(e SqlExpr, i int))

func ResolveIndexNameAndMethod added in v1.0.1

func ResolveIndexNameAndMethod(n string) (name string, method string)

func RightJoin added in v1.0.1

func RightJoin(table *Table) *join

func ScanDefToTable added in v1.0.1

func ScanDefToTable(rv reflect.Value, table *Table)

func ToMap added in v1.0.1

func ToMap(list []string) map[string]bool

func Union added in v1.0.1

func Union() *combination

func Where added in v1.0.1

func Where(c SqlCondition) *where

func WriteAdditions added in v1.0.1

func WriteAdditions(e *Ex, additions ...Addition)

func WriteAssignments added in v1.0.1

func WriteAssignments(e *Ex, assignments ...*Assignment)

Types

type Addition added in v1.0.1

type Addition interface {
	SqlExpr
	AdditionType() AdditionType
}

type AdditionType added in v1.0.1

type AdditionType int
const (
	AdditionJoin AdditionType = iota
	AdditionWhere
	AdditionGroupBy
	AdditionCombination
	AdditionOrderBy
	AdditionLimit
	AdditionOnConflict
	AdditionOther
	AdditionComment
)

type Additions added in v1.0.1

type Additions []Addition

func (Additions) Len added in v1.0.1

func (additions Additions) Len() int

func (Additions) Less added in v1.0.1

func (additions Additions) Less(i, j int) bool

func (Additions) Swap added in v1.0.1

func (additions Additions) Swap(i, j int)

type Assignment

type Assignment struct {
	SqlAssignmentMarker
	// contains filtered or unexported fields
}

func ColumnsAndValues added in v1.0.1

func ColumnsAndValues(columnOrColumns SqlExpr, values ...interface{}) *Assignment

func (*Assignment) Ex added in v1.0.1

func (a *Assignment) Ex(ctx context.Context) *Ex

func (*Assignment) IsNil added in v1.0.1

func (a *Assignment) IsNil() bool

type Assignments

type Assignments []*Assignment

type BuildSubQuery added in v1.0.1

type BuildSubQuery func(table *Table) SqlExpr

type Column

type Column struct {
	Name      string
	FieldName string
	Table     *Table

	Description []string
	Relation    []string

	*ColumnType
	// contains filtered or unexported fields
}

func Col

func Col(name string) *Column

func (*Column) Between

func (c *Column) Between(leftValue interface{}, rightValue interface{}) SqlCondition

func (*Column) Desc

func (c *Column) Desc(d int) SqlExpr

func (*Column) Eq

func (c *Column) Eq(v interface{}) SqlCondition

func (*Column) Ex added in v1.0.1

func (c *Column) Ex(ctx context.Context) *Ex

func (*Column) Expr

func (c *Column) Expr(query string, args ...interface{}) *Ex

func (Column) Field

func (c Column) Field(fieldName string) *Column

func (Column) Full added in v1.0.1

func (c Column) Full() *Column

func (*Column) Gt

func (c *Column) Gt(v interface{}) SqlCondition

func (*Column) Gte

func (c *Column) Gte(v interface{}) SqlCondition

func (*Column) In

func (c *Column) In(args ...interface{}) SqlCondition

func (*Column) Incr

func (c *Column) Incr(d int) SqlExpr

func (*Column) IsNil added in v1.0.1

func (c *Column) IsNil() bool

func (*Column) IsNotNull

func (c *Column) IsNotNull() SqlCondition

func (*Column) IsNull

func (c *Column) IsNull() SqlCondition

func (*Column) LeftLike

func (c *Column) LeftLike(v string) SqlCondition

func (*Column) Like

func (c *Column) Like(v string) SqlCondition

func (*Column) Lt

func (c *Column) Lt(v interface{}) SqlCondition

func (*Column) Lte

func (c *Column) Lte(v interface{}) SqlCondition

func (*Column) Neq

func (c *Column) Neq(v interface{}) SqlCondition

func (*Column) NotBetween

func (c *Column) NotBetween(leftValue interface{}, rightValue interface{}) SqlCondition

func (*Column) NotIn

func (c *Column) NotIn(args ...interface{}) SqlCondition

func (*Column) NotLike

func (c *Column) NotLike(v string) SqlCondition

func (*Column) Of added in v1.0.1

func (c *Column) Of(table *Table) *Column

func (Column) On added in v1.0.1

func (c Column) On(table *Table) *Column

func (*Column) RightLike

func (c *Column) RightLike(v string) SqlCondition

func (*Column) T added in v1.0.1

func (c *Column) T() *Table

func (Column) Type

func (c Column) Type(v interface{}, tagValue string) *Column

func (*Column) ValueBy added in v1.0.1

func (c *Column) ValueBy(v interface{}) *Assignment

type ColumnType added in v1.0.1

type ColumnType struct {
	Type        reflect.Type
	GetDataType func(engine string) string

	Length  uint64
	Decimal uint64

	Default *string

	Null          bool
	AutoIncrement bool

	Comment string

	DeprecatedActions *DeprecatedActions
}

func ColumnTypeFromTypeAndTag added in v1.0.1

func ColumnTypeFromTypeAndTag(typ reflect.Type, nameAndFlags string) *ColumnType

type Columns

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

func Cols

func Cols(names ...string) *Columns

func (*Columns) Add

func (cols *Columns) Add(columns ...*Column)

func (*Columns) AutoIncrement

func (cols *Columns) AutoIncrement() (col *Column)

func (*Columns) Clone

func (cols *Columns) Clone() *Columns

func (*Columns) Col

func (cols *Columns) Col(columnName string) (col *Column)

func (*Columns) Cols

func (cols *Columns) Cols(colNames ...string) (*Columns, error)

func (*Columns) Ex added in v1.0.1

func (cols *Columns) Ex(ctx context.Context) *Ex

func (*Columns) F

func (cols *Columns) F(fileName string) (col *Column)

func (*Columns) FieldNames

func (cols *Columns) FieldNames() []string

func (*Columns) Fields

func (cols *Columns) Fields(fieldNames ...string) (*Columns, error)

func (*Columns) IsNil added in v1.0.1

func (cols *Columns) IsNil() bool

func (*Columns) Len

func (cols *Columns) Len() int

func (*Columns) List

func (cols *Columns) List() (l []*Column)

func (*Columns) MustFields added in v1.0.1

func (cols *Columns) MustFields(fieldNames ...string) *Columns

func (*Columns) Range

func (cols *Columns) Range(cb func(col *Column, idx int))

func (*Columns) Remove

func (cols *Columns) Remove(name string)

type CombinationAddition added in v1.0.1

type CombinationAddition struct {
}

func (CombinationAddition) AdditionType added in v1.0.1

func (CombinationAddition) AdditionType() AdditionType

type CommentAddition added in v1.0.1

type CommentAddition struct {
}

func (CommentAddition) AdditionType added in v1.0.1

func (CommentAddition) AdditionType() AdditionType

type ComposedCondition added in v1.0.1

type ComposedCondition struct {
	SqlConditionMarker
	// contains filtered or unexported fields
}

func (*ComposedCondition) And added in v1.0.1

func (*ComposedCondition) Ex added in v1.0.1

func (c *ComposedCondition) Ex(ctx context.Context) *Ex

func (*ComposedCondition) IsNil added in v1.0.1

func (c *ComposedCondition) IsNil() bool

func (*ComposedCondition) Or added in v1.0.1

func (*ComposedCondition) Xor added in v1.0.1

type Condition

type Condition struct {
	SqlConditionMarker
	// contains filtered or unexported fields
}

func AsCond added in v1.0.1

func AsCond(ex SqlExpr) *Condition

func (*Condition) And

func (c *Condition) And(cond SqlCondition) SqlCondition

func (*Condition) Ex added in v1.0.1

func (c *Condition) Ex(ctx context.Context) *Ex

func (*Condition) IsNil added in v1.0.1

func (c *Condition) IsNil() bool

func (*Condition) Or

func (c *Condition) Or(cond SqlCondition) SqlCondition

func (*Condition) Xor

func (c *Condition) Xor(cond SqlCondition) SqlCondition

type DataTypeDescriber added in v1.0.1

type DataTypeDescriber interface {
	DataType(driverName string) string
}

type DeprecatedActions added in v1.0.1

type DeprecatedActions struct {
	RenameTo string `name:"rename"`
}

type Dialect added in v1.0.1

type Dialect interface {
	DriverName() string
	PrimaryKeyName() string
	IsErrorUnknownDatabase(err error) bool
	IsErrorConflict(err error) bool
	CreateDatabase(dbName string) SqlExpr
	CreateSchema(schemaName string) SqlExpr
	DropDatabase(dbName string) SqlExpr
	CreateTableIsNotExists(t *Table) []SqlExpr
	DropTable(t *Table) SqlExpr
	TruncateTable(t *Table) SqlExpr
	AddColumn(col *Column) SqlExpr
	RenameColumn(col *Column, target *Column) SqlExpr
	ModifyColumn(col *Column) SqlExpr
	DropColumn(col *Column) SqlExpr
	AddIndex(key *Key) SqlExpr
	DropIndex(key *Key) SqlExpr
	DataType(columnType *ColumnType) SqlExpr
}

type Ex added in v1.0.1

type Ex struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func Expr

func Expr(query string, args ...interface{}) *Ex

func ResolveExpr added in v1.0.1

func ResolveExpr(v interface{}) *Ex

func ResolveExprContext added in v1.0.1

func ResolveExprContext(ctx context.Context, v interface{}) *Ex

func (*Ex) AppendArgs added in v1.0.1

func (e *Ex) AppendArgs(args ...interface{})

func (*Ex) Args added in v1.0.1

func (e *Ex) Args() []interface{}

func (*Ex) ArgsLen added in v1.0.1

func (e *Ex) ArgsLen() int

func (*Ex) Err added in v1.0.1

func (e *Ex) Err() error

func (Ex) Ex added in v1.0.1

func (e Ex) Ex(ctx context.Context) *Ex

func (*Ex) IsNil added in v1.0.1

func (e *Ex) IsNil() bool

func (*Ex) Query added in v1.0.1

func (e *Ex) Query() string

func (*Ex) WhiteComments added in v1.0.1

func (e *Ex) WhiteComments(comments []byte)

func (*Ex) WriteEnd added in v1.0.1

func (e *Ex) WriteEnd()

func (*Ex) WriteExpr added in v1.0.1

func (e *Ex) WriteExpr(expr SqlExpr)

func (*Ex) WriteGroup added in v1.0.1

func (e *Ex) WriteGroup(fn func(e *Ex))

func (*Ex) WriteHolder added in v1.0.1

func (e *Ex) WriteHolder(idx int)

type FieldValues

type FieldValues map[string]interface{}

func FieldValuesFromStructBy added in v1.0.1

func FieldValuesFromStructBy(structValue interface{}, fieldNames []string) (fieldValues FieldValues)

func FieldValuesFromStructByNonZero added in v1.0.1

func FieldValuesFromStructByNonZero(structValue interface{}, excludes ...string) (fieldValues FieldValues)

type Function

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

func Avg

func Avg(sqlExprs ...SqlExpr) *Function

func Count

func Count(sqlExprs ...SqlExpr) *Function

func Distinct

func Distinct(sqlExprs ...SqlExpr) *Function

func First

func First(sqlExprs ...SqlExpr) *Function

func Func

func Func(name string, sqlExprs ...SqlExpr) *Function

func Last

func Last(sqlExprs ...SqlExpr) *Function

func Max

func Max(sqlExprs ...SqlExpr) *Function

func Min

func Min(sqlExprs ...SqlExpr) *Function

func Sum

func Sum(sqlExprs ...SqlExpr) *Function

func (*Function) Ex added in v1.0.1

func (f *Function) Ex(ctx context.Context) *Ex

func (*Function) IsNil added in v1.0.1

func (f *Function) IsNil() bool

type GroupByAddition added in v1.0.1

type GroupByAddition struct {
}

func (GroupByAddition) AdditionType added in v1.0.1

func (GroupByAddition) AdditionType() AdditionType

type Indexes added in v1.0.1

type Indexes map[string][]string

type JoinAddition added in v1.0.1

type JoinAddition struct{}

func (JoinAddition) AdditionType added in v1.0.1

func (JoinAddition) AdditionType() AdditionType

type Key

type Key struct {
	Columns *Columns
	Table   *Table

	Name     string
	IsUnique bool
	Method   string
}

func Index

func Index(name string, columns *Columns) *Key

func PrimaryKey

func PrimaryKey(columns *Columns) *Key

func UniqueIndex

func UniqueIndex(name string, columns *Columns) *Key

func (*Key) IsPrimary added in v1.0.1

func (key *Key) IsPrimary() bool

func (Key) On added in v1.0.1

func (key Key) On(table *Table) *Key

func (*Key) T added in v1.0.1

func (key *Key) T() *Table

func (Key) Using added in v1.0.1

func (key Key) Using(method string) *Key

type Keys

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

func (*Keys) Add

func (keys *Keys) Add(nextKeys ...*Key)

func (*Keys) Clone

func (keys *Keys) Clone() *Keys

func (*Keys) IsEmpty

func (keys *Keys) IsEmpty() bool

func (*Keys) Key

func (keys *Keys) Key(keyName string) (key *Key)

func (*Keys) Len

func (keys *Keys) Len() int

func (*Keys) Range

func (keys *Keys) Range(cb func(key *Key, idx int))

func (*Keys) Remove

func (keys *Keys) Remove(name string)

type LimitAddition added in v1.0.1

type LimitAddition struct {
}

func (LimitAddition) AdditionType added in v1.0.1

func (LimitAddition) AdditionType() AdditionType

type Model added in v1.0.1

type Model interface {
	TableName() string
}

type OnConflictAddition added in v1.0.1

type OnConflictAddition struct {
}

func (OnConflictAddition) AdditionType added in v1.0.1

func (OnConflictAddition) AdditionType() AdditionType

type Order added in v1.0.1

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

func AscOrder added in v1.0.1

func AscOrder(target SqlExpr) *Order

func DescOrder added in v1.0.1

func DescOrder(target SqlExpr) *Order

func (*Order) Ex added in v1.0.1

func (o *Order) Ex(ctx context.Context) *Ex

func (*Order) IsNil added in v1.0.1

func (o *Order) IsNil() bool

type OrderByAddition added in v1.0.1

type OrderByAddition struct {
}

func (OrderByAddition) AdditionType added in v1.0.1

func (OrderByAddition) AdditionType() AdditionType

type OtherAddition added in v1.0.1

type OtherAddition struct {
	SqlExpr
}

func AsAddition added in v1.0.1

func AsAddition(expr SqlExpr) *OtherAddition

func ForUpdate added in v1.0.1

func ForUpdate() *OtherAddition

func OnDuplicateKeyUpdate added in v1.0.1

func OnDuplicateKeyUpdate(assignments ...*Assignment) *OtherAddition

func Returning added in v1.0.1

func Returning(expr SqlExpr) *OtherAddition

func (OtherAddition) AdditionType added in v1.0.1

func (OtherAddition) AdditionType() AdditionType

func (*OtherAddition) IsNil added in v1.0.1

func (a *OtherAddition) IsNil() bool

type SelectStatement added in v1.0.1

type SelectStatement interface {
	SqlExpr
	// contains filtered or unexported methods
}

type SqlAssignment added in v1.0.1

type SqlAssignment interface {
	SqlExpr
	SqlAssignmentMarker
}

type SqlAssignmentMarker added in v1.0.1

type SqlAssignmentMarker interface {
	// contains filtered or unexported methods
}

type SqlCondition added in v1.0.1

type SqlCondition interface {
	SqlExpr
	SqlConditionMarker

	And(cond SqlCondition) SqlCondition
	Or(cond SqlCondition) SqlCondition
	Xor(cond SqlCondition) SqlCondition
}

func And

func And(conditions ...SqlCondition) SqlCondition

func EmptyCond added in v1.0.1

func EmptyCond() SqlCondition

func Or

func Or(conditions ...SqlCondition) SqlCondition

func Xor

func Xor(conditions ...SqlCondition) SqlCondition

type SqlConditionMarker added in v1.0.1

type SqlConditionMarker interface {
	// contains filtered or unexported methods
}

type SqlExpr added in v1.0.1

type SqlExpr interface {
	IsNil() bool
	Ex(ctx context.Context) *Ex
}

func ExprBy added in v1.0.1

func ExprBy(build func(ctx context.Context) *Ex) SqlExpr

func Multi added in v1.0.1

func Multi(exprs ...SqlExpr) SqlExpr

func MultiWith added in v1.0.1

func MultiWith(connector string, exprs ...SqlExpr) SqlExpr

type StmtDelete

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

func Delete

func Delete() *StmtDelete

func (*StmtDelete) Ex added in v1.0.1

func (s *StmtDelete) Ex(ctx context.Context) *Ex

func (StmtDelete) From added in v1.0.1

func (s StmtDelete) From(table *Table, additions ...Addition) *StmtDelete

func (*StmtDelete) IsNil added in v1.0.1

func (s *StmtDelete) IsNil() bool

type StmtInsert

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

https://dev.mysql.com/doc/refman/5.6/en/insert.html

func Insert

func Insert(modifiers ...string) *StmtInsert

func (*StmtInsert) Ex added in v1.0.1

func (s *StmtInsert) Ex(ctx context.Context) *Ex

func (StmtInsert) Into added in v1.0.1

func (s StmtInsert) Into(table *Table, additions ...Addition) *StmtInsert

func (*StmtInsert) IsNil added in v1.0.1

func (s *StmtInsert) IsNil() bool

func (StmtInsert) Values

func (s StmtInsert) Values(cols *Columns, values ...interface{}) *StmtInsert

type StmtSelect

type StmtSelect struct {
	SelectStatement
	// contains filtered or unexported fields
}

func Select added in v1.0.1

func Select(sqlExpr SqlExpr, modifiers ...string) *StmtSelect

func (*StmtSelect) Ex added in v1.0.1

func (s *StmtSelect) Ex(ctx context.Context) *Ex

func (StmtSelect) From added in v1.0.1

func (s StmtSelect) From(table *Table, additions ...Addition) *StmtSelect

func (*StmtSelect) IsNil added in v1.0.1

func (s *StmtSelect) IsNil() bool

type StmtUpdate

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

func Update

func Update(table *Table, modifiers ...string) *StmtUpdate

func (*StmtUpdate) Ex added in v1.0.1

func (s *StmtUpdate) Ex(ctx context.Context) *Ex

func (*StmtUpdate) IsNil added in v1.0.1

func (s *StmtUpdate) IsNil() bool

func (StmtUpdate) Set

func (s StmtUpdate) Set(assignments ...*Assignment) *StmtUpdate

func (StmtUpdate) Where

func (s StmtUpdate) Where(c SqlCondition, additions ...Addition) *StmtUpdate

type Table

type Table struct {
	Name        string
	Description []string

	Schema    string
	ModelName string
	Model     Model

	Columns
	Keys
}

func T

func T(tableName string, tableDefinitions ...TableDefinition) *Table

func TableFromModel added in v1.0.1

func TableFromModel(model Model) *Table

func (*Table) AddCol added in v1.0.1

func (t *Table) AddCol(d *Column)

func (*Table) AddKey added in v1.0.1

func (t *Table) AddKey(key *Key)

func (*Table) AssignmentsByFieldValues added in v1.0.1

func (t *Table) AssignmentsByFieldValues(fieldValues FieldValues) (assignments Assignments)

func (*Table) ColumnsAndValuesByFieldValues

func (t *Table) ColumnsAndValuesByFieldValues(fieldValues FieldValues) (columns *Columns, args []interface{})

func (*Table) Diff

func (t *Table) Diff(prevTable *Table, dialect Dialect) (exprList []SqlExpr)

func (*Table) Ex

func (t *Table) Ex(ctx context.Context) *Ex

func (*Table) Expr added in v1.0.1

func (t *Table) Expr(query string, args ...interface{}) *Ex

func (*Table) IsNil added in v1.0.1

func (t *Table) IsNil() bool

func (*Table) TableName added in v1.0.1

func (t *Table) TableName() string

func (Table) WithSchema added in v1.0.1

func (t Table) WithSchema(schema string) *Table

type TableDefinition added in v1.0.1

type TableDefinition interface {
	T() *Table
}

type Tables

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

func (*Tables) Add

func (tables *Tables) Add(tabs ...*Table)

func (*Tables) Model added in v1.0.1

func (tables *Tables) Model(structName string) *Table

func (*Tables) Range added in v1.0.1

func (tables *Tables) Range(cb func(tab *Table, idx int))

func (*Tables) Remove added in v1.0.1

func (tables *Tables) Remove(name string)

func (*Tables) Table added in v1.0.1

func (tables *Tables) Table(tableName string) *Table

func (*Tables) TableNames

func (tables *Tables) TableNames() (names []string)

type Toggles added in v1.0.1

type Toggles map[string]bool

func TogglesFromContext added in v1.0.1

func TogglesFromContext(ctx context.Context) Toggles

func (Toggles) Is added in v1.0.1

func (toggles Toggles) Is(key string) bool

func (Toggles) Merge added in v1.0.1

func (toggles Toggles) Merge(next Toggles) Toggles

type ValuerExpr added in v1.0.1

type ValuerExpr interface {
	ValueEx() string
}

replace ? as some query snippet

examples: ? => ST_GeomFromText(?)

type WhereAddition added in v1.0.1

type WhereAddition struct{}

func (WhereAddition) AdditionType added in v1.0.1

func (WhereAddition) AdditionType() AdditionType

type WithColDescriptions added in v1.0.1

type WithColDescriptions interface {
	ColDescriptions() map[string][]string
}

type WithComments added in v1.0.1

type WithComments interface {
	Comments() map[string]string
}

type WithIndexes added in v1.0.1

type WithIndexes interface {
	Indexes() Indexes
}

type WithPrimaryKey added in v1.0.1

type WithPrimaryKey interface {
	PrimaryKey() []string
}

type WithRelations added in v1.0.1

type WithRelations interface {
	ColRelations() map[string][]string
}

type WithStmt added in v1.0.1

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

func With added in v1.0.1

func With(t *Table, build BuildSubQuery, modifiers ...string) *WithStmt

func WithRecursive added in v1.0.1

func WithRecursive(t *Table, build BuildSubQuery) *WithStmt

func (*WithStmt) Ex added in v1.0.1

func (w *WithStmt) Ex(ctx context.Context) *Ex

func (WithStmt) Exec added in v1.0.1

func (w WithStmt) Exec(statement func(tables ...*Table) SqlExpr) *WithStmt

func (*WithStmt) IsNil added in v1.0.1

func (w *WithStmt) IsNil() bool

func (WithStmt) With added in v1.0.1

func (w WithStmt) With(t *Table, build BuildSubQuery) *WithStmt

type WithTableDescription added in v1.0.1

type WithTableDescription interface {
	TableDescription() []string
}

type WithUniqueIndexes added in v1.0.1

type WithUniqueIndexes interface {
	UniqueIndexes() Indexes
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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