Documentation
¶
Index ¶
- Constants
- Variables
- func Deregister(name string)
- func NewBuilder() container.StandardBuilder
- func NewError(err error, execSql string, args []interface{}) error
- func NewPanicError(err error, strace string) error
- func Register(resolver Resover)
- func RegistryLogger(logger Logger)
- type DbError
- type Executer
- type IDB
- type ITrans
- type Logger
- type PanicError
- type RawMessage
- type Resover
- type Result
- type Row
- type Rows
- type StandardDB
- type TransactionCallback
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 NewPanicError ¶ added in v0.2.0
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 IDB ¶
type IDB interface { Executer Begin() (ITrans, error) Close() error GetImpl() interface{} Transaction(TransactionCallback) error }
IDB 数据库操作接口
type PanicError ¶ added in v0.2.0
type RawMessage ¶ added in v0.1.41
type RawMessage []byte
func (RawMessage) MarshalJSON ¶ added in v0.1.41
func (m RawMessage) MarshalJSON() ([]byte, error)
MarshalJSON returns m as the JSON encoding of m.
func (*RawMessage) UnmarshalJSON ¶ added in v0.1.41
func (m *RawMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON sets *m to a copy of data.
type StandardDB ¶
StandardDB
func NewStandardDB ¶
func NewStandardDB(container container.Container) StandardDB
NewStandardDBs 创建DB
type TransactionCallback ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.