Documentation ¶
Index ¶
- func ConnectMySQL() (err error)
- func ConnectRedis() (err error)
- func GetMySQL() *gorm.DB
- func GetRedis() *redis.Client
- type Repository
- func (Repository *Repository) ConditionUpdate(column string, value interface{}, query interface{}, args ...interface{}) *gorm.DB
- func (Repository *Repository) Delete(value interface{}, conditions ...interface{}) *gorm.DB
- func (Repository *Repository) Find(dest interface{}, conditions ...interface{}) *gorm.DB
- func (Repository *Repository) First(dest interface{}, conditions ...interface{}) *gorm.DB
- func (Repository *Repository) ModelUpdate(model interface{}, column string, value interface{}) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectRedis ¶
func ConnectRedis() (err error)
Types ¶
type Repository ¶
type Repository struct { }
func (*Repository) ConditionUpdate ¶
func (Repository *Repository) ConditionUpdate(column string, value interface{}, query interface{}, args ...interface{}) *gorm.DB
ConditionUpdate 根据条件修改数据 */
func (*Repository) Delete ¶
func (Repository *Repository) Delete(value interface{}, conditions ...interface{}) *gorm.DB
Delete 删除数据 */
func (*Repository) Find ¶
func (Repository *Repository) Find(dest interface{}, conditions ...interface{}) *gorm.DB
Find 查询数据集合 */
func (*Repository) First ¶
func (Repository *Repository) First(dest interface{}, conditions ...interface{}) *gorm.DB
First 查询一条数据 */
func (*Repository) ModelUpdate ¶
func (Repository *Repository) ModelUpdate(model interface{}, column string, value interface{}) *gorm.DB
ModelUpdate 根据模型条件修改数据 */
Click to show internal directories.
Click to hide internal directories.