Documentation ¶
Index ¶
- type FakeGorm
- func (f *FakeGorm) AddError(err error) error
- func (f *FakeGorm) AddForeignKey(field string, dest string, onDelete string, onUpdate string) Gorm
- func (f *FakeGorm) AddIndex(indexName string, columns ...string) Gorm
- func (f *FakeGorm) AddUniqueIndex(indexName string, columns ...string) Gorm
- func (f *FakeGorm) Assign(attrs ...interface{}) Gorm
- func (f *FakeGorm) Association(column string) *gorm.Association
- func (f *FakeGorm) Attrs(attrs ...interface{}) Gorm
- func (f *FakeGorm) AutoMigrate(values ...interface{}) Gorm
- func (f *FakeGorm) Begin() Gorm
- func (f *FakeGorm) Callback() *gorm.Callback
- func (f *FakeGorm) Close() error
- func (f *FakeGorm) Commit() Gorm
- func (f *FakeGorm) CommonDB() gorm.SQLCommon
- func (f *FakeGorm) Count(value interface{}) Gorm
- func (f *FakeGorm) Create(value interface{}) Gorm
- func (f *FakeGorm) CreateTable(values ...interface{}) Gorm
- func (f *FakeGorm) DB() *sql.DB
- func (f *FakeGorm) Debug() Gorm
- func (f *FakeGorm) Delete(value interface{}, where ...interface{}) Gorm
- func (f *FakeGorm) DropColumn(column string) Gorm
- func (f *FakeGorm) DropTable(values ...interface{}) Gorm
- func (f *FakeGorm) DropTableIfExists(values ...interface{}) Gorm
- func (f *FakeGorm) Error() error
- func (f *FakeGorm) Exec(sql string, values ...interface{}) Gorm
- func (f *FakeGorm) Find(out interface{}, where ...interface{}) Gorm
- func (f *FakeGorm) First(out interface{}, where ...interface{}) Gorm
- func (f *FakeGorm) FirstOrCreate(out interface{}, where ...interface{}) Gorm
- func (f *FakeGorm) FirstOrInit(out interface{}, where ...interface{}) Gorm
- func (f *FakeGorm) Get(name string) (interface{}, bool)
- func (f *FakeGorm) GetErrors() (errors []error)
- func (f *FakeGorm) Group(query string) Gorm
- func (f *FakeGorm) HasTable(value interface{}) bool
- func (f *FakeGorm) Having(query string, values ...interface{}) Gorm
- func (f *FakeGorm) InstantSet(name string, value interface{}) Gorm
- func (f *FakeGorm) Joins(query string, args ...interface{}) Gorm
- func (f *FakeGorm) Last(out interface{}, where ...interface{}) Gorm
- func (f *FakeGorm) Limit(value int) Gorm
- func (f *FakeGorm) LogMode(enable bool) Gorm
- func (f *FakeGorm) Model(value interface{}) Gorm
- func (f *FakeGorm) ModifyColumn(column string, typ string) Gorm
- func (f *FakeGorm) New() Gorm
- func (f *FakeGorm) NewRecord(value interface{}) bool
- func (f *FakeGorm) NewScope(value interface{}) *gorm.Scope
- func (f *FakeGorm) Not(query interface{}, args ...interface{}) Gorm
- func (f *FakeGorm) Offset(value int) Gorm
- func (f *FakeGorm) Omit(columns ...string) Gorm
- func (f *FakeGorm) Or(query interface{}, args ...interface{}) Gorm
- func (f *FakeGorm) Order(value string, reorder ...bool) Gorm
- func (f *FakeGorm) Pluck(column string, value interface{}) Gorm
- func (f *FakeGorm) Preload(column string, conditions ...interface{}) Gorm
- func (f *FakeGorm) Raw(sql string, values ...interface{}) Gorm
- func (f *FakeGorm) RecordNotFound() bool
- func (f *FakeGorm) Related(value interface{}, foreignKeys ...string) Gorm
- func (f *FakeGorm) RemoveIndex(indexName string) Gorm
- func (f *FakeGorm) Rollback() Gorm
- func (f *FakeGorm) RollbackUnlessCommitted() Gorm
- func (f *FakeGorm) Row() *sql.Row
- func (f *FakeGorm) Rows() (*sql.Rows, error)
- func (f *FakeGorm) RowsAffected() int64
- func (f *FakeGorm) Save(value interface{}) Gorm
- func (f *FakeGorm) Scan(dest interface{}) Gorm
- func (f *FakeGorm) ScanRows(rows *sql.Rows, result interface{}) error
- func (f *FakeGorm) Scopes(funcs ...func(*gorm.DB) *gorm.DB) Gorm
- func (f *FakeGorm) Select(query interface{}, args ...interface{}) Gorm
- func (f *FakeGorm) Set(name string, value interface{}) Gorm
- func (f *FakeGorm) SetJoinTableHandler(source interface{}, column string, handler gorm.JoinTableHandlerInterface)
- func (f *FakeGorm) SetLogger(log gorm.Logger)
- func (f *FakeGorm) SingularTable(enable bool)
- func (f *FakeGorm) Table(name string) Gorm
- func (f *FakeGorm) Transaction(fc func(tx *gorm.DB) error) error
- func (f *FakeGorm) Unscoped() Gorm
- func (f *FakeGorm) Update(attrs ...interface{}) Gorm
- func (f *FakeGorm) UpdateColumn(attrs ...interface{}) Gorm
- func (f *FakeGorm) UpdateColumns(values interface{}) Gorm
- func (f *FakeGorm) Updates(values interface{}, ignoreProtectedAttrs ...bool) Gorm
- func (f *FakeGorm) Where(query interface{}, args ...interface{}) Gorm
- type Gorm
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeGorm ¶
func (*FakeGorm) AddForeignKey ¶
func (*FakeGorm) AddUniqueIndex ¶
func (*FakeGorm) Association ¶
func (f *FakeGorm) Association(column string) *gorm.Association
func (*FakeGorm) AutoMigrate ¶
func (*FakeGorm) CreateTable ¶
func (*FakeGorm) DropColumn ¶
func (*FakeGorm) DropTableIfExists ¶
func (*FakeGorm) FirstOrCreate ¶
func (*FakeGorm) FirstOrInit ¶
func (*FakeGorm) InstantSet ¶
func (*FakeGorm) RecordNotFound ¶
func (*FakeGorm) RemoveIndex ¶
func (*FakeGorm) RollbackUnlessCommitted ¶
func (*FakeGorm) RowsAffected ¶
func (*FakeGorm) SetJoinTableHandler ¶
func (f *FakeGorm) SetJoinTableHandler(source interface{}, column string, handler gorm.JoinTableHandlerInterface)
func (*FakeGorm) SingularTable ¶
func (*FakeGorm) UpdateColumn ¶
func (*FakeGorm) UpdateColumns ¶
type Gorm ¶
type Gorm interface { Close() error DB() *sql.DB New() Gorm NewScope(value interface{}) *gorm.Scope CommonDB() gorm.SQLCommon Callback() *gorm.Callback SetLogger(l gorm.Logger) LogMode(enable bool) Gorm SingularTable(enable bool) Where(query interface{}, args ...interface{}) Gorm Or(query interface{}, args ...interface{}) Gorm Not(query interface{}, args ...interface{}) Gorm Limit(value int) Gorm Offset(value int) Gorm Order(value string, reorder ...bool) Gorm Select(query interface{}, args ...interface{}) Gorm Omit(columns ...string) Gorm Group(query string) Gorm Having(query string, values ...interface{}) Gorm Joins(query string, args ...interface{}) Gorm Scopes(funcs ...func(*gorm.DB) *gorm.DB) Gorm Unscoped() Gorm Attrs(attrs ...interface{}) Gorm Assign(attrs ...interface{}) Gorm First(out interface{}, where ...interface{}) Gorm Last(out interface{}, where ...interface{}) Gorm Find(out interface{}, where ...interface{}) Gorm Scan(dest interface{}) Gorm Row() *sql.Row Rows() (*sql.Rows, error) ScanRows(rows *sql.Rows, result interface{}) error Pluck(column string, value interface{}) Gorm Count(value interface{}) Gorm Related(value interface{}, foreignKeys ...string) Gorm FirstOrInit(out interface{}, where ...interface{}) Gorm FirstOrCreate(out interface{}, where ...interface{}) Gorm Update(attrs ...interface{}) Gorm Updates(values interface{}, ignoreProtectedAttrs ...bool) Gorm UpdateColumn(attrs ...interface{}) Gorm UpdateColumns(values interface{}) Gorm Save(value interface{}) Gorm Create(value interface{}) Gorm Delete(value interface{}, where ...interface{}) Gorm Raw(sql string, values ...interface{}) Gorm Exec(sql string, values ...interface{}) Gorm Model(value interface{}) Gorm Table(name string) Gorm Debug() Gorm Transaction(fc func(tx *gorm.DB) error) error Begin() Gorm Commit() Gorm Rollback() Gorm RollbackUnlessCommitted() Gorm NewRecord(value interface{}) bool RecordNotFound() bool CreateTable(values ...interface{}) Gorm DropTable(values ...interface{}) Gorm DropTableIfExists(values ...interface{}) Gorm HasTable(value interface{}) bool AutoMigrate(values ...interface{}) Gorm ModifyColumn(column string, typ string) Gorm DropColumn(column string) Gorm AddIndex(indexName string, column ...string) Gorm AddUniqueIndex(indexName string, column ...string) Gorm RemoveIndex(indexName string) Gorm AddForeignKey(field string, dest string, onDelete string, onUpdate string) Gorm Association(column string) *gorm.Association Preload(column string, conditions ...interface{}) Gorm Set(name string, value interface{}) Gorm InstantSet(name string, value interface{}) Gorm Get(name string) (value interface{}, ok bool) SetJoinTableHandler(source interface{}, column string, handler gorm.JoinTableHandlerInterface) AddError(err error) error GetErrors() (errors []error) // extra Error() error RowsAffected() int64 }
Gorm is an interface which DB implements
Click to show internal directories.
Click to hide internal directories.