Documentation ¶
Index ¶
- Constants
- Variables
- type BackendConn
- type BackendConnManager
- func (f *BackendConnManager) Begin(ctx context.Context) error
- func (f *BackendConnManager) Close() error
- func (f *BackendConnManager) CommitOrRollback(ctx context.Context, commit bool) error
- func (f *BackendConnManager) MergeStatus(svw *SessionVarsWrapper)
- func (f *BackendConnManager) Query(ctx context.Context, db, sql string) (*gomysql.Result, error)
- func (f *BackendConnManager) SetAutoCommit(ctx context.Context, autocommit bool) error
- func (f *BackendConnManager) StmtClose(ctx context.Context, stmtId int) error
- func (f *BackendConnManager) StmtExecuteForward(ctx context.Context, stmtId int, data []byte) (*gomysql.Result, error)
- func (f *BackendConnManager) StmtPrepare(ctx context.Context, db, sql string) (Stmt, error)
- type Breaker
- type DriverImpl
- type FSM
- type FSMEvent
- type FSMHandler
- type FSMHandlerFunc
- type FSMHandlerWrapper
- type FSMState
- type FSMStmtPrepareHandlerFunc
- type MockBackendConn
- func (_m *MockBackendConn) Begin() error
- func (_m *MockBackendConn) Commit() error
- func (_m *MockBackendConn) Execute(command string, args ...interface{}) (*mysql.Result, error)
- func (_m *MockBackendConn) FieldList(table string, wildcard string) ([]*mysql.Field, error)
- func (_m *MockBackendConn) GetCharset() string
- func (_m *MockBackendConn) GetConnectionID() uint32
- func (_m *MockBackendConn) GetDB() string
- func (_m *MockBackendConn) GetStatus() uint16
- func (_m *MockBackendConn) IsAutoCommit() bool
- func (_m *MockBackendConn) IsInTransaction() bool
- func (_m *MockBackendConn) Ping() error
- func (_m *MockBackendConn) Rollback() error
- func (_m *MockBackendConn) SetAutoCommit(_a0 bool) error
- func (_m *MockBackendConn) SetCharset(charset string) error
- func (_m *MockBackendConn) StmtClosePrepare(stmtId int) error
- func (_m *MockBackendConn) StmtExecuteForward(data []byte) (*mysql.Result, error)
- func (_m *MockBackendConn) StmtPrepare(sql string) (Stmt, error)
- func (_m *MockBackendConn) UseDB(dbName string) error
- type MockNamespace
- type MockNamespaceManager
- type MockPooledBackendConn
- func (_m *MockPooledBackendConn) Begin() error
- func (_m *MockPooledBackendConn) Commit() error
- func (_m *MockPooledBackendConn) ErrorClose() error
- func (_m *MockPooledBackendConn) Execute(command string, args ...interface{}) (*mysql.Result, error)
- func (_m *MockPooledBackendConn) FieldList(table string, wildcard string) ([]*mysql.Field, error)
- func (_m *MockPooledBackendConn) GetCharset() string
- func (_m *MockPooledBackendConn) GetConnectionID() uint32
- func (_m *MockPooledBackendConn) GetDB() string
- func (_m *MockPooledBackendConn) GetStatus() uint16
- func (_m *MockPooledBackendConn) IsAutoCommit() bool
- func (_m *MockPooledBackendConn) IsInTransaction() bool
- func (_m *MockPooledBackendConn) Ping() error
- func (_m *MockPooledBackendConn) PutBack()
- func (_m *MockPooledBackendConn) Rollback() error
- func (_m *MockPooledBackendConn) SetAutoCommit(_a0 bool) error
- func (_m *MockPooledBackendConn) SetCharset(charset string) error
- func (_m *MockPooledBackendConn) StmtClosePrepare(stmtId int) error
- func (_m *MockPooledBackendConn) StmtExecuteForward(data []byte) (*mysql.Result, error)
- func (_m *MockPooledBackendConn) StmtPrepare(sql string) (Stmt, error)
- func (_m *MockPooledBackendConn) UseDB(dbName string) error
- type MockSimpleBackendConn
- func (_m *MockSimpleBackendConn) Begin() error
- func (_m *MockSimpleBackendConn) Close() error
- func (_m *MockSimpleBackendConn) Commit() error
- func (_m *MockSimpleBackendConn) Execute(command string, args ...interface{}) (*mysql.Result, error)
- func (_m *MockSimpleBackendConn) FieldList(table string, wildcard string) ([]*mysql.Field, error)
- func (_m *MockSimpleBackendConn) GetCharset() string
- func (_m *MockSimpleBackendConn) GetConnectionID() uint32
- func (_m *MockSimpleBackendConn) GetDB() string
- func (_m *MockSimpleBackendConn) GetStatus() uint16
- func (_m *MockSimpleBackendConn) IsAutoCommit() bool
- func (_m *MockSimpleBackendConn) IsInTransaction() bool
- func (_m *MockSimpleBackendConn) Ping() error
- func (_m *MockSimpleBackendConn) Rollback() error
- func (_m *MockSimpleBackendConn) SetAutoCommit(_a0 bool) error
- func (_m *MockSimpleBackendConn) SetCharset(charset string) error
- func (_m *MockSimpleBackendConn) StmtClosePrepare(stmtId int) error
- func (_m *MockSimpleBackendConn) StmtExecuteForward(data []byte) (*mysql.Result, error)
- func (_m *MockSimpleBackendConn) StmtPrepare(sql string) (Stmt, error)
- func (_m *MockSimpleBackendConn) UseDB(dbName string) error
- type MockStmt
- type Namespace
- type NamespaceManager
- type PooledBackendConn
- type QueryCtxImpl
- func (q *QueryCtxImpl) AffectedRows() uint64
- func (q *QueryCtxImpl) Auth(user *auth.UserIdentity, pwd []byte, salt []byte) bool
- func (q *QueryCtxImpl) Close() error
- func (*QueryCtxImpl) CommitTxn(ctx context.Context) error
- func (q *QueryCtxImpl) CurrentDB() string
- func (q *QueryCtxImpl) Execute(ctx context.Context, sql string) (*gomysql.Result, error)
- func (*QueryCtxImpl) ExecuteInternal(ctx context.Context, sql string) ([]server.ResultSet, error)
- func (q *QueryCtxImpl) FieldList(tableName string) ([]*server.ColumnInfo, error)
- func (q *QueryCtxImpl) GetSessionVars() *variable.SessionVars
- func (q *QueryCtxImpl) LastInsertID() uint64
- func (q *QueryCtxImpl) LastMessage() string
- func (q *QueryCtxImpl) Prepare(ctx context.Context, sql string) (stmtId int, columns, params []*server.ColumnInfo, err error)
- func (*QueryCtxImpl) RollbackTxn()
- func (q *QueryCtxImpl) SetClientCapability(capability uint32)
- func (q *QueryCtxImpl) SetCommandValue(command byte)
- func (*QueryCtxImpl) SetProcessInfo(sql string, t time.Time, command byte, maxExecutionTime uint64)
- func (*QueryCtxImpl) SetSessionManager(util.SessionManager)
- func (*QueryCtxImpl) SetValue(key fmt.Stringer, value interface{})
- func (*QueryCtxImpl) ShowProcess() *util.ProcessInfo
- func (q *QueryCtxImpl) Status() uint16
- func (q *QueryCtxImpl) StmtClose(ctx context.Context, stmtId int) error
- func (q *QueryCtxImpl) StmtExecuteForward(ctx context.Context, stmtId int, data []byte) (*gomysql.Result, error)
- func (*QueryCtxImpl) Value(key fmt.Stringer) interface{}
- func (*QueryCtxImpl) WarningCount() uint16
- type RateLimiter
- type SessionVarsWrapper
- func (s *SessionVarsWrapper) AffectedRows() uint64
- func (s *SessionVarsWrapper) CheckSessionSysVarValid(name string) error
- func (s *SessionVarsWrapper) GetAllSystemVars() map[string]*ast.VariableAssignment
- func (s *SessionVarsWrapper) GetCharsetInfo() (charset, collation string)
- func (s *SessionVarsWrapper) GetClientCapability() uint32
- func (s *SessionVarsWrapper) GetMessage() string
- func (s *SessionVarsWrapper) GetStatusFlag(flag uint16) bool
- func (s *SessionVarsWrapper) LastInsertID() uint64
- func (s *SessionVarsWrapper) SessionVars() *variable.SessionVars
- func (s *SessionVarsWrapper) SetAffectRows(count uint64)
- func (s *SessionVarsWrapper) SetClientCapability(capability uint32)
- func (s *SessionVarsWrapper) SetCommandValue(command byte)
- func (s *SessionVarsWrapper) SetLastInsertID(id uint64)
- func (s *SessionVarsWrapper) SetMessage(msg string)
- func (s *SessionVarsWrapper) SetStatusFlag(flag uint16, on bool)
- func (s *SessionVarsWrapper) SetSystemVarAST(name string, v *ast.VariableAssignment)
- func (s *SessionVarsWrapper) SetSystemVarDefault(name string)
- func (s *SessionVarsWrapper) Status() uint16
- type SimpleBackendConn
- type Stmt
Constants ¶
const ( FSMStateFlagInTransaction = 0x01 FSMStateFlagIsAutoCommit = 0x02 FSMStateFlagInPrepare = 0x04 )
const ( ServerStatusInTrans uint16 = 0x0001 ServerStatusAutocommit uint16 = 0x0002 ServerMoreResultsExists uint16 = 0x0008 ServerStatusNoGoodIndexUsed uint16 = 0x0010 ServerStatusNoIndexUsed uint16 = 0x0020 ServerStatusCursorExists uint16 = 0x0040 ServerStatusLastRowSend uint16 = 0x0080 ServerStatusDBDropped uint16 = 0x0100 ServerStatusNoBackslashEscaped uint16 = 0x0200 ServerStatusMetadataChanged uint16 = 0x0400 ServerStatusWasSlow uint16 = 0x0800 ServerPSOutParams uint16 = 0x1000 )
Server information.
Variables ¶
var ErrFsmActionNowAllowed = errors.New("fsm action not allowed")
Functions ¶
This section is empty.
Types ¶
type BackendConn ¶
type BackendConn interface { Ping() error UseDB(dbName string) error GetDB() string Execute(command string, args ...interface{}) (*mysql.Result, error) Begin() error Commit() error Rollback() error StmtPrepare(sql string) (Stmt, error) StmtExecuteForward(data []byte) (*mysql.Result, error) StmtClosePrepare(stmtId int) error SetCharset(charset string) error FieldList(table string, wildcard string) ([]*mysql.Field, error) SetAutoCommit(bool) error IsAutoCommit() bool IsInTransaction() bool GetCharset() string GetConnectionID() uint32 GetStatus() uint16 }
type BackendConnManager ¶
type BackendConnManager struct {
// contains filtered or unexported fields
}
func NewBackendConnManager ¶
func NewBackendConnManager(fsm *FSM, ns Namespace) *BackendConnManager
func (*BackendConnManager) Close ¶
func (f *BackendConnManager) Close() error
TODO(eastfisher): is it possible to use FSM to manage close?
func (*BackendConnManager) CommitOrRollback ¶
func (f *BackendConnManager) CommitOrRollback(ctx context.Context, commit bool) error
func (*BackendConnManager) MergeStatus ¶
func (f *BackendConnManager) MergeStatus(svw *SessionVarsWrapper)
func (*BackendConnManager) SetAutoCommit ¶
func (f *BackendConnManager) SetAutoCommit(ctx context.Context, autocommit bool) error
func (*BackendConnManager) StmtClose ¶
func (f *BackendConnManager) StmtClose(ctx context.Context, stmtId int) error
func (*BackendConnManager) StmtExecuteForward ¶
func (*BackendConnManager) StmtPrepare ¶
type Breaker ¶
type Breaker interface { IsUseBreaker() bool GetBreakerScope() string Hit(name string, idx int, isFail bool) error Status(name string) (int32, int) AddTimeWheelTask(name string, connectionID uint64, flag *int32) error RemoveTimeWheelTask(connectionID uint64) error CASHalfOpenProbeSent(name string, idx int, halfOpenProbeSent bool) bool CloseBreaker() }
type DriverImpl ¶
type DriverImpl struct {
// contains filtered or unexported fields
}
func NewDriverImpl ¶
func NewDriverImpl(nsmgr NamespaceManager) *DriverImpl
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
func (*FSM) MustRegisterHandler ¶
type FSMHandler ¶
type FSMHandler interface {
Handle(conn *BackendConnManager, ctx context.Context, args ...interface{}) (interface{}, error)
}
type FSMHandlerFunc ¶
type FSMHandlerFunc func(conn *BackendConnManager, ctx context.Context, args ...interface{}) (*mysql.Result, error)
func (FSMHandlerFunc) Handle ¶
func (f FSMHandlerFunc) Handle(conn *BackendConnManager, ctx context.Context, args ...interface{}) (interface{}, error)
type FSMHandlerWrapper ¶
type FSMHandlerWrapper struct { NewState FSMState MustChangeState bool Handler FSMHandler }
type FSMStmtPrepareHandlerFunc ¶
type FSMStmtPrepareHandlerFunc func(conn *BackendConnManager, ctx context.Context, args ...interface{}) (Stmt, error)
func (FSMStmtPrepareHandlerFunc) Handle ¶
func (f FSMStmtPrepareHandlerFunc) Handle(conn *BackendConnManager, ctx context.Context, args ...interface{}) (interface{}, error)
type MockBackendConn ¶
MockBackendConn is an autogenerated mock type for the BackendConn type
func (*MockBackendConn) Begin ¶
func (_m *MockBackendConn) Begin() error
Begin provides a mock function with given fields:
func (*MockBackendConn) Commit ¶
func (_m *MockBackendConn) Commit() error
Commit provides a mock function with given fields:
func (*MockBackendConn) Execute ¶
func (_m *MockBackendConn) Execute(command string, args ...interface{}) (*mysql.Result, error)
Execute provides a mock function with given fields: command, args
func (*MockBackendConn) FieldList ¶
FieldList provides a mock function with given fields: table, wildcard
func (*MockBackendConn) GetCharset ¶
func (_m *MockBackendConn) GetCharset() string
GetCharset provides a mock function with given fields:
func (*MockBackendConn) GetConnectionID ¶
func (_m *MockBackendConn) GetConnectionID() uint32
GetConnectionID provides a mock function with given fields:
func (*MockBackendConn) GetDB ¶
func (_m *MockBackendConn) GetDB() string
GetDB provides a mock function with given fields:
func (*MockBackendConn) GetStatus ¶
func (_m *MockBackendConn) GetStatus() uint16
GetStatus provides a mock function with given fields:
func (*MockBackendConn) IsAutoCommit ¶
func (_m *MockBackendConn) IsAutoCommit() bool
IsAutoCommit provides a mock function with given fields:
func (*MockBackendConn) IsInTransaction ¶
func (_m *MockBackendConn) IsInTransaction() bool
IsInTransaction provides a mock function with given fields:
func (*MockBackendConn) Ping ¶
func (_m *MockBackendConn) Ping() error
Ping provides a mock function with given fields:
func (*MockBackendConn) Rollback ¶
func (_m *MockBackendConn) Rollback() error
Rollback provides a mock function with given fields:
func (*MockBackendConn) SetAutoCommit ¶
func (_m *MockBackendConn) SetAutoCommit(_a0 bool) error
SetAutoCommit provides a mock function with given fields: _a0
func (*MockBackendConn) SetCharset ¶
func (_m *MockBackendConn) SetCharset(charset string) error
SetCharset provides a mock function with given fields: charset
func (*MockBackendConn) StmtClosePrepare ¶
func (_m *MockBackendConn) StmtClosePrepare(stmtId int) error
StmtClosePrepare provides a mock function with given fields: stmtId
func (*MockBackendConn) StmtExecuteForward ¶
func (_m *MockBackendConn) StmtExecuteForward(data []byte) (*mysql.Result, error)
StmtExecuteForward provides a mock function with given fields: data
func (*MockBackendConn) StmtPrepare ¶
func (_m *MockBackendConn) StmtPrepare(sql string) (Stmt, error)
StmtPrepare provides a mock function with given fields: sql
func (*MockBackendConn) UseDB ¶
func (_m *MockBackendConn) UseDB(dbName string) error
UseDB provides a mock function with given fields: dbName
type MockNamespace ¶
MockNamespace is an autogenerated mock type for the Namespace type
func (*MockNamespace) GetPooledConn ¶
func (_m *MockNamespace) GetPooledConn(_a0 context.Context) (PooledBackendConn, error)
GetPooledConn provides a mock function with given fields: _a0
func (*MockNamespace) IsDatabaseAllowed ¶
func (_m *MockNamespace) IsDatabaseAllowed(db string) bool
IsDatabaseAllowed provides a mock function with given fields: db
func (*MockNamespace) ListDatabases ¶
func (_m *MockNamespace) ListDatabases() []string
ListDatabases provides a mock function with given fields:
func (*MockNamespace) Name ¶
func (_m *MockNamespace) Name() string
Name provides a mock function with given fields:
type MockNamespaceManager ¶
MockNamespaceManager is an autogenerated mock type for the NamespaceManager type
type MockPooledBackendConn ¶
MockPooledBackendConn is an autogenerated mock type for the PooledBackendConn type
func (*MockPooledBackendConn) Begin ¶
func (_m *MockPooledBackendConn) Begin() error
Begin provides a mock function with given fields:
func (*MockPooledBackendConn) Commit ¶
func (_m *MockPooledBackendConn) Commit() error
Commit provides a mock function with given fields:
func (*MockPooledBackendConn) ErrorClose ¶
func (_m *MockPooledBackendConn) ErrorClose() error
ErrorClose provides a mock function with given fields:
func (*MockPooledBackendConn) Execute ¶
func (_m *MockPooledBackendConn) Execute(command string, args ...interface{}) (*mysql.Result, error)
Execute provides a mock function with given fields: command, args
func (*MockPooledBackendConn) FieldList ¶
FieldList provides a mock function with given fields: table, wildcard
func (*MockPooledBackendConn) GetCharset ¶
func (_m *MockPooledBackendConn) GetCharset() string
GetCharset provides a mock function with given fields:
func (*MockPooledBackendConn) GetConnectionID ¶
func (_m *MockPooledBackendConn) GetConnectionID() uint32
GetConnectionID provides a mock function with given fields:
func (*MockPooledBackendConn) GetDB ¶
func (_m *MockPooledBackendConn) GetDB() string
GetDB provides a mock function with given fields:
func (*MockPooledBackendConn) GetStatus ¶
func (_m *MockPooledBackendConn) GetStatus() uint16
GetStatus provides a mock function with given fields:
func (*MockPooledBackendConn) IsAutoCommit ¶
func (_m *MockPooledBackendConn) IsAutoCommit() bool
IsAutoCommit provides a mock function with given fields:
func (*MockPooledBackendConn) IsInTransaction ¶
func (_m *MockPooledBackendConn) IsInTransaction() bool
IsInTransaction provides a mock function with given fields:
func (*MockPooledBackendConn) Ping ¶
func (_m *MockPooledBackendConn) Ping() error
Ping provides a mock function with given fields:
func (*MockPooledBackendConn) PutBack ¶
func (_m *MockPooledBackendConn) PutBack()
PutBack provides a mock function with given fields:
func (*MockPooledBackendConn) Rollback ¶
func (_m *MockPooledBackendConn) Rollback() error
Rollback provides a mock function with given fields:
func (*MockPooledBackendConn) SetAutoCommit ¶
func (_m *MockPooledBackendConn) SetAutoCommit(_a0 bool) error
SetAutoCommit provides a mock function with given fields: _a0
func (*MockPooledBackendConn) SetCharset ¶
func (_m *MockPooledBackendConn) SetCharset(charset string) error
SetCharset provides a mock function with given fields: charset
func (*MockPooledBackendConn) StmtClosePrepare ¶
func (_m *MockPooledBackendConn) StmtClosePrepare(stmtId int) error
StmtClosePrepare provides a mock function with given fields: stmtId
func (*MockPooledBackendConn) StmtExecuteForward ¶
func (_m *MockPooledBackendConn) StmtExecuteForward(data []byte) (*mysql.Result, error)
StmtExecuteForward provides a mock function with given fields: data
func (*MockPooledBackendConn) StmtPrepare ¶
func (_m *MockPooledBackendConn) StmtPrepare(sql string) (Stmt, error)
StmtPrepare provides a mock function with given fields: sql
func (*MockPooledBackendConn) UseDB ¶
func (_m *MockPooledBackendConn) UseDB(dbName string) error
UseDB provides a mock function with given fields: dbName
type MockSimpleBackendConn ¶
MockSimpleBackendConn is an autogenerated mock type for the SimpleBackendConn type
func (*MockSimpleBackendConn) Begin ¶
func (_m *MockSimpleBackendConn) Begin() error
Begin provides a mock function with given fields:
func (*MockSimpleBackendConn) Close ¶
func (_m *MockSimpleBackendConn) Close() error
Close provides a mock function with given fields:
func (*MockSimpleBackendConn) Commit ¶
func (_m *MockSimpleBackendConn) Commit() error
Commit provides a mock function with given fields:
func (*MockSimpleBackendConn) Execute ¶
func (_m *MockSimpleBackendConn) Execute(command string, args ...interface{}) (*mysql.Result, error)
Execute provides a mock function with given fields: command, args
func (*MockSimpleBackendConn) FieldList ¶
FieldList provides a mock function with given fields: table, wildcard
func (*MockSimpleBackendConn) GetCharset ¶
func (_m *MockSimpleBackendConn) GetCharset() string
GetCharset provides a mock function with given fields:
func (*MockSimpleBackendConn) GetConnectionID ¶
func (_m *MockSimpleBackendConn) GetConnectionID() uint32
GetConnectionID provides a mock function with given fields:
func (*MockSimpleBackendConn) GetDB ¶
func (_m *MockSimpleBackendConn) GetDB() string
GetDB provides a mock function with given fields:
func (*MockSimpleBackendConn) GetStatus ¶
func (_m *MockSimpleBackendConn) GetStatus() uint16
GetStatus provides a mock function with given fields:
func (*MockSimpleBackendConn) IsAutoCommit ¶
func (_m *MockSimpleBackendConn) IsAutoCommit() bool
IsAutoCommit provides a mock function with given fields:
func (*MockSimpleBackendConn) IsInTransaction ¶
func (_m *MockSimpleBackendConn) IsInTransaction() bool
IsInTransaction provides a mock function with given fields:
func (*MockSimpleBackendConn) Ping ¶
func (_m *MockSimpleBackendConn) Ping() error
Ping provides a mock function with given fields:
func (*MockSimpleBackendConn) Rollback ¶
func (_m *MockSimpleBackendConn) Rollback() error
Rollback provides a mock function with given fields:
func (*MockSimpleBackendConn) SetAutoCommit ¶
func (_m *MockSimpleBackendConn) SetAutoCommit(_a0 bool) error
SetAutoCommit provides a mock function with given fields: _a0
func (*MockSimpleBackendConn) SetCharset ¶
func (_m *MockSimpleBackendConn) SetCharset(charset string) error
SetCharset provides a mock function with given fields: charset
func (*MockSimpleBackendConn) StmtClosePrepare ¶
func (_m *MockSimpleBackendConn) StmtClosePrepare(stmtId int) error
StmtClosePrepare provides a mock function with given fields: stmtId
func (*MockSimpleBackendConn) StmtExecuteForward ¶
func (_m *MockSimpleBackendConn) StmtExecuteForward(data []byte) (*mysql.Result, error)
StmtExecuteForward provides a mock function with given fields: data
func (*MockSimpleBackendConn) StmtPrepare ¶
func (_m *MockSimpleBackendConn) StmtPrepare(sql string) (Stmt, error)
StmtPrepare provides a mock function with given fields: sql
func (*MockSimpleBackendConn) UseDB ¶
func (_m *MockSimpleBackendConn) UseDB(dbName string) error
UseDB provides a mock function with given fields: dbName
type MockStmt ¶
MockStmt is an autogenerated mock type for the Stmt type
type Namespace ¶
type Namespace interface { Name() string IsDatabaseAllowed(db string) bool ListDatabases() []string IsDeniedSQL(sqlFeature uint32) bool IsAllowedSQL(sqlFeature uint32) bool GetPooledConn(context.Context) (PooledBackendConn, error) IncrConnCount() DescConnCount() GetBreaker() (Breaker, error) GetRateLimiter() RateLimiter }
type NamespaceManager ¶
type PooledBackendConn ¶
type PooledBackendConn interface { // PutBack put conn back to pool PutBack() // ErrorClose close conn and connpool create a new conn // call this function when conn is broken. ErrorClose() error BackendConn }
type QueryCtxImpl ¶
type QueryCtxImpl struct {
// contains filtered or unexported fields
}
func NewQueryCtxImpl ¶
func NewQueryCtxImpl(nsmgr NamespaceManager, connId uint64) *QueryCtxImpl
func (*QueryCtxImpl) AffectedRows ¶
func (q *QueryCtxImpl) AffectedRows() uint64
func (*QueryCtxImpl) Auth ¶
func (q *QueryCtxImpl) Auth(user *auth.UserIdentity, pwd []byte, salt []byte) bool
func (*QueryCtxImpl) Close ¶
func (q *QueryCtxImpl) Close() error
func (*QueryCtxImpl) CommitTxn ¶
func (*QueryCtxImpl) CommitTxn(ctx context.Context) error
TODO(eastfisher): remove this function when Driver interface is changed
func (*QueryCtxImpl) CurrentDB ¶
func (q *QueryCtxImpl) CurrentDB() string
func (*QueryCtxImpl) ExecuteInternal ¶
TODO(eastfisher): remove this function when Driver interface is changed
func (*QueryCtxImpl) FieldList ¶
func (q *QueryCtxImpl) FieldList(tableName string) ([]*server.ColumnInfo, error)
func (*QueryCtxImpl) GetSessionVars ¶
func (q *QueryCtxImpl) GetSessionVars() *variable.SessionVars
func (*QueryCtxImpl) LastInsertID ¶
func (q *QueryCtxImpl) LastInsertID() uint64
func (*QueryCtxImpl) LastMessage ¶
func (q *QueryCtxImpl) LastMessage() string
func (*QueryCtxImpl) Prepare ¶
func (q *QueryCtxImpl) Prepare(ctx context.Context, sql string) (stmtId int, columns, params []*server.ColumnInfo, err error)
func (*QueryCtxImpl) RollbackTxn ¶
func (*QueryCtxImpl) RollbackTxn()
TODO(eastfisher): remove this function when Driver interface is changed
func (*QueryCtxImpl) SetClientCapability ¶
func (q *QueryCtxImpl) SetClientCapability(capability uint32)
func (*QueryCtxImpl) SetCommandValue ¶
func (q *QueryCtxImpl) SetCommandValue(command byte)
func (*QueryCtxImpl) SetProcessInfo ¶
TODO(eastfisher): Does weir need to support this?
func (*QueryCtxImpl) SetSessionManager ¶
func (*QueryCtxImpl) SetSessionManager(util.SessionManager)
TODO(eastfisher): remove this function when Driver interface is changed
func (*QueryCtxImpl) SetValue ¶
func (*QueryCtxImpl) SetValue(key fmt.Stringer, value interface{})
TODO(eastfisher): implement this function
func (*QueryCtxImpl) ShowProcess ¶
func (*QueryCtxImpl) ShowProcess() *util.ProcessInfo
TODO(eastfisher): does weir need to support show processlist?
func (*QueryCtxImpl) Status ¶
func (q *QueryCtxImpl) Status() uint16
func (*QueryCtxImpl) StmtClose ¶
func (q *QueryCtxImpl) StmtClose(ctx context.Context, stmtId int) error
func (*QueryCtxImpl) StmtExecuteForward ¶
func (*QueryCtxImpl) Value ¶
func (*QueryCtxImpl) Value(key fmt.Stringer) interface{}
TODO(eastfisher): implement this function
func (*QueryCtxImpl) WarningCount ¶
func (*QueryCtxImpl) WarningCount() uint16
TODO(eastfisher): implement this function
type RateLimiter ¶
type SessionVarsWrapper ¶
type SessionVarsWrapper struct {
// contains filtered or unexported fields
}
func NewSessionVarsWrapper ¶
func NewSessionVarsWrapper(sessionVars *variable.SessionVars) *SessionVarsWrapper
func (*SessionVarsWrapper) AffectedRows ¶
func (s *SessionVarsWrapper) AffectedRows() uint64
func (*SessionVarsWrapper) CheckSessionSysVarValid ¶
func (s *SessionVarsWrapper) CheckSessionSysVarValid(name string) error
func (*SessionVarsWrapper) GetAllSystemVars ¶
func (s *SessionVarsWrapper) GetAllSystemVars() map[string]*ast.VariableAssignment
func (*SessionVarsWrapper) GetCharsetInfo ¶
func (s *SessionVarsWrapper) GetCharsetInfo() (charset, collation string)
TODO(eastfisher): remove this function
func (*SessionVarsWrapper) GetClientCapability ¶
func (s *SessionVarsWrapper) GetClientCapability() uint32
func (*SessionVarsWrapper) GetMessage ¶
func (s *SessionVarsWrapper) GetMessage() string
func (*SessionVarsWrapper) GetStatusFlag ¶
func (s *SessionVarsWrapper) GetStatusFlag(flag uint16) bool
func (*SessionVarsWrapper) LastInsertID ¶
func (s *SessionVarsWrapper) LastInsertID() uint64
func (*SessionVarsWrapper) SessionVars ¶
func (s *SessionVarsWrapper) SessionVars() *variable.SessionVars
func (*SessionVarsWrapper) SetAffectRows ¶
func (s *SessionVarsWrapper) SetAffectRows(count uint64)
func (*SessionVarsWrapper) SetClientCapability ¶
func (s *SessionVarsWrapper) SetClientCapability(capability uint32)
func (*SessionVarsWrapper) SetCommandValue ¶
func (s *SessionVarsWrapper) SetCommandValue(command byte)
func (*SessionVarsWrapper) SetLastInsertID ¶
func (s *SessionVarsWrapper) SetLastInsertID(id uint64)
func (*SessionVarsWrapper) SetMessage ¶
func (s *SessionVarsWrapper) SetMessage(msg string)
func (*SessionVarsWrapper) SetStatusFlag ¶
func (s *SessionVarsWrapper) SetStatusFlag(flag uint16, on bool)
func (*SessionVarsWrapper) SetSystemVarAST ¶
func (s *SessionVarsWrapper) SetSystemVarAST(name string, v *ast.VariableAssignment)
func (*SessionVarsWrapper) SetSystemVarDefault ¶
func (s *SessionVarsWrapper) SetSystemVarDefault(name string)
func (*SessionVarsWrapper) Status ¶
func (s *SessionVarsWrapper) Status() uint16
type SimpleBackendConn ¶
type SimpleBackendConn interface { Close() error BackendConn }