Documentation ¶
Index ¶
- func Register(dbName, driverName, dataSourceName, mapperPath string) error
- func ToInt64(value interface{}) (d int64)
- func ToStr(value interface{}, args ...int) (s string)
- type SqlFactory
- type StrTo
- func (f StrTo) Bool() (bool, error)
- func (f *StrTo) Clear()
- 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) Set(v string)
- 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SqlFactory ¶
type SqlFactory interface { QueryRows(namespace, id string, param interface{}, rows interface{}) error QueryRow(namespace, id string, param interface{}, row interface{}) error Query(param interface{}) error Insert(namespace string, id string, param interface{}) (lastInsertId int64, err error) Update(namespace string, id string, param interface{}) (rowsAffected int64, err error) Execute(sqlType, namespace string, id string, param interface{}) (cnt int64, err error) GetDB() (db *sql.DB, err error) }
func Use ¶
func Use(dbName string) SqlFactory
Source Files ¶
Click to show internal directories.
Click to hide internal directories.