memorydb

package
v0.0.0-...-9f09256 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func NewMemoryDb

func NewMemoryDb() *Database

func (*Database) BeginTx

func (db *Database) BeginTx(ctx context.Context) (context.Context, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) Commit

func (db *Database) Commit(context.Context)

func (*Database) Del

func (db *Database) Del(ctx context.Context, key []byte, opts *kv.WriteOption) error

func (*Database) Get

func (db *Database) Get(ctx context.Context, key []byte, opts *kv.ReadOption) ([]byte, error)

func (*Database) Has

func (db *Database) Has(ctx context.Context, key []byte, opts *kv.ReadOption) (bool, error)

func (*Database) Put

func (db *Database) Put(ctx context.Context, key, val []byte, opts *kv.WriteOption) error

func (*Database) RollBack

func (db *Database) RollBack(context.Context)

func (*Database) SCount

func (db *Database) SCount(ctx context.Context, key []byte, opts *kv.ReadOption) (uint64, error)

func (*Database) SDel

func (db *Database) SDel(ctx context.Context, key, val []byte, opts *kv.WriteOption) error

func (*Database) SGet

func (db *Database) SGet(ctx context.Context, key []byte, page, pageSize uint64, opts *kv.ReadOption) ([][]byte, error)

func (*Database) SPut

func (db *Database) SPut(ctx context.Context, key, val []byte, opts *kv.WriteOption) error

Jump to

Keyboard shortcuts

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