Documentation ¶
Index ¶
- Variables
- func AddModels(models ...interface{})
- func Open()
- type DB
- func (b *DB) All(models interface{}, where ...interface{}) *DB
- func (b *DB) Count() interface{}
- func (b *DB) Create(value interface{}) *DB
- func (b *DB) Delete(value interface{}, where ...interface{}) *DB
- func (b *DB) First(out interface{}, where ...interface{}) *DB
- func (b *DB) Group(query string) *DB
- func (b *DB) Having(query string) *DB
- func (b *DB) IsNew(model interface{}) bool
- func (b *DB) Last(out interface{}, where ...interface{}) *DB
- func (b *DB) Limit(limit interface{}) *DB
- func (b *DB) Model(value interface{}) *DB
- func (b *DB) OrWhere(query interface{}, args ...interface{}) *DB
- func (b *DB) Save(value interface{}) *DB
- func (b *DB) Scan(dest interface{}) *DB
- func (b *DB) Select(query interface{}, args ...interface{}) *DB
- func (b *DB) Skip(skip interface{}) *DB
- func (b *DB) Table(name string) *DB
- func (b *DB) Unscoped() *DB
- func (b *DB) Update(attrs ...interface{}) *DB
- func (b *DB) Updates(values interface{}, ignoreProtectedAttrs ...bool) *DB
- func (b *DB) Where(query interface{}, args ...interface{}) *DB
- func (b *DB) WhereNot(query interface{}, args ...interface{}) *DB
- type Model
Constants ¶
This section is empty.
Variables ¶
View Source
var Models []interface{}
Models stores the current set of application models.
Functions ¶
Types ¶
type DB ¶
DB represents the database structure used
var Builder *DB
Builder represents the current database used.
func (*DB) Count ¶
func (b *DB) Count() interface{}
Count 's the database records in the given table
func (*DB) Delete ¶
Delete delete value match given conditions, if the value has primary key, then will including the primary key as condition
func (*DB) Save ¶
Save update value in database, if the value doesn't have primary key, will insert it
Click to show internal directories.
Click to hide internal directories.