globalstate

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoerceAutoIncrementValue

func CoerceAutoIncrementValue(val interface{}) (uint64, error)

CoerceAutoIncrementValue converts |val| into an AUTO_INCREMENT sequence value

Types

type AutoIncrementTracker

type AutoIncrementTracker struct {
	// contains filtered or unexported fields
}

func NewAutoIncrementTracker

func NewAutoIncrementTracker(ctx context.Context, ws *doltdb.WorkingSet) (AutoIncrementTracker, error)

NewAutoIncrementTracker returns a new autoincrement tracker for the working set given

func (AutoIncrementTracker) AddNewTable

func (a AutoIncrementTracker) AddNewTable(tableName string)

func (AutoIncrementTracker) Current

func (a AutoIncrementTracker) Current(tableName string) uint64

func (AutoIncrementTracker) DropTable

func (a AutoIncrementTracker) DropTable(tableName string)

func (AutoIncrementTracker) Next

func (a AutoIncrementTracker) Next(tbl string, insertVal interface{}) (uint64, error)

func (AutoIncrementTracker) Set

func (a AutoIncrementTracker) Set(tableName string, val uint64)

type GlobalState

type GlobalState struct {
	// contains filtered or unexported fields
}

func NewGlobalStateStore

func NewGlobalStateStore() GlobalState

func (GlobalState) GetAutoIncrementTracker

func (g GlobalState) GetAutoIncrementTracker(ctx context.Context, ws *doltdb.WorkingSet) (AutoIncrementTracker, error)

type StateProvider

type StateProvider interface {
	GetGlobalState() GlobalState
}

Jump to

Keyboard shortcuts

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