db

package
v0.0.0-...-ae84a6d Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsyncDelCacheBean

func AsyncDelCacheBean(tableName string, v interface{})

func Begin

func Begin(ctx ...context.Context) (*xorm.Session, error)

func ClearBeans

func ClearBeans(tablename string)

func ClearCache

func ClearCache(tablename string)

func ClearIds

func ClearIds(tablename string)

func DefaultCoder

func DefaultCoder() *xormcache.BinaryCoder

func DelCacheBean

func DelCacheBean(tableName string, v interface{})

func DeleteCache

func DeleteCache(tableName string, pk ...interface{}) error

func Engine

func Engine() *xorm.EngineGroup

func Init

func Init(cnf *cnf.DB)

Init Initialize the database

func Master

func Master() *xorm.Engine

func Session

func Session(ctx ...context.Context) *xorm.Session

func Slave

func Slave() *xorm.Engine

Types

type ModtimeProxy

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

func DefaultModtimeProxy

func DefaultModtimeProxy() *ModtimeProxy

func (*ModtimeProxy) LastModified

func (m *ModtimeProxy) LastModified(ctx context.Context, id int32) (modtime time.Time)

func (*ModtimeProxy) ResetCache

func (m *ModtimeProxy) ResetCache(id int32)

func (*ModtimeProxy) SetLastModified

func (m *ModtimeProxy) SetLastModified(id int32, modtime time.Time) (int64, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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