Documentation ¶
Index ¶
- type Database
- func (db *Database) BeginTx(ctx context.Context) (context.Context, error)
- func (db *Database) Close() error
- func (db *Database) Commit(context.Context)
- func (db *Database) Del(ctx context.Context, key []byte, opts *kv.WriteOption) error
- func (db *Database) Get(ctx context.Context, key []byte, opts *kv.ReadOption) ([]byte, error)
- func (db *Database) Has(ctx context.Context, key []byte, opts *kv.ReadOption) (bool, error)
- func (db *Database) Put(ctx context.Context, key, val []byte, opts *kv.WriteOption) error
- func (db *Database) RollBack(context.Context)
- func (db *Database) SCount(ctx context.Context, key []byte, opts *kv.ReadOption) (uint64, error)
- func (db *Database) SDel(ctx context.Context, key, val []byte, opts *kv.WriteOption) error
- func (db *Database) SGet(ctx context.Context, key []byte, page, pageSize uint64, opts *kv.ReadOption) ([][]byte, error)
- func (db *Database) SPut(ctx context.Context, key, val []byte, opts *kv.WriteOption) error
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
Click to show internal directories.
Click to hide internal directories.