context

package
v1.1.0-beta.0...-de36787 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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, pmodel.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL