Documentation
¶
Index ¶
- Constants
- Variables
- func Abs(expression interface{}) *functionGeneric
- func Any(expressions ...interface{}) *functionGeneric
- func ArrayAgg(expression interface{}) *functionAgg
- func ArrayToJson(expression interface{}) *functionGeneric
- func As(expression interface{}, alias string) *functionExpressions
- func Avg(expression interface{}) *functionGeneric
- func Between(expression interface{}, low interface{}, high interface{}, ...) *functionExpressions
- func BetweenOr(expression interface{}, low interface{}, high interface{}) *functionExpressions
- func Case(value ...interface{}) *functionCase
- func Cast(expression interface{}, dataType dataType) *functionExpressions
- func Concat(expressions ...interface{}) *functionGeneric
- func Condition(expression interface{}, comparator comparator, value interface{}) *functionExpressions
- func Count(expression interface{}, distinct ...bool) *functionCount
- func Every(expression interface{}) *functionGeneric
- func Exists(file string) bool
- func Function(name string, arguments ...interface{}) *functionGeneric
- func GetEnv() string
- func In(field interface{}, expressions ...interface{}) *functionField
- func InitCap(expression interface{}) *functionGeneric
- func IsNull(expression interface{}) *functionExpressions
- func JsonAgg(expression interface{}) *functionAgg
- func JsonArrayLength(expression interface{}) *functionGeneric
- func JsonObjectAgg(name interface{}, value interface{}) *functionAgg
- func JsonbAgg(expression interface{}) *functionAgg
- func JsonbObjectAgg(name interface{}, value interface{}) *functionAgg
- func Left(expression interface{}, n int) *functionGeneric
- func Length(expression interface{}) *functionGeneric
- func Lower(expression interface{}) *functionGeneric
- func Marshal(object interface{}) ([]byte, error)
- func Max(expression interface{}) *functionGeneric
- func Md5(expression interface{}) *functionGeneric
- func Min(expression interface{}) *functionGeneric
- func NewDb(database database, dialect dialect) *db
- func Not(expression interface{}) *functionGeneric
- func NotIn(field interface{}, expressions ...interface{}) *functionField
- func Now() *functionGeneric
- func OnNull(expression interface{}, onNullValue interface{}, alias string) *functionExpressions
- func Operation(expression interface{}, operation operation, value interface{}) *functionExpressions
- func Over(value interface{}) *functionOver
- func Random(expression interface{}) *functionGeneric
- func ReadFile(file string, obj interface{}) ([]byte, error)
- func ReadFileLines(file string) ([]string, error)
- func Repeat(expression interface{}, n int) *functionGeneric
- func Replace(expression interface{}, from interface{}, to interface{}) *functionGeneric
- func Right(expression interface{}, n int) *functionGeneric
- func RowToJson(expression interface{}) *functionGeneric
- func Some(expressions ...interface{}) *functionGeneric
- func Sqrt(expression interface{}) *functionGeneric
- func StringAgg(expression interface{}, delimiter interface{}) *functionAgg
- func Sum(expression interface{}) *functionGeneric
- func ToJson(expression interface{}) *functionGeneric
- func Trim(expression interface{}) *functionGeneric
- func Unmarshal(bytes []byte, object interface{}) error
- func Upper(expression interface{}) *functionGeneric
- func User() *functionGeneric
- func WriteFile(file string, obj interface{}) error
- func XmlAgg(expression interface{}) *functionAgg
- type AppConfig
- type Builder
- type Dbr
- func (dbr *Dbr) Begin() (*Transaction, error)
- func (dbr *Dbr) Delete() *StmtDelete
- func (dbr *Dbr) Execute(query string) *StmtExecute
- func (dbr *Dbr) Insert() *StmtInsert
- func (dbr *Dbr) Reconfigure(options ...DbrOption)
- func (dbr *Dbr) Select(column ...interface{}) *StmtSelect
- func (dbr *Dbr) Update(table interface{}) *StmtUpdate
- func (dbr *Dbr) UseOnlyRead(name string, builder Builder) *Dbr
- func (dbr *Dbr) UseOnlyWrite(name string, builder Builder) *Dbr
- func (dbr *Dbr) With(name string, builder Builder) *StmtWith
- func (dbr *Dbr) WithRecursive(name string, builder Builder) *StmtWith
- type DbrConfig
- type DbrOption
- func WithConfiguration(config *DbrConfig) DbrOption
- func WithDatabase(master *db, slave ...*db) DbrOption
- func WithErrorEventHandler(eventHandler ErrorEventHandler) DbrOption
- func WithLogLevel(level logger.Level) DbrOption
- func WithLogger(logger logger.ILogger) DbrOption
- func WithManager(mgr *manager.Manager) DbrOption
- func WithMigrationConfig(migration *services.MigrationConfig) DbrOption
- func WithSuccessEventHandler(eventHandler SuccessEventHandler) DbrOption
- type ErrorEventHandler
- type Executor
- type IDbr
- type Join
- type Result
- type SqlOperation
- type StmtConflict
- type StmtDelete
- func (stmt *StmtDelete) Build() (query string, _ error)
- func (stmt *StmtDelete) Exec() (sql.Result, error)
- func (stmt *StmtDelete) From(table interface{}) *StmtDelete
- func (stmt *StmtDelete) Load(object interface{}) (count int, err error)
- func (stmt *StmtDelete) Return(column ...interface{}) *StmtDelete
- func (stmt *StmtDelete) Where(query interface{}, values ...interface{}) *StmtDelete
- func (stmt *StmtDelete) WhereOr(query string, values ...interface{}) *StmtDelete
- type StmtExecute
- type StmtInsert
- func (stmt *StmtInsert) Build() (string, error)
- func (stmt *StmtInsert) Columns(columns ...interface{}) *StmtInsert
- func (stmt *StmtInsert) DoNothing() *StmtInsert
- func (stmt *StmtInsert) DoUpdate(fieldValue ...interface{}) *StmtInsert
- func (stmt *StmtInsert) Exec() (sql.Result, error)
- func (stmt *StmtInsert) FromSelect(selectStmt *StmtSelect) *StmtInsert
- func (stmt *StmtInsert) Into(table interface{}) *StmtInsert
- func (stmt *StmtInsert) Load(object interface{}) (count int, err error)
- func (stmt *StmtInsert) OnConflict(column ...interface{}) *StmtInsert
- func (stmt *StmtInsert) OnConflictConstraint(constraint interface{}) *StmtInsert
- func (stmt *StmtInsert) Record(record interface{}) *StmtInsert
- func (stmt *StmtInsert) Records(records []interface{}) *StmtInsert
- func (stmt *StmtInsert) Return(column ...interface{}) *StmtInsert
- func (stmt *StmtInsert) Values(valuesList ...interface{}) *StmtInsert
- type StmtJoin
- type StmtSelect
- func (stmt *StmtSelect) Build() (string, error)
- func (stmt *StmtSelect) CrossJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) Distinct(column ...interface{}) *StmtSelect
- func (stmt *StmtSelect) DistinctOn(column ...interface{}) *StmtSelect
- func (stmt *StmtSelect) Except(stmtExcept *StmtSelect) *StmtSelect
- func (stmt *StmtSelect) From(tables ...interface{}) *StmtSelect
- func (stmt *StmtSelect) FullJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) GroupBy(columns ...string) *StmtSelect
- func (stmt *StmtSelect) Having(query string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) HavingOr(query string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) Intersect(stmtIntersect *StmtSelect) *StmtSelect
- func (stmt *StmtSelect) Join(table interface{}, onQuery string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) LeftJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) Limit(limit int) *StmtSelect
- func (stmt *StmtSelect) Load(object interface{}) (int, error)
- func (stmt *StmtSelect) NaturalJoin(table interface{}) *StmtSelect
- func (stmt *StmtSelect) Offset(offset int) *StmtSelect
- func (stmt *StmtSelect) OrderAsc(columns ...string) *StmtSelect
- func (stmt *StmtSelect) OrderBy(column string, direction direction) *StmtSelect
- func (stmt *StmtSelect) OrderDesc(columns ...string) *StmtSelect
- func (stmt *StmtSelect) Return(column ...interface{}) *StmtSelect
- func (stmt *StmtSelect) RightJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) Union(stmtUnion *StmtSelect) *StmtSelect
- func (stmt *StmtSelect) UnionAll(stmtUnionAll *StmtSelect) *StmtSelect
- func (stmt *StmtSelect) Where(query interface{}, values ...interface{}) *StmtSelect
- func (stmt *StmtSelect) WhereExists(stmtSelect *StmtSelect) *StmtSelect
- func (stmt *StmtSelect) WhereNotExists(stmtSelect *StmtSelect) *StmtSelect
- func (stmt *StmtSelect) WhereOr(query string, values ...interface{}) *StmtSelect
- type StmtUpdate
- func (stmt *StmtUpdate) Build() (query string, err error)
- func (stmt *StmtUpdate) Exec() (sql.Result, error)
- func (stmt *StmtUpdate) From(table interface{}) *StmtUpdate
- func (stmt *StmtUpdate) Load(object interface{}) (count int, err error)
- func (stmt *StmtUpdate) Record(record interface{}) *StmtUpdate
- func (stmt *StmtUpdate) Return(column ...interface{}) *StmtUpdate
- func (stmt *StmtUpdate) Set(column string, value interface{}) *StmtUpdate
- func (stmt *StmtUpdate) Where(query interface{}, values ...interface{}) *StmtUpdate
- func (stmt *StmtUpdate) WhereOr(query string, values ...interface{}) *StmtUpdate
- type StmtWhereExists
- type StmtWith
- func (w *StmtWith) Build() (string, error)
- func (w *StmtWith) Delete() *StmtDelete
- func (w *StmtWith) Insert() *StmtInsert
- func (w *StmtWith) Select(column ...interface{}) *StmtSelect
- func (w *StmtWith) Update(table interface{}) *StmtUpdate
- func (w *StmtWith) With(name string, builder Builder) *StmtWith
- type SuccessEventHandler
- type Transaction
- func (tx *Transaction) Commit() error
- func (tx *Transaction) Delete() *StmtDelete
- func (tx *Transaction) Execute(query string) *StmtExecute
- func (tx *Transaction) Insert() *StmtInsert
- func (tx *Transaction) Rollback() error
- func (tx *Transaction) RollbackUnlessCommit() error
- func (tx *Transaction) Select(column ...interface{}) *StmtSelect
- func (tx *Transaction) Update(table interface{}) *StmtUpdate
- func (tx *Transaction) With(name string, builder Builder) *StmtWith
- func (tx *Transaction) WithRecursive(name string, builder Builder) *StmtWith
Constants ¶
View Source
const ( OrderAsc direction = "ASC" OrderDesc direction = "DESC" ExecuteOperation SqlOperation = "EXECUTE" SelectOperation SqlOperation = "SELECT" InsertOperation SqlOperation = "INSERT" UpdateOperation SqlOperation = "UPDATE" DeleteOperation SqlOperation = "DELETE" OperatorAnd operator = "AND" OperatorOr operator = "OR" OperationAdd operation = "+" OperationSubtract operation = "-" OperationMultiply operation = "*" OperationDivide operation = "/" OperationRest operation = "%" ComparatorDifferent comparator = "!=" ComparatorEqual comparator = "=" ComparatorBigger comparator = ">" ComparatorBiggerOrEqual comparator = ">=" ComparatorSmaller comparator = "<" ComparatorSmallerOrEqual comparator = "<=" DataTypeSmallInt dataType = "SMALLINT" DataTypeInt dataType = "INTEGER" DataTypeBigInt dataType = "BIGINT" DataTypeBoolean dataType = "BOOLEAN" DataTypeText dataType = "TEXT" DataTypeFloat dataType = "FLOAT4" DataTypeBigFloat dataType = "FLOAT8" DataTypeDate dataType = "DATE" DataTypeJson dataType = "JSON" DataTypeJsonb dataType = "JSONB" DataTypeMoney dataType = "MONEY" DataTypeSmallSerial dataType = "SMALLSERIAL" DataTypeSerial dataType = "SERIAL" DataTypeBigSerial dataType = "SERIAL8" DataTypeUuid dataType = "UUID" DataTypeXml dataType = "XML" DataTypeTime dataType = "TIME" DataTypeTimestamp dataType = "TIMESTAMP" )
Variables ¶
View Source
var ( ErrorNumberOfConditionValues = errors.New("invalid number of condition values") ErrorEmptySet = errors.New("empty set") ErrorInvalidPointer = errors.New("the object isn't a pointer") ErrorDialectNotFound = errors.New("dialect not found") )
View Source
var (
NoResult = &Result{}
)
Functions ¶
func ArrayToJson ¶
func ArrayToJson(expression interface{}) *functionGeneric
func Between ¶
func Between(expression interface{}, low interface{}, high interface{}, operator ...operator) *functionExpressions
func BetweenOr ¶
func BetweenOr(expression interface{}, low interface{}, high interface{}) *functionExpressions
func Condition ¶
func Condition(expression interface{}, comparator comparator, value interface{}) *functionExpressions
func JsonArrayLength ¶
func JsonArrayLength(expression interface{}) *functionGeneric
func JsonObjectAgg ¶
func JsonObjectAgg(name interface{}, value interface{}) *functionAgg
func JsonbObjectAgg ¶
func JsonbObjectAgg(name interface{}, value interface{}) *functionAgg
func OnNull ¶
func OnNull(expression interface{}, onNullValue interface{}, alias string) *functionExpressions
func Operation ¶
func Operation(expression interface{}, operation operation, value interface{}) *functionExpressions
func ReadFileLines ¶
Types ¶
type Dbr ¶
type Dbr struct { Connections *connections // contains filtered or unexported fields }
func (*Dbr) Begin ¶
func (dbr *Dbr) Begin() (*Transaction, error)
func (*Dbr) Delete ¶
func (dbr *Dbr) Delete() *StmtDelete
func (*Dbr) Execute ¶
func (dbr *Dbr) Execute(query string) *StmtExecute
func (*Dbr) Insert ¶
func (dbr *Dbr) Insert() *StmtInsert
func (*Dbr) Select ¶
func (dbr *Dbr) Select(column ...interface{}) *StmtSelect
func (*Dbr) Update ¶
func (dbr *Dbr) Update(table interface{}) *StmtUpdate
type DbrConfig ¶
type DbrConfig struct { Db *manager.DBConfig `json:"db"` ReadDb *manager.DBConfig `json:"read_db"` WriteDb *manager.DBConfig `json:"write_db"` Migration *services.MigrationConfig `json:"migration"` Log struct { Level string `json:"level"` } `json:"log"` }
DbrConfig ...
type DbrOption ¶
type DbrOption func(client *Dbr)
DbrOption ...
func WithErrorEventHandler ¶
func WithErrorEventHandler(eventHandler ErrorEventHandler) DbrOption
WithErrorEventHandler ...
func WithMigrationConfig ¶
func WithMigrationConfig(migration *services.MigrationConfig) DbrOption
WithMigrationConfig ...
func WithSuccessEventHandler ¶
func WithSuccessEventHandler(eventHandler SuccessEventHandler) DbrOption
WithSuccessEventHandler ...
type ErrorEventHandler ¶
type ErrorEventHandler func(operation SqlOperation, table []string, query string, err error) error
type IDbr ¶
type IDbr interface { Select(column ...interface{}) *StmtSelect Insert() *StmtInsert Update(table interface{}) *StmtUpdate Delete() *StmtDelete Execute(query string) *StmtExecute With(name string, builder Builder) *StmtWith WithRecursive(name string, builder Builder) *StmtWith }
type SqlOperation ¶
type SqlOperation string
type StmtConflict ¶
type StmtConflict struct {
// contains filtered or unexported fields
}
func (*StmtConflict) Build ¶
func (stmt *StmtConflict) Build() (string, error)
type StmtDelete ¶
type StmtDelete struct { Dbr *Dbr Db *db Duration time.Duration // contains filtered or unexported fields }
func (*StmtDelete) Build ¶
func (stmt *StmtDelete) Build() (query string, _ error)
func (*StmtDelete) From ¶
func (stmt *StmtDelete) From(table interface{}) *StmtDelete
func (*StmtDelete) Load ¶
func (stmt *StmtDelete) Load(object interface{}) (count int, err error)
func (*StmtDelete) Return ¶
func (stmt *StmtDelete) Return(column ...interface{}) *StmtDelete
func (*StmtDelete) Where ¶
func (stmt *StmtDelete) Where(query interface{}, values ...interface{}) *StmtDelete
func (*StmtDelete) WhereOr ¶
func (stmt *StmtDelete) WhereOr(query string, values ...interface{}) *StmtDelete
type StmtExecute ¶
type StmtExecute struct { Dbr *Dbr Db *db Duration time.Duration // contains filtered or unexported fields }
func (*StmtExecute) Build ¶
func (stmt *StmtExecute) Build() (query string, _ error)
func (*StmtExecute) Values ¶
func (stmt *StmtExecute) Values(valuesList ...interface{}) *StmtExecute
type StmtInsert ¶
type StmtInsert struct { Dbr *Dbr Db *db Duration time.Duration // contains filtered or unexported fields }
func (*StmtInsert) Build ¶
func (stmt *StmtInsert) Build() (string, error)
func (*StmtInsert) Columns ¶
func (stmt *StmtInsert) Columns(columns ...interface{}) *StmtInsert
func (*StmtInsert) DoNothing ¶
func (stmt *StmtInsert) DoNothing() *StmtInsert
func (*StmtInsert) DoUpdate ¶
func (stmt *StmtInsert) DoUpdate(fieldValue ...interface{}) *StmtInsert
func (*StmtInsert) FromSelect ¶
func (stmt *StmtInsert) FromSelect(selectStmt *StmtSelect) *StmtInsert
func (*StmtInsert) Into ¶
func (stmt *StmtInsert) Into(table interface{}) *StmtInsert
func (*StmtInsert) Load ¶
func (stmt *StmtInsert) Load(object interface{}) (count int, err error)
func (*StmtInsert) OnConflict ¶
func (stmt *StmtInsert) OnConflict(column ...interface{}) *StmtInsert
func (*StmtInsert) OnConflictConstraint ¶
func (stmt *StmtInsert) OnConflictConstraint(constraint interface{}) *StmtInsert
func (*StmtInsert) Record ¶
func (stmt *StmtInsert) Record(record interface{}) *StmtInsert
func (*StmtInsert) Records ¶
func (stmt *StmtInsert) Records(records []interface{}) *StmtInsert
func (*StmtInsert) Return ¶
func (stmt *StmtInsert) Return(column ...interface{}) *StmtInsert
func (*StmtInsert) Values ¶
func (stmt *StmtInsert) Values(valuesList ...interface{}) *StmtInsert
type StmtSelect ¶
type StmtSelect struct { Dbr *Dbr Db *db Duration time.Duration // contains filtered or unexported fields }
func (*StmtSelect) Build ¶
func (stmt *StmtSelect) Build() (string, error)
func (*StmtSelect) CrossJoin ¶
func (stmt *StmtSelect) CrossJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
func (*StmtSelect) Distinct ¶
func (stmt *StmtSelect) Distinct(column ...interface{}) *StmtSelect
func (*StmtSelect) DistinctOn ¶
func (stmt *StmtSelect) DistinctOn(column ...interface{}) *StmtSelect
func (*StmtSelect) Except ¶
func (stmt *StmtSelect) Except(stmtExcept *StmtSelect) *StmtSelect
func (*StmtSelect) From ¶
func (stmt *StmtSelect) From(tables ...interface{}) *StmtSelect
func (*StmtSelect) FullJoin ¶
func (stmt *StmtSelect) FullJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
func (*StmtSelect) GroupBy ¶
func (stmt *StmtSelect) GroupBy(columns ...string) *StmtSelect
func (*StmtSelect) Having ¶
func (stmt *StmtSelect) Having(query string, values ...interface{}) *StmtSelect
func (*StmtSelect) HavingOr ¶
func (stmt *StmtSelect) HavingOr(query string, values ...interface{}) *StmtSelect
func (*StmtSelect) Intersect ¶
func (stmt *StmtSelect) Intersect(stmtIntersect *StmtSelect) *StmtSelect
func (*StmtSelect) Join ¶
func (stmt *StmtSelect) Join(table interface{}, onQuery string, values ...interface{}) *StmtSelect
func (*StmtSelect) LeftJoin ¶
func (stmt *StmtSelect) LeftJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
func (*StmtSelect) Limit ¶
func (stmt *StmtSelect) Limit(limit int) *StmtSelect
func (*StmtSelect) Load ¶
func (stmt *StmtSelect) Load(object interface{}) (int, error)
func (*StmtSelect) NaturalJoin ¶
func (stmt *StmtSelect) NaturalJoin(table interface{}) *StmtSelect
func (*StmtSelect) Offset ¶
func (stmt *StmtSelect) Offset(offset int) *StmtSelect
func (*StmtSelect) OrderAsc ¶
func (stmt *StmtSelect) OrderAsc(columns ...string) *StmtSelect
func (*StmtSelect) OrderBy ¶
func (stmt *StmtSelect) OrderBy(column string, direction direction) *StmtSelect
func (*StmtSelect) OrderDesc ¶
func (stmt *StmtSelect) OrderDesc(columns ...string) *StmtSelect
func (*StmtSelect) Return ¶
func (stmt *StmtSelect) Return(column ...interface{}) *StmtSelect
func (*StmtSelect) RightJoin ¶
func (stmt *StmtSelect) RightJoin(table interface{}, onQuery string, values ...interface{}) *StmtSelect
func (*StmtSelect) Union ¶
func (stmt *StmtSelect) Union(stmtUnion *StmtSelect) *StmtSelect
func (*StmtSelect) UnionAll ¶
func (stmt *StmtSelect) UnionAll(stmtUnionAll *StmtSelect) *StmtSelect
func (*StmtSelect) Where ¶
func (stmt *StmtSelect) Where(query interface{}, values ...interface{}) *StmtSelect
func (*StmtSelect) WhereExists ¶
func (stmt *StmtSelect) WhereExists(stmtSelect *StmtSelect) *StmtSelect
func (*StmtSelect) WhereNotExists ¶
func (stmt *StmtSelect) WhereNotExists(stmtSelect *StmtSelect) *StmtSelect
func (*StmtSelect) WhereOr ¶
func (stmt *StmtSelect) WhereOr(query string, values ...interface{}) *StmtSelect
type StmtUpdate ¶
type StmtUpdate struct { Dbr *Dbr Db *db Duration time.Duration // contains filtered or unexported fields }
func (*StmtUpdate) Build ¶
func (stmt *StmtUpdate) Build() (query string, err error)
func (*StmtUpdate) From ¶
func (stmt *StmtUpdate) From(table interface{}) *StmtUpdate
func (*StmtUpdate) Load ¶
func (stmt *StmtUpdate) Load(object interface{}) (count int, err error)
func (*StmtUpdate) Record ¶
func (stmt *StmtUpdate) Record(record interface{}) *StmtUpdate
func (*StmtUpdate) Return ¶
func (stmt *StmtUpdate) Return(column ...interface{}) *StmtUpdate
func (*StmtUpdate) Set ¶
func (stmt *StmtUpdate) Set(column string, value interface{}) *StmtUpdate
func (*StmtUpdate) Where ¶
func (stmt *StmtUpdate) Where(query interface{}, values ...interface{}) *StmtUpdate
func (*StmtUpdate) WhereOr ¶
func (stmt *StmtUpdate) WhereOr(query string, values ...interface{}) *StmtUpdate
type StmtWhereExists ¶
type StmtWhereExists struct {
// contains filtered or unexported fields
}
func (*StmtWhereExists) Build ¶
func (stmt *StmtWhereExists) Build() (query string, err error)
type StmtWith ¶
type StmtWith struct {
// contains filtered or unexported fields
}
func (*StmtWith) Delete ¶
func (w *StmtWith) Delete() *StmtDelete
func (*StmtWith) Insert ¶
func (w *StmtWith) Insert() *StmtInsert
func (*StmtWith) Select ¶
func (w *StmtWith) Select(column ...interface{}) *StmtSelect
func (*StmtWith) Update ¶
func (w *StmtWith) Update(table interface{}) *StmtUpdate
type SuccessEventHandler ¶
type Transaction ¶
func (*Transaction) Commit ¶
func (tx *Transaction) Commit() error
func (*Transaction) Delete ¶
func (tx *Transaction) Delete() *StmtDelete
func (*Transaction) Execute ¶
func (tx *Transaction) Execute(query string) *StmtExecute
func (*Transaction) Insert ¶
func (tx *Transaction) Insert() *StmtInsert
func (*Transaction) Rollback ¶
func (tx *Transaction) Rollback() error
func (*Transaction) RollbackUnlessCommit ¶
func (tx *Transaction) RollbackUnlessCommit() error
func (*Transaction) Select ¶
func (tx *Transaction) Select(column ...interface{}) *StmtSelect
func (*Transaction) Update ¶
func (tx *Transaction) Update(table interface{}) *StmtUpdate
func (*Transaction) WithRecursive ¶
func (tx *Transaction) WithRecursive(name string, builder Builder) *StmtWith
Source Files
¶
- builder.go
- case.go
- case_else.go
- case_when.go
- case_whens.go
- columns.go
- comparator.go
- condition.go
- conditions.go
- config.go
- consts.go
- data_type.go
- database.go
- dbr.go
- dialect.go
- dialect_mysql.go
- dialect_postgres.go
- dialect_sqllite3.go
- errors.go
- event_handler.go
- executor.go
- function.go
- function_array_agg.go
- function_case.go
- function_count.go
- function_expressions.go
- function_field.go
- function_generic.go
- function_over.go
- group_by.go
- handle.go
- joins.go
- json.go
- load_option.go
- operation.go
- operator.go
- options.go
- order.go
- partition.go
- result.go
- set.go
- sets.go
- sql_operation.go
- stmt_delete.go
- stmt_execute.go
- stmt_insert.go
- stmt_join.go
- stmt_on_conflict.go
- stmt_select.go
- stmt_update.go
- stmt_where_exists.go
- stmt_with.go
- table.go
- tables.go
- transaction.go
- unions.go
- utils.go
- values.go
- withs.go
Click to show internal directories.
Click to hide internal directories.