wiredtiger

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidArgument = NewError(C.EINVAL)
	ErrBusy            = NewError(C.EBUSY)

	ErrError           = NewError(C.WT_ERROR)
	ErrPanic           = NewError(C.WT_PANIC)
	ErrRollback        = NewError(C.WT_ROLLBACK)
	ErrDuplicateKey    = NewError(C.WT_DUPLICATE_KEY)
	ErrNotFound        = NewError(C.WT_NOTFOUND)
	ErrRunRecovery     = NewError(C.WT_RUN_RECOVERY)
	ErrCacheFull       = NewError(C.WT_CACHE_FULL)
	ErrPrepareConflict = NewError(C.WT_PREPARE_CONFLICT)
)
View Source
var ErrCursorHasClosed = errors.New("cursor has closed")
View Source
var (
	ErrSessionClosed = errors.New("session has closed")
)
View Source
var ErrSessionHasClosed = errors.New("session has closed")
View Source
var ErrSnapshotReleased = errors.New("wiredtiger: snapshot released")
View Source
var InvalidCursor = &errorCursor{}

Functions

func IsCacheFull

func IsCacheFull(e error) bool

func IsDuplicateKey

func IsDuplicateKey(e error) bool

func IsNotFound

func IsNotFound(e error) bool

func IsPanic

func IsPanic(e error) bool

func IsPrepareConflict

func IsPrepareConflict(e error) bool

func IsRollback

func IsRollback(e error) bool

func IsRunRecovery

func IsRunRecovery(e error) bool

func Version

func Version() (version string, major int, minor int, patch int)

Types

type ByteType

type ByteType int
const (
	MB ByteType = iota
	GB
	TB
)

type Checkpoint

type Checkpoint struct {
	LogSize DiskSize
	Wait    int
}

type Compressor

type Compressor string
const (
	NoneCompressor   Compressor = "none"
	LZ4Compressor    Compressor = "lz4"
	SnappyCompressor Compressor = "snappy"
	ZLibCompressor   Compressor = "zlib"
	ZstdCompressor   Compressor = "zstd"
)

type Configuration

type Configuration map[string]string

func (*Configuration) Options

func (c *Configuration) Options(opts ...driver.Option) map[string]struct{}

func (*Configuration) SetCacheOverhead

func (c *Configuration) SetCacheOverhead(n int) driver.Option

func (*Configuration) SetCacheSize

func (c *Configuration) SetCacheSize(n DiskSize) driver.Option

func (*Configuration) SetCheckpoint

func (c *Configuration) SetCheckpoint(cp Checkpoint) driver.Option

func (*Configuration) SetConfigBase

func (c *Configuration) SetConfigBase(b bool) driver.Option

func (*Configuration) SetCreate

func (c *Configuration) SetCreate(b bool) driver.Option

func (*Configuration) SetDebugMode

func (c *Configuration) SetDebugMode(m DebugMode) driver.Option

func (*Configuration) SetEviction

func (c *Configuration) SetEviction(e Eviction) driver.Option

func (*Configuration) SetExtensions

func (c *Configuration) SetExtensions(s string) driver.Option

func (*Configuration) SetFileManager

func (c *Configuration) SetFileManager(f FileManger) driver.Option

func (*Configuration) SetLog

func (c *Configuration) SetLog(l Log) driver.Option

func (*Configuration) SetSessionMax

func (c *Configuration) SetSessionMax(n int) driver.Option

func (*Configuration) SetStatistics

func (c *Configuration) SetStatistics(s []StatisticsPolicy) driver.Option

func (*Configuration) SetStatisticsLog

func (c *Configuration) SetStatisticsLog(l StatisticsLog) driver.Option

func (*Configuration) SetVerbose

func (c *Configuration) SetVerbose(s string) driver.Option

func (Configuration) String

func (c Configuration) String() string

type DB

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

func (*DB) Close

func (db *DB) Close() error

func (*DB) CreateField

func (db *DB) CreateField(spec driver.FieldSpec) ([]byte, error)

func (*DB) CreateIndex

func (db *DB) CreateIndex(spec driver.IndexSpec) ([]byte, error)

func (*DB) DefaultFieldKey

func (db *DB) DefaultFieldKey() []byte

func (*DB) DefaultIndexKey

func (db *DB) DefaultIndexKey() []byte

func (*DB) Delete

func (db *DB) Delete(key driver.Key) error

func (*DB) Get

func (db *DB) Get(key driver.Key) ([]byte, error)

func (*DB) GetSchemaSpec

func (db *DB) GetSchemaSpec() (driver.SchemaSpec, error)

func (*DB) GetSnapshot

func (db *DB) GetSnapshot() (driver.Snapshot, error)

func (*DB) Has

func (db *DB) Has(key driver.Key) (bool, error)

func (*DB) InitSchema

func (db *DB) InitSchema() error

func (*DB) NewBatch

func (db *DB) NewBatch() driver.Batching

func (*DB) Put

func (db *DB) Put(key driver.Key, value driver.Value) error

func (*DB) RenameIndex

func (db *DB) RenameIndex(oldName, newName string) (bool, error)

func (*DB) Search

func (db *DB) Search(query driver.Query) (c driver.Cursor)

type DebugMode

type DebugMode struct {
	CheckpointRetention int
	CursorCopy          bool
	Eviction            bool
	TableLogging        bool
}

type DiskSize

type DiskSize struct {
	Size int
	Type ByteType
}

func (DiskSize) String

func (ds DiskSize) String() string

type Driver

type Driver struct{}

Driver is exported to make the driver directly accessible. In general the driver is used via the shed/driver package.

func (Driver) Open

func (d Driver) Open(path, options string) (driver.DB, error)

type Error

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

func NewError

func NewError(code int, s ...*session) Error

func (Error) Error

func (e Error) Error() string

type Eviction

type Eviction struct {
	ThreadsMax int `key:"threads_max"`
	ThreadsMin int `key:"threads_min"`
}

type FileManger

type FileManger struct {
	CloseHandleMinimum int
	CloseIdleTime      int
	CloseScanInterval  int
}

type Log

type Log struct {
	Archive    bool
	Compressor Compressor
	Enabled    bool
	Path       string
}

type StatisticsLog

type StatisticsLog struct {
	Wait int `key:"wait"`
}

type StatisticsPolicy

type StatisticsPolicy string
const (
	StatisticsAll       StatisticsPolicy = "all"
	StatisticsCacheWalk StatisticsPolicy = "cache_walk"
	StatisticsFast      StatisticsPolicy = "fast"
)

Jump to

Keyboard shortcuts

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