Versions in this module Expand all Collapse all v0 v0.2.0 Feb 20, 2019 Changes in this version + var ErrNoColumn = Error("sqlgen: no column to update") + var ErrNoRows = sql.ErrNoRows + func Now(t, now time.Time, update bool) time.Time + func NowP(t *time.Time, now time.Time, update bool) time.Time + func Ternary(cond bool, exp1, exp2 interface{}) interface + func WriteCols(w SQLWriter, prefix string, cols string) + type Array struct + V interface{} + func ArrayScanner(v interface{}) Array + func (a Array) Scan(src interface{}) error + func (a Array) Value() (driver.Value, error) + type Bool bool + func (b *Bool) Scan(src interface{}) error + func (b Bool) Value() (driver.Value, error) + type CommonQuery interface + Apply func(funcs ...func(CommonQuery)) Query + Count func(obj ITableName, preds ...interface{}) (uint64, error) + Delete func(obj ITableName) (int64, error) + Exists func(column string, exists bool) Query + Find func(objs IFind, preds ...interface{}) error + From func(table string) Query + Get func(obj IGet, preds ...interface{}) (bool, error) + GroupBy func(groupBys ...string) Query + In func(column string, args ...interface{}) Query + Insert func(objs ...IInsert) (int64, error) + IsNull func(column string, null bool) Query + Limit func(limit uint64) Query + NotIn func(column string, args ...interface{}) Query + Offset func(offset uint64) Query + OrderBy func(orderBys ...string) Query + Prefix func(sql string, args ...interface{}) Query + Preload func(table string, preds ...interface{}) Query + SQL func(preds ...interface{}) Query + Select func(cols ...string) Query + Suffix func(sql string, args ...interface{}) Query + Table func(name string) Query + Update func(objs ...IUpdate) (int64, error) + UpdateAll func() Query + UpdateMap func(m map[string]interface{}) (int64, error) + Where func(preds ...interface{}) Query + type DBInterface interface + Exec func(query string, args ...interface{}) (sql.Result, error) + ExecContext func(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + Query func(query string, args ...interface{}) (*sql.Rows, error) + QueryContext func(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) + QueryRow func(query string, args ...interface{}) Row + QueryRowContext func(ctx context.Context, query string, args ...interface{}) Row + type Error string + func Errorf(format string, args ...interface{}) Error + func (e Error) Error() string + type Float = Float64 + type Float32 float32 + func (f *Float32) Scan(src interface{}) error + func (f Float32) Value() (driver.Value, error) + type Float64 float64 + func (f *Float64) Scan(src interface{}) error + func (f Float64) Value() (driver.Value, error) + type IFind interface + SQLScan func(Opts, *sql.Rows) error + SQLSelect func(SQLWriter) error + type IGet interface + SQLScan func(Opts, *sql.Row) error + SQLSelect func(SQLWriter) error + type IInsert interface + SQLInsert func(SQLWriter) error + type IJoin interface + SQLJoin func(SQLWriter, []JoinType) error + type IPreload interface + SQLPopulate func(items IFind) error + SQLPreload func(name string) *PreloadDesc + type IScan interface + SQLScan func(Opts, *sql.Rows) error + type IScanRow interface + SQLScan func(Opts, *sql.Row) error + type ISelect interface + SQLSelect func(SQLWriter) error + type ITableName interface + SQLTableName func() string + type IUpdate interface + SQLUpdate func(SQLWriter) error + SQLUpdateAll func(SQLWriter) error + type Int int + func (i *Int) Scan(src interface{}) error + func (i Int) Value() (driver.Value, error) + type Int16 int16 + func (i *Int16) Scan(src interface{}) error + func (i Int16) Value() (driver.Value, error) + type Int32 int32 + func (i *Int32) Scan(src interface{}) error + func (i Int32) Value() (driver.Value, error) + type Int64 int64 + func (i *Int64) Scan(src interface{}) error + func (i Int64) Value() (driver.Value, error) + type Int8 int8 + func (i *Int8) Scan(src interface{}) error + func (i Int8) Value() (driver.Value, error) + type Interface struct + V interface{} + func (i Interface) Bool() *bool + func (i Interface) Int() *int + func (i Interface) Int32() *int32 + func (i Interface) Int64() *int64 + func (i Interface) JSON() json.RawMessage + func (i Interface) Map() map[string]interface{} + func (i Interface) String() *string + func (i Interface) Time() time.Time + func (i Interface) Unmarshal(v interface{}) error + type InvalidArgumentError string + func (e InvalidArgumentError) Error() string + type JSON struct + V interface{} + func (v JSON) Scan(src interface{}) error + func (v JSON) Value() (driver.Value, error) + type JoinType string + type Map struct + M map[string]interface{} + Table string + func (m Map) SQLTableName() string + func (m Map) SQLUpdate(w SQLWriter) error + func (m Map) SQLUpdateAll(w SQLWriter) error + type Opts struct + UseArrayInsteadOfJSON bool + func (opts Opts) Array(v interface{}) Array + func (opts Opts) JSON(v interface{}) JSON + type PreloadDesc struct + Fkey string + IDs interface{} + Items IFind + type Query interface + Build func(preds ...interface{}) (string, []interface{}, error) + BuildCount func(obj ITableName, preds ...interface{}) (string, []interface{}, error) + BuildDelete func(obj ITableName) (string, []interface{}, error) + BuildFind func(objs IFind, preds ...interface{}) (string, []interface{}, error) + BuildGet func(obj IGet, preds ...interface{}) (string, []interface{}, error) + BuildInsert func(obj IInsert) (string, []interface{}, error) + BuildUpdate func(obj IUpdate) (string, []interface{}, error) + Clone func() Query + Exec func() (sql.Result, error) + Query func() (*sql.Rows, error) + QueryRow func() (Row, error) + Scan func(dest ...interface{}) error + WithContext func(context.Context) Query + type Row struct + Log func(err error) error + Row *sql.Row + func (r Row) Scan(dest ...interface{}) error + type SQLWriter interface + Len func() int + Opts func() Opts + TrimLast func(n int) + WriteArg func(arg interface{}) + WriteArgs func(args []interface{}) + WriteByte func(b byte) + WriteMarker func() + WriteMarkers func(n int) + WriteName func(name string) + WritePrefixedName func(schema string, name string) + WriteQuery func(b []byte) + WriteQueryName func(name string) + WriteQueryString func(s string) + WriteQueryStringWithPrefix func(prefix string, s string) + WriteRaw func(b []byte) + WriteRawString func(s string) + WriteScanArg func(arg interface{}) + WriteScanArgs func(args []interface{}) + type String string + func (s *String) Scan(src interface{}) error + func (s String) String() string + func (s String) Value() (driver.Value, error) + type Time time.Time + func (t *Time) Scan(src interface{}) error + func (t Time) Value() (driver.Value, error) + type Uint uint + func (i *Uint) Scan(src interface{}) error + func (i Uint) Value() (driver.Value, error) + type Uint16 uint16 + func (i *Uint16) Scan(src interface{}) error + func (i Uint16) Value() (driver.Value, error) + type Uint32 uint32 + func (i *Uint32) Scan(src interface{}) error + func (i Uint32) Value() (driver.Value, error) + type Uint64 uint64 + func (i *Uint64) Scan(src interface{}) error + func (i Uint64) Value() (driver.Value, error) + type Uint8 uint8 + func (i *Uint8) Scan(src interface{}) error + func (i Uint8) Value() (driver.Value, error) v0.1.0 Jun 2, 2018