Documentation ¶
Overview ¶
============================================================ 描述: 作者: Simon 日期: 2019/10/25 12:04 下午
============================================================
Index ¶
- Constants
- func GetSqlStruct(bean interface{}) (*sqlStruct, error)
- type DBStoreConf
- type MSStore
- func (ms *MSStore) Insert(tx *sql.Tx, bean interface{}) error
- func (ms *MSStore) Insertx(tx *sql.Tx, beans ...interface{}) error
- func (ms *MSStore) QueryPageWithOffset(dest interface{}, query string, page, size int, args ...interface{}) (*rs.PageData, error)
- func (ms *MSStore) Update(tx *sql.Tx, bean interface{}) error
- func (ms *MSStore) Updatex(tx *sql.Tx, beans ...interface{}) error
- type MyStore
- func (m *MyStore) BeginTx() (*sql.Tx, error)
- func (m *MyStore) Commit(tx *sql.Tx) error
- func (m *MyStore) Exec(query string, args ...interface{}) (sql.Result, error)
- func (m *MyStore) ExecTx(tx *sql.Tx, query string, args ...interface{}) (sql.Result, error)
- func (m *MyStore) Get(dest interface{}, sql string, args ...interface{}) error
- func (m *MyStore) Insert(bean interface{}) error
- func (m *MyStore) InsertTx(tx *sql.Tx, bean interface{}) error
- func (m *MyStore) Insertx(bean ...interface{}) error
- func (m *MyStore) Query(dest interface{}, sql string, args ...interface{}) error
- func (m *MyStore) QueryPage(dest interface{}, query string, page, size int, args ...interface{}) (*rs.PageData, error)
- func (m *MyStore) RollBack(tx *sql.Tx) error
- func (m *MyStore) Update(bean interface{}) error
- func (m *MyStore) UpdateTx(tx *sql.Tx, bean interface{}) error
- func (m *MyStore) Updatex(bean ...interface{}) error
- type PageData
- type RedisConf
- type RedisStore
- func (r *RedisStore) Del(key string) error
- func (r *RedisStore) Expire(key string, t time.Duration) error
- func (r *RedisStore) GetValue(key string, value interface{}) error
- func (r *RedisStore) SetValue(key string, value interface{}) error
- func (r *RedisStore) SetValueWithTimeout(key string, value interface{}, t time.Duration) error
- type Table
Constants ¶
View Source
const (
MysqlDialect = "mysql"
)
Variables ¶
This section is empty.
Functions ¶
func GetSqlStruct ¶
func GetSqlStruct(bean interface{}) (*sqlStruct, error)
Types ¶
type DBStoreConf ¶
type DBStoreConf struct { IP string `json:"ip" yaml:"ip"` Port string `json:"port" yaml:"port"` User string `json:"user" yaml:"user"` Password string `json:"password" yaml:"password"` DBName string `json:"dbName" yaml:"dbName"` Idle int `json:"idle" yaml:"idle"` Active int `json:"active" yaml:"active"` }
type MSStore ¶
MSStore sql server Store
func NewMSStore ¶
func NewMSStore(conf *DBStoreConf) *MSStore
func (*MSStore) QueryPageWithOffset ¶
type MyStore ¶
type MyStore struct {
// contains filtered or unexported fields
}
func NewMyStore ¶
func NewMyStore(conf *DBStoreConf) *MyStore
type RedisStore ¶
RedisStorage redis 操作类
func (*RedisStore) Expire ¶
func (r *RedisStore) Expire(key string, t time.Duration) error
Expire 设置过期时间
func (*RedisStore) GetValue ¶
func (r *RedisStore) GetValue(key string, value interface{}) error
GetValue 获取值
func (*RedisStore) SetValue ¶
func (r *RedisStore) SetValue(key string, value interface{}) error
SetValue 设置值
func (*RedisStore) SetValueWithTimeout ¶
func (r *RedisStore) SetValueWithTimeout(key string, value interface{}, t time.Duration) error
Click to show internal directories.
Click to hide internal directories.