Documentation ¶
Index ¶
- func NewFromConfig(cfg RedisConfig) (*redis.Client, error)
- func NewRedis(host, port, usr, pwd, database string) (storage.DI, error)
- type Redis
- func (r *Redis) AddColumn(tableName string, column *storage.Column) error
- func (r *Redis) Close()
- func (r *Redis) CreateTable(sql string) error
- func (r *Redis) DelByCondition(cName string, delselector interface{}) error
- func (r *Redis) DropColumn(tableName, field string) error
- func (r *Redis) DropTable(tableName string) error
- func (r *Redis) ExecSql(cmd interface{}) error
- func (r *Redis) GetCntByCondition(cName string, selector interface{}) (cnt int, err error)
- func (m *Redis) GetDBName() string
- func (m *Redis) GetIncID(cName string) (int64, error)
- func (r *Redis) GetMutilByCondition(cName string, fields []string, selector, results interface{}, sort string, ...) error
- func (r *Redis) GetOneByCondition(cName string, fields []string, selector, results interface{}) error
- func (r *Redis) GetSession() interface{}
- func (r *Redis) GetType() string
- func (r *Redis) HasFields(tableName, field string) (bool, error)
- func (r *Redis) HasTable(tableName string) (bool, error)
- func (r *Redis) Index(tableName string, index *storage.Index) error
- func (r *Redis) Insert(cName string, data interface{}) (int, error)
- func (r *Redis) InsertMuti(cName string, data ...interface{}) error
- func (r *Redis) IsDuplicateErr(err error) bool
- func (r *Redis) IsNotFoundErr(err error) bool
- func (r *Redis) ModifyColumn(tableName, oldName, newColumn string) error
- func (r *Redis) Open() error
- func (m *Redis) Ping() error
- func (r *Redis) UpdateByCondition(cName string, oldobj, newobj interface{}) error
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFromConfig ¶
func NewFromConfig(cfg RedisConfig) (*redis.Client, error)
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) CreateTable ¶
func (*Redis) DelByCondition ¶
func (*Redis) DropColumn ¶
func (*Redis) GetCntByCondition ¶
func (*Redis) GetMutilByCondition ¶
func (*Redis) GetOneByCondition ¶
func (*Redis) InsertMuti ¶
func (*Redis) IsDuplicateErr ¶
IsDuplicateErr returns whether err is duplicate error
func (*Redis) IsNotFoundErr ¶
IsNotFoundErr returns whether err is not found error
func (*Redis) ModifyColumn ¶
func (*Redis) UpdateByCondition ¶
Click to show internal directories.
Click to hide internal directories.