dbutils

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HasFreeSpace = true
View Source
var IsLocalDatabase = false
View Source
var LocalDatabaseDataDir = ""

Functions

func CheckHasFreeSpace added in v0.5.6

func CheckHasFreeSpace() bool

CheckHasFreeSpace 检查当前数据库是否有剩余空间

func FindMySQLPath added in v1.2.1

func FindMySQLPath() string

FindMySQLPath find out mysqld_safe path from system processes

func FindMySQLPathAndRemember added in v1.2.1

func FindMySQLPathAndRemember()

FindMySQLPathAndRemember find out mysqld_safe path then remember it for future usage

func IsLocalAddr added in v0.5.6

func IsLocalAddr(addr string) bool

IsLocalAddr 是否为本地数据库

func MySQLVersion added in v1.0.0

func MySQLVersion() (version string, err error)

MySQLVersion 读取当前MySQL版本

func MySQLVersionFrom8 added in v1.0.0

func MySQLVersionFrom8() (bool, error)

func NewQuery

func NewQuery(tx *dbs.Tx, dao dbs.DAOWrapper, adminId int64, userId int64) *dbs.Query

NewQuery 构造Query

func QuoteLike

func QuoteLike(keyword string) string

func QuoteLikeKeyword

func QuoteLikeKeyword(keyword string) string

QuoteLikeKeyword 处理关键词中的特殊字符

func QuoteLikePrefix

func QuoteLikePrefix(keyword string) string

func QuoteLikeSuffix

func QuoteLikeSuffix(keyword string) string

func SetGlobalVarMax added in v0.5.3

func SetGlobalVarMax(db *dbs.DB, variableName string, maxValue int) error

SetGlobalVarMax 设置变量最大值

func SetGlobalVarMin added in v0.5.3

func SetGlobalVarMin(db *dbs.DB, variableName string, minValue int) error

SetGlobalVarMin 设置变量最小值

func StartLocalMySQL added in v1.2.1

func StartLocalMySQL()

StartLocalMySQL try to start local mysql server

Types

This section is empty.

Jump to

Keyboard shortcuts

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