unqlitego

package module
v0.0.0-...-f6aa21f Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: BSD-2-Clause Imports: 4 Imported by: 0

README

unqlitego

UnQLite Binding for golang.

Docs

Install

$ go get git.thisco.de/vbatts/unqlitego

Test

$ go get github.com/r7kamura/gospel
$ cd ${GOPATH/:*/}/src/git.thisco.de/vbatts/unqlitego
$ go test .

Benchmark

$ go get github.com/r7kamura/gospel
$ cd ${GOPATH/:*/}/src/git.thisco.de/vbatts/unqlitego
$ go test -bench Bench*

Output:(Macbook Air 2011 mid)

BenchmarkFileStore	  200000	      9667 ns/op
BenchmarkFileFetch	  500000	      7928 ns/op
BenchmarkMemStore	  500000	      3824 ns/op
BenchmarkMemFetch	 1000000	      3448 ns/op

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copyright() string

Copyright ...

func Ident

func Ident() string

Ident ...

func IsThreadSafe

func IsThreadSafe() bool

IsThreadSafe ...

func Shutdown

func Shutdown() (err error)

Shutdown ...

func Signature

func Signature() string

Signature ...

func Version

func Version() string

Version ...

Types

type Cursor

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

Cursor ...

func (*Cursor) Close

func (curs *Cursor) Close() (err error)

Close ...

func (*Cursor) Delete

func (curs *Cursor) Delete() (err error)

Delete ...

func (*Cursor) First

func (curs *Cursor) First() (err error)

First ...

func (*Cursor) IsValid

func (curs *Cursor) IsValid() (ok bool)

IsValid ...

func (*Cursor) Key

func (curs *Cursor) Key() (key []byte, err error)

Key ...

func (*Cursor) Last

func (curs *Cursor) Last() (err error)

Last ...

func (*Cursor) Next

func (curs *Cursor) Next() (err error)

Next ...

func (*Cursor) Prev

func (curs *Cursor) Prev() (err error)

Prev ...

func (*Cursor) Reset

func (curs *Cursor) Reset() (err error)

Reset ...

func (*Cursor) Seek

func (curs *Cursor) Seek(key []byte) (err error)

Seek ...

func (*Cursor) SeekGE

func (curs *Cursor) SeekGE(key []byte) (err error)

SeekGE ...

func (*Cursor) SeekLE

func (curs *Cursor) SeekLE(key []byte) (err error)

SeekLE ...

func (*Cursor) Value

func (curs *Cursor) Value() (value []byte, err error)

Value ...

type Database

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

Database ...

func NewDatabase

func NewDatabase(filename string) (db *Database, err error)

NewDatabase ...

func (*Database) Append

func (db *Database) Append(key, value []byte) (err error)

Append ...

func (*Database) Begin

func (db *Database) Begin() (err error)

Begin ...

func (*Database) Close

func (db *Database) Close() (err error)

Close ...

func (*Database) Commit

func (db *Database) Commit() (err error)

Commit ...

func (*Database) Delete

func (db *Database) Delete(key []byte) (err error)

Delete ...

func (*Database) Fetch

func (db *Database) Fetch(key []byte) (value []byte, err error)

Fetch ...

func (*Database) NewCursor

func (db *Database) NewCursor() (cursor *Cursor, err error)

NewCursor ...

func (*Database) Rollback

func (db *Database) Rollback() (err error)

Rollback ...

func (*Database) Store

func (db *Database) Store(key, value []byte) (err error)

Store ...

type UnQLiteError

type UnQLiteError int

UnQLiteError ... standard error for this module

func (UnQLiteError) Error

func (e UnQLiteError) Error() string

Jump to

Keyboard shortcuts

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