executor

package
v1.3.143 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Server() string
	Username() string
	Password() string
	Database() string
	CharSet() string
}

func NewConfig added in v1.3.0

func NewConfig(dbServer, dbName, username, password, charSet string) Config

type Executor

type Executor interface {
	Release()
	BeginTransaction() *cd.Result
	CommitTransaction() *cd.Result
	RollbackTransaction() *cd.Result
	Query(sql string, needCols bool) (ret []string, err *cd.Result)
	Next() bool
	Finish()
	GetField(value ...interface{}) *cd.Result
	Execute(sql string) (rowsAffected int64, lastInsertID int64, err *cd.Result)
	CheckTableExist(tableName string) (bool, *cd.Result)
}

Executor 数据库访问对象

func NewExecutor added in v1.3.0

func NewExecutor(config Config) (Executor, *cd.Result)

type Pool

type Pool interface {
	Initialize(maxConnNum int, config Config) *cd.Result
	Uninitialized()
	GetExecutor() (Executor, *cd.Result)
	CheckConfig(config Config) *cd.Result
	IncReference() int
	DecReference() int
}

func NewPool added in v1.3.0

func NewPool() Pool

Jump to

Keyboard shortcuts

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