Versions in this module Expand all Collapse all v1 v1.0.0 Nov 19, 2020 Changes in this version + var ByEq = func(eq sq.Eq) Qualifier + var ByID = func(id interface{}) Qualifier + var Debug = true + var ErrNoAffectedRows = errors.New("y/errors: no affected rows found") + var MySQL = mysqlProvider + var Postgres = postgresProvider + func DeleteBy(db sq.BaseRunner, p *Proxy, by Values) (int64, error) + func Put(db sq.BaseRunner, p *Proxy) (int64, error) + func SetBuilderProvider(rdb provider) + func Truncate(db sq.BaseRunner, p *Proxy) (err error) + func Tx(db *sql.DB, pipes ...TxPipe) (err error) + func Update(db sq.BaseRunner, p *Proxy, v Values) error + type Changer struct + func (c *Changer) Update(db sq.BaseRunner) (err error) + type Collection struct + func Fetch(db sq.BaseRunner, v interface{}) (*Collection, error) + func (c *Collection) Empty() bool + func (c *Collection) First() interface{} + func (c *Collection) Join(j *Collection) + func (c *Collection) List() interface{} + func (c *Collection) Size() int + type Finder struct + func (f *Finder) Fetch(db sq.BaseRunner) (*Collection, error) + func (f *Finder) Load(db sq.BaseRunner) error + func (f *Finder) Qualify(q Qualifier) *Finder + type Modifier func(v interface{}) interface + func IncrFloat(to interface{}) Modifier + func IncrInt(to interface{}) Modifier + type Proxy struct + func New(v interface{}) *Proxy + func (p *Proxy) Collection() *Collection + func (p *Proxy) Delete(db sq.BaseRunner) (int64, error) + func (p *Proxy) DeleteBy(db sq.BaseRunner, by Values) (int64, error) + func (p *Proxy) Fetch(db sq.BaseRunner) (*Collection, error) + func (p *Proxy) Field(name string) reflect.Value + func (p *Proxy) Find() *Finder + func (p *Proxy) FindBy(q Qualifier) *Finder + func (p *Proxy) Join(db sq.BaseRunner, in *Collection) (*Collection, error) + func (p *Proxy) Load(db sq.BaseRunner) error + func (p *Proxy) Map() Values + func (p *Proxy) MustLoad(db sq.BaseRunner) *Proxy + func (p *Proxy) Put(db sq.BaseRunner) (int64, error) + func (p *Proxy) Query(b sq.SelectBuilder) *Finder + func (p *Proxy) Truncate(db sq.BaseRunner) error + func (p *Proxy) Update(db sq.BaseRunner, v Values) error + type Qualifier func(sq.SelectBuilder) sq.SelectBuilder + type TxPipe func(sq.BaseRunner) error + type Values map[string]interface + type Versionable struct + Version sql.NullInt64 + func MakeVersionable(n int64) Versionable