dbservice

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package dbservice @Title 数据库服务 @Description 数据库服务 @Author yr 2024/7/25 下午3:10 @Update yr 2024/7/25 下午3:10

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback func(rdb *redis.Client, mdb *gorm.DB, args ...interface{}) (interface{}, error)

type DBService

type DBService struct {
	core.Service
	// contains filtered or unexported fields
}

func (*DBService) APIExecuteMixedFun

func (db *DBService) APIExecuteMixedFun(f Callback, args ...interface{}) (interface{}, error)

APIExecuteMixedFun 执行混合函数

func (*DBService) APIExecuteMysqlFun

func (db *DBService) APIExecuteMysqlFun(f mysqlmodule.Callback, args ...interface{}) (interface{}, error)

APIExecuteMysqlFun 执行mysql函数

func (*DBService) APIExecuteMysqlTransaction

func (db *DBService) APIExecuteMysqlTransaction(funcList ...mysqlmodule.TransactionCallback) error

APIExecuteMysqlTransaction 执行mysql事务

func (*DBService) APIExecuteRedisFun

func (db *DBService) APIExecuteRedisFun(f redismodule.Callback, args ...interface{}) (interface{}, error)

APIExecuteRedisFun 执行redis函数

func (*DBService) APIGetRedisString

func (db *DBService) APIGetRedisString(key string) (string, error)

func (*DBService) APIGetRedisStringJson

func (db *DBService) APIGetRedisStringJson(key string, value interface{}) error

func (*DBService) APISetRedisString

func (db *DBService) APISetRedisString(key string, value interface{}, expire time.Duration) error

func (*DBService) APISetRedisStringJson

func (db *DBService) APISetRedisStringJson(key string, value interface{}, expire time.Duration) error

func (*DBService) OnInit

func (db *DBService) OnInit() error

func (*DBService) OnRelease

func (db *DBService) OnRelease()

func (*DBService) OnStart

func (db *DBService) OnStart() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL