Documentation ¶
Index ¶
- func And(conds ...interface{}) *ormCondEx
- func Between(field string, i interface{}, j interface{}) *ormCond
- func BormMock(tbl, fun, caller, file, pkg string, data interface{}, ret int, err error)
- func BormMockFinish() error
- func Cond(c string, args ...interface{}) *ormCond
- func Eq(field string, i interface{}) *ormCond
- func Fields(fields ...string) *fieldsItem
- func ForceIndex(idx string) *forceIndexItem
- func GroupBy(fields ...string) *groupByItem
- func Gt(field string, i interface{}) *ormCond
- func Gte(field string, i interface{}) *ormCond
- func Having(conds ...interface{}) *havingItem
- func In(field string, args ...interface{}) *ormCond
- func Like(field string, pattern string) *ormCond
- func Limit(i ...interface{}) *limitItem
- func Lt(field string, i interface{}) *ormCond
- func Lte(field string, i interface{}) *ormCond
- func Neq(field string, i interface{}) *ormCond
- func OnDuplicateKeyUpdate(keyVals V) *onDuplicateKeyUpdateItem
- func Or(conds ...interface{}) *ormCondEx
- func OrderBy(orders ...string) *orderByItem
- func Where(conds ...interface{}) *whereItem
- type BormDBIFace
- type BormItem
- type BormTable
- func (t *BormTable) BuildInsertSQL(prefix string, objs interface{}, args ...BormItem) (sql string, stmtArgs []interface{}, err error)
- func (t *BormTable) BuildUpdateSQL(obj interface{}, args ...BormItem) (sql string, stmtArgs []interface{}, err error)
- func (t *BormTable) Debug() *BormTable
- func (t *BormTable) Delete(args ...BormItem) (int, error)
- func (t *BormTable) Insert(objs interface{}, args ...BormItem) (int, error)
- func (t *BormTable) InsertIgnore(objs interface{}, args ...BormItem) (int, error)
- func (t *BormTable) ReplaceInto(objs interface{}, args ...BormItem) (int, error)
- func (t *BormTable) Reuse() *BormTable
- func (t *BormTable) Select(res interface{}, args ...BormItem) (int, error)
- func (t *BormTable) ToTimestamp() *BormTable
- func (t *BormTable) Update(obj interface{}, args ...BormItem) (int, error)
- func (t *BormTable) UseNameWhenTagEmpty() *BormTable
- type Config
- type DataBindingItem
- type MockMatcher
- type U
- type V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnDuplicateKeyUpdate ¶
func OnDuplicateKeyUpdate(keyVals V) *onDuplicateKeyUpdateItem
OnDuplicateKeyUpdate .
Types ¶
type BormDBIFace ¶
type BormDBIFace interface { QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) }
type BormTable ¶
type BormTable struct { DB BormDBIFace Name string Cfg Config // contains filtered or unexported fields }
func (*BormTable) BuildInsertSQL ¶
func (*BormTable) BuildUpdateSQL ¶
func (*BormTable) InsertIgnore ¶
func (*BormTable) ReplaceInto ¶
func (*BormTable) ToTimestamp ¶
func (*BormTable) UseNameWhenTagEmpty ¶
type DataBindingItem ¶
DataBindingItem .
Click to show internal directories.
Click to hide internal directories.