Documentation ¶
Overview ¶
Package mock is just for test only.
Index ¶
- type Client
- type Context
- func (c *Context) ActivePendingTxn() error
- func (c *Context) Cancel()
- func (c *Context) ClearValue(key fmt.Stringer)
- func (c *Context) DDLOwnerChecker() owner.DDLOwnerChecker
- 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{}
- type HookKeyForTest
- type Store
- func (s *Store) Begin() (kv.Transaction, error)
- func (s *Store) BeginWithStartTS(startTS uint64) (kv.Transaction, error)
- func (s *Store) Close() error
- func (s *Store) CurrentVersion() (kv.Version, error)
- func (s *Store) GetClient() kv.Client
- func (s *Store) GetOracle() oracle.Oracle
- func (s *Store) GetSnapshot(ver kv.Version) (kv.Snapshot, error)
- func (s *Store) SupportDeleteRange() bool
- func (s *Store) UUID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client implement kv.Client interface, mocked from "CopClient" defined in "store/tikv/copprocessor.go".
func (*Client) IsRequestTypeSupported ¶
IsRequestTypeSupported implement kv.Client interface.
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) DDLOwnerChecker ¶
func (c *Context) DDLOwnerChecker() owner.DDLOwnerChecker
DDLOwnerChecker returns owner.DDLOwnerChecker.
func (*Context) GetClient ¶
GetClient implements sessionctx.Context GetClient 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) GetStore ¶
GetStore gets the store of session.
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) NewTxn ¶
NewTxn implements the sessionctx.Context interface.
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) SetValue ¶
SetValue implements sessionctx.Context SetValue interface.
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 ¶
func (c *Context) StmtGetMutation(tableID int64) *binlog.TableMutation
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.
type HookKeyForTest ¶
type HookKeyForTest string
HookKeyForTest is as alias, used by context.WithValue. golint forbits using string type as key in context.WithValue.
type Store ¶
Store implements kv.Storage interface.
func (*Store) Begin ¶
func (s *Store) Begin() (kv.Transaction, error)
Begin implements kv.Storage interface.
func (*Store) BeginWithStartTS ¶
func (s *Store) BeginWithStartTS(startTS uint64) (kv.Transaction, error)
BeginWithStartTS implements kv.Storage interface.
func (*Store) CurrentVersion ¶
CurrentVersion implements kv.Storage interface.
func (*Store) GetClient ¶
GetClient implements kv.Storage interface.
func (*Store) GetOracle ¶
GetOracle implements kv.Storage interface.
func (*Store) GetSnapshot ¶
GetSnapshot implements kv.Storage interface.
func (*Store) SupportDeleteRange ¶
SupportDeleteRange implements kv.Storage interface.