xyrgodbctl

package module
v0.0.0-...-2146801 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 11 Imported by: 0

README

xyr_go_dbctl

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDbCtl

func NewDbCtl(dbType, dsn string) (iface.DbCtl, error)

func NewDbCtlWhitCache

func NewDbCtlWhitCache(dbType, dsn string, redisAddr, redisPassword string, redisDB int) (iface.DbCtl, error)

Types

type DbCtl

type DbCtl struct {
	// contains filtered or unexported fields
}

func (*DbCtl) AddRecord

func (d *DbCtl) AddRecord(inf interface{}) error

func (*DbCtl) AddRecordWithPKey

func (d *DbCtl) AddRecordWithPKey(inf interface{}) error

func (*DbCtl) CheckRecord

func (d *DbCtl) CheckRecord(inf interface{}) bool

CheckRecord 根据主键查询,如果主键存在的话

func (*DbCtl) ConditionalQuery

func (d *DbCtl) ConditionalQuery(inf interface{}, conditional ...interface{}) error

func (*DbCtl) CreateTable

func (d *DbCtl) CreateTable(inf interface{}) error

func (*DbCtl) GetAllRecords

func (d *DbCtl) GetAllRecords(inf interface{}) error

func (*DbCtl) GetAllRecordsCount

func (d *DbCtl) GetAllRecordsCount(inf interface{}) int64

func (*DbCtl) GetLastRecord

func (d *DbCtl) GetLastRecord(inf interface{}) error

func (*DbCtl) GetRandomRecords

func (d *DbCtl) GetRandomRecords(inf interface{}, amount int) error

func (*DbCtl) RemoveRecord

func (d *DbCtl) RemoveRecord(inf interface{}) error

func (*DbCtl) UpdateRecord

func (d *DbCtl) UpdateRecord(inf interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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