lxmysqlv2

package
v0.0.0-...-725fb5b Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PREFIX = "lxmysqlv2::"

Variables

This section is empty.

Functions

func DeleteCache

func DeleteCache(qc QueryCacheConfig) (err error)

func Query

func Query(result interface{}, config QueryConfig) (err error)

Query 查询列表

Types

type QueryCacheConfig

type QueryCacheConfig struct {
	DB        string //数据库缓存 Redis数据库索引
	Name      string //缓存的名字
	IndexName string //REDIS 数据库索引
	Exexpire  int    //缓存过期时间 -1不使用缓存
}

type QueryConfig

type QueryConfig struct {
	SQL   string //sql
	UseDB string //指定数据库
	Cache QueryCacheConfig
	Orm   orm.Ormer //实例化 ORM
}

Jump to

Keyboard shortcuts

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