Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TableLockContext ¶
type TableLockContext interface {
TableLockReadContext
// AddTableLock adds table lock to the session lock map.
AddTableLock([]model.TableLockTpInfo)
// ReleaseTableLocks releases table locks in the session lock map.
ReleaseTableLocks(locks []model.TableLockTpInfo)
// ReleaseTableLockByTableIDs releases table locks in the session lock map by table IDs.
ReleaseTableLockByTableIDs(tableIDs []int64)
// ReleaseAllTableLocks releases all table locks hold by the session.
ReleaseAllTableLocks()
}
TableLockContext is the interface to operate table lock.
type TableLockReadContext ¶
type TableLockReadContext interface {
// CheckTableLocked checks the table lock.
CheckTableLocked(tblID int64) (bool, ast.TableLockType)
// GetAllTableLocks gets all table locks table id and db id hold by the session.
GetAllTableLocks() []model.TableLockTpInfo
// HasLockedTables uses to check whether this session locked any tables.
HasLockedTables() bool
}
TableLockReadContext is the interface to get table lock information.
Click to show internal directories.
Click to hide internal directories.