Documentation ¶
Index ¶
- Constants
- func IsNotFoundError(err error) bool
- func Mapping(data interface{}) map[string]interface{}
- func Scan(rs *sql.Rows, target interface{}) error
- func ScanToMap(rs *sql.Rows) ([]map[string]interface{}, error)
- type DB
- func (db *DB) Close() error
- func (db *DB) Count(name string, where Where, col string) (int64, error)
- func (db *DB) Delete(name string, where Where) (int64, error)
- func (db *DB) Insert(name string, data map[string]interface{}) (int64, error)
- func (db *DB) Modify(name string, where Where, update map[string]interface{}) (int64, error)
- func (db *DB) MultiInsert(name string, data []map[string]interface{}) (int64, error)
- func (db *DB) Select(name string, where Where, fields Fields) *Fruit
- type Fields
- type Fruit
- type Options
- type Where
Constants ¶
View Source
const TagName = "sqler"
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundError ¶ added in v0.1.1
Types ¶
type DB ¶
func (*DB) MultiInsert ¶ added in v0.1.1
type Fruit ¶ added in v0.1.1
type Fruit struct {
// contains filtered or unexported fields
}
func (*Fruit) ConvertToMap ¶ added in v0.1.1
type Options ¶
type Options struct { Driver string `yaml:"driver" mapstructure:"driver"` ConnStr string `yaml:"dsn" mapstructure:"dsn"` // 定时保活 KeepAlive int `yaml:"keep_alive" mapstructure:"keep_alive"` // 最大可空闲连接数量 MaxIdles int `yaml:"max_idles" mapstructure:"max_idles"` // 最大连接数量 MaxOpens int `yaml:"max_opens" mapstructure:"max_opens"` MaxLifeTime int `yaml:"max_life_time" mapstructure:"max_life_time"` }
Click to show internal directories.
Click to hide internal directories.