Documentation
¶
Index ¶
- Constants
- Variables
- func Deregister(name string)
- func NewBuilder() container.StandardBuilder
- func NewError(err error, sql string, args []interface{}) error
- func Register(resolver Resover)
- func RegistryLogger(logger Logger)
- type DbError
- type Executer
- type IDB
- type ITrans
- type Logger
- type Resover
- type Result
- type Row
- type Rows
- type StandardDB
Constants ¶
View Source
const DbTypeNode = "dbs"
Variables ¶
View Source
var (
DateFormat = "2006-01-02 15:04:05"
)
Functions ¶
func NewBuilder ¶
func NewBuilder() container.StandardBuilder
func RegistryLogger ¶ added in v0.1.31
func RegistryLogger(logger Logger)
Types ¶
type Executer ¶
type Executer interface { Query(ctx context.Context, sql string, input map[string]interface{}) (data Rows, err error) Multi(ctx context.Context, sql string, input map[string]interface{}) (data []Rows, err error) First(ctx context.Context, sql string, input map[string]interface{}) (data Row, err error) Scalar(ctx context.Context, sql string, input map[string]interface{}) (data interface{}, err error) Exec(ctx context.Context, sql string, input map[string]interface{}) (r Result, err error) }
Executer 数据库操作对象集合
type StandardDB ¶
StandardDB
func NewStandardDB ¶
func NewStandardDB(container container.Container) StandardDB
NewStandardDBs 创建DB
Click to show internal directories.
Click to hide internal directories.