Versions in this module Expand all Collapse all v1 v1.2.1 Sep 20, 2021 v1.2.0 Sep 22, 2017 Changes in this version type DB + func (db *DB) Ping() error v1.1.0 Sep 4, 2017 Changes in this version + type Association struct + func (a *Association) Append(values ...interface{}) error + func (a *Association) Count() (int, error) + func (a *Association) Find(v interface{}) error + func (a *Association) Save(values ...interface{}) error + type DB struct + func Open(dialect string, args ...interface{}) (*DB, error) + func OpenWithOpener(opener Opener, dialect string, args ...interface{}) (*DB, error) + func (db *DB) AddForeignKey(field string, dest string, onDelete string, onUpdate string) error + func (db *DB) AddForeignKeySQL(field string, dest string, onDelete string, onUpdate string) (string, error) + func (db *DB) AddIndex(indexName string, columns ...string) (sql.Result, error) + func (db *DB) AddIndexSQL(indexName string, columns ...string) (*model.Expr, error) + func (db *DB) AddUniqueIndex(indexName string, columns ...string) (sql.Result, error) + func (db *DB) Assign(attrs ...interface{}) *DB + func (db *DB) Association(column string) (*Association, error) + func (db *DB) Attrs(attrs ...interface{}) *DB + func (db *DB) Automigrate(models ...interface{}) (sql.Result, error) + func (db *DB) AutomigrateSQL(models ...interface{}) (*model.Expr, error) + func (db *DB) Begin() *DB + func (db *DB) Close() error + func (db *DB) Count(value interface{}) error + func (db *DB) Create(value interface{}) error + func (db *DB) CreateSQL(value interface{}) (*model.Expr, error) + func (db *DB) CreateTable(models ...interface{}) (sql.Result, error) + func (db *DB) CreateTableSQL(models ...interface{}) (*model.Expr, error) + func (db *DB) Delete(value interface{}, where ...interface{}) error + func (db *DB) DeleteSQL(value interface{}, where ...interface{}) (*model.Expr, error) + func (db *DB) Dialect() dialects.Dialect + func (db *DB) DropColumn(column string) (sql.Result, error) + func (db *DB) DropTable(models ...interface{}) (sql.Result, error) + func (db *DB) DropTableIfExists(values ...interface{}) error + func (db *DB) DropTableSQL(models ...interface{}) (*model.Expr, error) + func (db *DB) ExecTx(query string, args ...interface{}) (sql.Result, error) + func (db *DB) Find(out interface{}, where ...interface{}) error + func (db *DB) FindSQL(out interface{}, where ...interface{}) (*model.Expr, error) + func (db *DB) First(out interface{}, where ...interface{}) error + func (db *DB) FirstOrCreate(out interface{}, where ...interface{}) error + func (db *DB) FirstOrInit(out interface{}, where ...interface{}) error + func (db *DB) FirstSQL(out interface{}, where ...interface{}) (*model.Expr, error) + func (db *DB) Group(query string) *DB + func (db *DB) HasTable(value interface{}) bool + func (db *DB) Having(query string, values ...interface{}) *DB + func (db *DB) Joins(query string, args ...interface{}) *DB + func (db *DB) Last(out interface{}, where ...interface{}) error + func (db *DB) LastSQL(out interface{}, where ...interface{}) (*model.Expr, error) + func (db *DB) Limit(limit interface{}) *DB + func (db *DB) Model(value interface{}) *DB + func (db *DB) ModifyColumn(column string, typ string) (sql.Result, error) + func (db *DB) NewEngine() *engine.Engine + func (db *DB) Not(query interface{}, args ...interface{}) *DB + func (db *DB) Offset(offset interface{}) *DB + func (db *DB) Omit(columns ...string) *DB + func (db *DB) Or(query interface{}, args ...interface{}) *DB + func (db *DB) Order(value interface{}, reorder ...bool) *DB + func (db *DB) Pluck(column string, value interface{}) error + func (db *DB) Preload(column string, conditions ...interface{}) *DB + func (db *DB) Related(value interface{}, foreignKeys ...string) error + func (db *DB) RemoveIndex(indexName string) error + func (db *DB) SQLCommon() model.SQLCommon + func (db *DB) Save(value interface{}) error + func (db *DB) SaveSQL(value interface{}) (*model.Expr, error) + func (db *DB) Select(query interface{}, args ...interface{}) *DB + func (db *DB) Set(key string, value interface{}) *DB + func (db *DB) SingularTable(enable bool) + func (db *DB) Table(name string) *DB + func (db *DB) Update(attrs ...interface{}) error + func (db *DB) UpdateColumn(attrs ...interface{}) error + func (db *DB) UpdateColumns(values interface{}) error + func (db *DB) UpdateSQL(attrs ...interface{}) (*model.Expr, error) + func (db *DB) Updates(values interface{}, ignoreProtectedAttrs ...bool) error + func (db *DB) UpdatesSQL(values interface{}, ignoreProtectedAttrs ...bool) (*model.Expr, error) + func (db *DB) Verbose(b bool) + func (db *DB) Where(query interface{}, args ...interface{}) *DB + type Opener interface + Open func(dialect string, args ...interface{}) (model.SQLCommon, dialects.Dialect, error)