Documentation ¶
Index ¶
- type Configuration
- func (c *Configuration) Build() interface{}
- func (c *Configuration) Configer() internal.Configer
- func (c *Configuration) Dsn() string
- func (c *Configuration) Logger() facade_logger.Logger
- func (c *Configuration) NowFunc() func() time.Time
- func (c *Configuration) SetDryRun(dryRun bool) error
- func (c *Configuration) SetDsn(dsn string) error
- func (c *Configuration) SetLogger(logger facade_logger.Logger) error
- func (c *Configuration) SetNowFunc(nowFunc func() time.Time) error
- func (c *Configuration) SetSlowSqlThreshold(threshold time.Duration) error
- func (c *Configuration) SlowSqlThreshold() (threshold time.Duration)
- type Connection
- type Database
- type Log
- func (l *Log) Error(ctx context.Context, s string, i ...interface{})
- func (l *Log) Info(ctx context.Context, s string, i ...interface{})
- func (l *Log) LogMode(level logger.LogLevel) logger.Interface
- func (l *Log) SlowThreshold() time.Duration
- func (l *Log) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *Log) Warn(ctx context.Context, s string, i ...interface{})
- type Query
- func (q *Query) Delete(query string, bindings ...interface{}) (affectedRows int64, err error)
- func (q *Query) Fork(clientPtr interface{}) facade.Queryer
- func (q *Query) Insert(query string, bindings ...interface{}) (lastInsertId int64, err error)
- func (q *Query) Pretend(callbackFunc func(db facade.Queryer) interface{}) (callbackReturn interface{})
- func (q *Query) Raw(query string, bindings ...interface{}) facade.Scanner
- func (q *Query) Select(query string, bindings ...interface{}) facade.Scanner
- func (q *Query) SelectOne(query string, bindings ...interface{}) facade.OneScanner
- func (q *Query) SetConnector(connector internal.Connector)
- func (q *Query) SetLogger(logger facade_logger.Logger) error
- func (q *Query) Statement(query string, bindings ...interface{}) (affectedRows int64, err error)
- func (q *Query) Transaction(transactionFunc func(tx facade.Queryer) error, attempts uint)
- func (q *Query) TransactionBegin() facade.Queryer
- func (q *Query) TransactionCommit() error
- func (q *Query) TransactionRollBack() error
- func (q *Query) Unprepared(query string) facade.Scanner
- func (q *Query) Update(query string, bindings ...interface{}) (affectedRows int64, err error)
- type Scan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func (*Configuration) Build ¶
func (c *Configuration) Build() interface{}
func (*Configuration) Configer ¶
func (c *Configuration) Configer() internal.Configer
func (*Configuration) Dsn ¶
func (c *Configuration) Dsn() string
func (*Configuration) Logger ¶
func (c *Configuration) Logger() facade_logger.Logger
func (*Configuration) NowFunc ¶
func (c *Configuration) NowFunc() func() time.Time
func (*Configuration) SetDryRun ¶
func (c *Configuration) SetDryRun(dryRun bool) error
func (*Configuration) SetDsn ¶
func (c *Configuration) SetDsn(dsn string) error
func (*Configuration) SetLogger ¶
func (c *Configuration) SetLogger(logger facade_logger.Logger) error
func (*Configuration) SetNowFunc ¶
func (c *Configuration) SetNowFunc(nowFunc func() time.Time) error
func (*Configuration) SetSlowSqlThreshold ¶
func (c *Configuration) SetSlowSqlThreshold(threshold time.Duration) error
func (*Configuration) SlowSqlThreshold ¶
func (c *Configuration) SlowSqlThreshold() (threshold time.Duration)
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Client ¶
func (c *Connection) Client() interface{}
func (*Connection) Connect ¶
func (c *Connection) Connect() error
func (*Connection) Connector ¶
func (c *Connection) Connector() internal.Connector
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect() error
func (*Connection) SetConfiger ¶
func (c *Connection) SetConfiger(configer internal.Configer)
type Database ¶
type Database struct { Connection Query }
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func (*Log) SlowThreshold ¶
type Query ¶
type Query struct { common.QueryPrepareBindings common.TransactionExceptionHandler // contains filtered or unexported fields }
func (*Query) SelectOne ¶
func (q *Query) SelectOne(query string, bindings ...interface{}) facade.OneScanner
func (*Query) SetConnector ¶
func (*Query) Transaction ¶
func (*Query) TransactionBegin ¶
func (*Query) TransactionCommit ¶
func (*Query) TransactionRollBack ¶
Click to show internal directories.
Click to hide internal directories.