Documentation ¶
Index ¶
- func PlanOutOfRange(err error) bool
- func Warning(row Row) (warning error, err error)
- type CardinalityInfo
- type Comparable
- type Executor
- type ExecutorImpl
- func (e *ExecutorImpl) Dsn() string
- func (e *ExecutorImpl) Exec(query string) (result Result, err error)
- func (e *ExecutorImpl) Explain(query string) (rows Rows, warnings []error, err error)
- func (e *ExecutorImpl) ExplainAnalyze(query string) (rows Rows, warnings []error, err error)
- func (e *ExecutorImpl) GetHints(query string) (hints Hints, err error)
- func (e *ExecutorImpl) Query(query string) (rows Rows, err error)
- func (e *ExecutorImpl) QueryStream(query string) (stream RowStream, err error)
- type ExplainAnalyzeInfo
- type Hints
- type Pool
- type PoolImpl
- type PoolOptions
- type QueryMode
- type RawExecutor
- type RawTransaction
- type Result
- type Row
- type RowStream
- type Rows
- type Transaction
- type TransactionImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlanOutOfRange ¶
Types ¶
type CardinalityInfo ¶
type CardinalityInfo struct { *ExplainAnalyzeInfo QError float64 }
func CollectEstAndActRows ¶
func CollectEstAndActRows(ei *ExplainAnalyzeInfo) []*CardinalityInfo
type Comparable ¶
type Comparable interface { fmt.Stringer Equal(other Comparable) bool }
type ExecutorImpl ¶
type ExecutorImpl struct {
// contains filtered or unexported fields
}
func (*ExecutorImpl) Dsn ¶ added in v1.0.0
func (e *ExecutorImpl) Dsn() string
func (*ExecutorImpl) Explain ¶
func (e *ExecutorImpl) Explain(query string) (rows Rows, warnings []error, err error)
func (*ExecutorImpl) ExplainAnalyze ¶
func (e *ExecutorImpl) ExplainAnalyze(query string) (rows Rows, warnings []error, err error)
func (*ExecutorImpl) GetHints ¶
func (e *ExecutorImpl) GetHints(query string) (hints Hints, err error)
/ GetHints would query plan out of range warnings
func (*ExecutorImpl) QueryStream ¶
func (e *ExecutorImpl) QueryStream(query string) (stream RowStream, err error)
type ExplainAnalyzeInfo ¶
type ExplainAnalyzeInfo struct { Op string EstRows float64 ActRows float64 OpInfo string Items []*ExplainAnalyzeInfo // contains filtered or unexported fields }
func NewExplainAnalyzeInfo ¶
func NewExplainAnalyzeInfo(data Rows) *ExplainAnalyzeInfo
type Pool ¶
type Pool interface { Dsn() string Executor() Executor Transaction() (Transaction, error) }
type PoolImpl ¶
type PoolImpl struct {
// contains filtered or unexported fields
}
func (*PoolImpl) Transaction ¶
func (p *PoolImpl) Transaction() (Transaction, error)
type PoolOptions ¶
type RawExecutor ¶
type RawTransaction ¶
type RawTransaction interface { RawExecutor Commit() error Rollback() error }
type Result ¶
type Result struct {
LastInsertId, RowsAffected int64
}
func (Result) Equal ¶
func (r Result) Equal(other Comparable) bool
type RowStream ¶
type Transaction ¶
type TransactionImpl ¶
type TransactionImpl struct { ExecutorImpl // contains filtered or unexported fields }
func (*TransactionImpl) Commit ¶
func (t *TransactionImpl) Commit() error
func (*TransactionImpl) Rollback ¶
func (t *TransactionImpl) Rollback() error
Click to show internal directories.
Click to hide internal directories.