Versions in this module Expand all Collapse all v1 v1.0.0 Nov 9, 2019 Changes in this version + const ColAdd + const ColExcept + const ColMinus + const ColMultiply + const DebugQueries + const IsFieldType + const IsIntegerField + const IsPositiveIntegerField + const IsRelField + const RelForeignKey + const RelManyToMany + const RelOneToOne + const RelReverseMany + const RelReverseOne + const TypeBigIntegerField + const TypeBitField + const TypeBooleanField + const TypeCharField + const TypeDateField + const TypeDateTimeField + const TypeDecimalField + const TypeFloatField + const TypeIntegerField + const TypeJSONField + const TypeJsonbField + const TypePositiveBigIntegerField + const TypePositiveBitField + const TypePositiveIntegerField + const TypePositiveSmallIntegerField + const TypeSmallIntegerField + const TypeTextField + const TypeTimeField + var DefaultRelsDepth = 2 + var DefaultRowsLimit = 1000 + var DefaultTimeLoc = time.Local + func AddAliasWthDB(aliasName, driverName string, db *sql.DB) error + func AddDatabase(name string, c *Cache) + func ColValue(opt operator, value interface{}) interface + func Do(name, cmd string, to ...interface{}) (reply interface{}, err error) + func GetConnects(name string) int + func GetDB(aliasNames ...string) (*sql.DB, error) + func RegisterDataBase(aliasName, driverName, dataSource string, params ...int) error + func RegisterDriver(driverName string, typ DriverType) error + func ResetModelCache() + func SetConnMaxLifetime(aliasName string, connMaxLifetime int) + func SetDataBaseTZ(aliasName string, tz *time.Location) error + func SetMaxIdleConns(aliasName string, maxIdleConns int) + func SetMaxOpenConns(aliasName string, maxOpenConns int) + func ToInt64(value interface{}) (d int64) + func ToStr(value interface{}, args ...int) (s string) + func Transaction(db string, fun func() error) (e error) + type Cache struct + func GetClient(name string) *Cache + func NewCache(connection string, password string, dbNum int, idle int, maxOpen int) (cache *Cache, err error) + type Driver interface + Name func() string + Type func() DriverType + type DriverType int + const DRMySQL + const DROracle + const DRPostgres + const DRSqlite + const DRTiDB + type Fielder interface + FieldType func() int + RawValue func() interface{} + SetRaw func(interface{}) error + String func() string + type Ormer interface + Begin func() error + Commit func() error + Driver func() Driver + Raw func(query string, args ...interface{}) RawSeter + RawCallBack func(func(string, []interface{})) + Rollback func() error + Using func(name string) error + func New(db string) (resultOrm Ormer) + type Params map[string]interface + type ParamsList []interface + type QuerySeter interface + type RawPreparer interface + Close func() error + Exec func(...interface{}) (sql.Result, error) + type RawSeter interface + Exec func() (sql.Result, error) + Prepare func() (RawPreparer, error) + QueryRow func(containers ...interface{}) error + QueryRows func(containers ...interface{}) (int64, error) + RelateCache func(...interface{}) RawSeter + type StrTo string + func (f *StrTo) Clear() + func (f *StrTo) Set(v string) + func (f StrTo) Bool() (bool, error) + func (f StrTo) Exist() bool + func (f StrTo) Float32() (float32, error) + func (f StrTo) Float64() (float64, error) + func (f StrTo) Int() (int, error) + func (f StrTo) Int16() (int16, error) + func (f StrTo) Int32() (int32, error) + func (f StrTo) Int64() (int64, error) + func (f StrTo) Int8() (int8, error) + func (f StrTo) String() string + func (f StrTo) Uint() (uint, error) + func (f StrTo) Uint16() (uint16, error) + func (f StrTo) Uint32() (uint32, error) + func (f StrTo) Uint64() (uint64, error) + func (f StrTo) Uint8() (uint8, error)