Documentation ¶
Overview ¶
Package mock is just for test only.
Index ¶
- type Context
- func (c *Context) ActivePendingTxn() error
- func (c *Context) Cancel()
- func (c *Context) ClearValue(key fmt.Stringer)
- func (c *Context) GetClient() kv.Client
- func (c *Context) GetGlobalSysVar(ctx sessionctx.Context, name string) (string, error)
- func (c *Context) GetSessionManager() util.SessionManager
- func (c *Context) GetSessionVars() *variable.SessionVars
- func (c *Context) GetStore() kv.Storage
- func (c *Context) GoCtx() context.Context
- func (c *Context) InitTxnWithStartTS(startTS uint64) error
- func (c *Context) NewTxn() error
- func (c *Context) PreparedPlanCache() *kvcache.SimpleLRUCache
- func (c *Context) RefreshTxnCtx(ctx context.Context) error
- func (c *Context) SetGlobalSysVar(ctx sessionctx.Context, name string, value string) error
- func (c *Context) SetSessionManager(sm util.SessionManager)
- func (c *Context) SetValue(key fmt.Stringer, value interface{})
- func (c *Context) StmtAddDirtyTableOP(op int, tid int64, handle int64, row []types.Datum)
- func (c *Context) StmtCommit()
- func (c *Context) StmtGetMutation(tableID int64) *binlog.TableMutation
- func (c *Context) StmtRollback()
- func (c *Context) StoreQueryFeedback(_ interface{})
- func (c *Context) Txn() kv.Transaction
- func (c *Context) Value(key fmt.Stringer) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Store kv.Storage // mock global variable // contains filtered or unexported fields }
Context represents mocked sessionctx.Context.
func (*Context) ActivePendingTxn ¶
ActivePendingTxn implements the sessionctx.Context interface.
func (*Context) ClearValue ¶
ClearValue implements sessionctx.Context ClearValue interface.
func (*Context) GetGlobalSysVar ¶
GetGlobalSysVar implements GlobalVarAccessor GetGlobalSysVar interface.
func (*Context) GetSessionManager ¶
func (c *Context) GetSessionManager() util.SessionManager
GetSessionManager implements the sessionctx.Context interface.
func (*Context) GetSessionVars ¶
func (c *Context) GetSessionVars() *variable.SessionVars
GetSessionVars implements the sessionctx.Context GetSessionVars interface.
func (*Context) GoCtx ¶
GoCtx returns standard sessionctx.Context that bind with current transaction.
func (*Context) InitTxnWithStartTS ¶
InitTxnWithStartTS implements the sessionctx.Context interface with startTS.
func (*Context) PreparedPlanCache ¶
func (c *Context) PreparedPlanCache() *kvcache.SimpleLRUCache
PreparedPlanCache implements the sessionctx.Context interface.
func (*Context) RefreshTxnCtx ¶
RefreshTxnCtx implements the sessionctx.Context interface.
func (*Context) SetGlobalSysVar ¶
SetGlobalSysVar implements GlobalVarAccessor SetGlobalSysVar interface.
func (*Context) SetSessionManager ¶
func (c *Context) SetSessionManager(sm util.SessionManager)
SetSessionManager set the session manager.
func (*Context) StmtAddDirtyTableOP ¶
StmtAddDirtyTableOP implements the sessionctx.Context interface.
func (*Context) StmtCommit ¶
func (c *Context) StmtCommit()
StmtCommit implements the sessionctx.Context interface.
func (*Context) StmtGetMutation ¶
StmtGetMutation implements the sessionctx.Context interface.
func (*Context) StmtRollback ¶
func (c *Context) StmtRollback()
StmtRollback implements the sessionctx.Context interface.
func (*Context) StoreQueryFeedback ¶
func (c *Context) StoreQueryFeedback(_ interface{})
StoreQueryFeedback stores the query feedback.
func (*Context) Txn ¶
func (c *Context) Txn() kv.Transaction
Txn implements sessionctx.Context Txn interface.