executor

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 1 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
}

func NewConfig added in v1.3.0

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

type Executor

type Executor interface {
	Release()
	BeginTransaction() error
	CommitTransaction() error
	RollbackTransaction() error
	Query(sql string) error
	Next() bool
	Finish()
	GetField(value ...interface{}) error
	Execute(sql string) (rowsAffected int64, lastInsertID int64, err error)
	CheckTableExist(tableName string) (bool, error)
}

Executor 数据库访问对象

func NewExecutor added in v1.3.0

func NewExecutor(config Config) (Executor, error)

type Pool

type Pool interface {
	Initialize(maxConnNum int, config Config) error
	Uninitialized()
	GetExecutor() (Executor, error)
	CheckConfig(config Config) error
}

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