Documentation
¶
Index ¶
- type Client
- type Config
- type Database
- type Executor
- type GlobalTransaction
- type Options
- type QueryAble
- type Tuple
- func (t *Tuple) Append(values ...interface{}) *Tuple
- func (t *Tuple) MapToSQLArgs() (args []interface{})
- func (t Tuple) MarshalJSON() (p []byte, err error)
- func (t *Tuple) Merge(v *Tuple) *Tuple
- func (t *Tuple) Size() (n int)
- func (t Tuple) String() (s string)
- func (t *Tuple) UnmarshalJSON(p []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Driver string `json:"driver"`
MasterSlaverMode bool `json:"masterSlaverMode"`
DSN []string `json:"dsn"`
MaxIdles int `json:"maxIdles"`
MaxOpens int `json:"maxOpens"`
EnableDebugLog bool `json:"enableDebugLog"`
GTMCleanUpSecond int `json:"gtmCleanUpSecond"`
Isolation int `json:"isolation"`
}
type Database ¶
type Database interface {
BeginTransaction(ctx context.Context) (err errors.CodeError)
CommitTransaction(ctx context.Context) (finished bool, err errors.CodeError)
RollbackTransaction(ctx context.Context) (err errors.CodeError)
Query(ctx context.Context, query string, args []interface{}) (rows *sql.Rows, err errors.CodeError)
Execute(ctx context.Context, query string, args []interface{}) (result sql.Result, err errors.CodeError)
Close()
}
type GlobalTransaction ¶
type GlobalTransaction struct {
// contains filtered or unexported fields
}
type Tuple ¶
type Tuple struct {
// contains filtered or unexported fields
}
func (*Tuple) MapToSQLArgs ¶
func (t *Tuple) MapToSQLArgs() (args []interface{})
func (Tuple) MarshalJSON ¶
func (*Tuple) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.