sqlconnect

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Connection         string
	DbUrl              string
	DbPath             string
	MaxIdleConnections int
	MaxOpenConnections int
	MaxLifeSeconds     int
}

type Connect

type Connect struct {
	Config  Config
	Connect *gorm.DB
	Error   error
	Init    bool
}

func GetConnect

func GetConnect(config Config) Connect

GetConnect 初始化模型

func GetConnectByPreferences

func GetConnectByPreferences(preferences preferences.ExclusivePreferences) Connect

func (*Connect) BackupSQLiteHandle

func (itself *Connect) BackupSQLiteHandle()

func (*Connect) Close

func (itself *Connect) Close()

func (*Connect) GenerateBackupPath

func (itself *Connect) GenerateBackupPath(backupDir string) string

func (*Connect) IsSqlite

func (itself *Connect) IsSqlite() bool

Jump to

Keyboard shortcuts

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