native

package
v0.0.0-...-6d303d2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2014 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package native implements the jdh native database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB holds the database information.

func Open

func Open(path string) *DB

Open opens a database in a given path.

func (*DB) Add

func (db *DB) Add(table jdh.Table, dec *json.Decoder) (string, error)

Add adds a new element to the database.

func (*DB) Commit

func (db *DB) Commit() error

Commit commits the database.

func (*DB) Delete

func (db *DB) Delete(table jdh.Table, vals []jdh.KeyValue) error

Delete removes an element from the database.

func (*DB) Get

func (db *DB) Get(table jdh.Table, id string) (interface{}, error)

Get returns an element from the database.

func (*DB) List

func (db *DB) List(table jdh.Table, vals []jdh.KeyValue) (*list.List, error)

List returns a list of elements from the database.

func (*DB) Set

func (db *DB) Set(table jdh.Table, vals []jdh.KeyValue) error

Set sets one or more values for a given element in the database.

Jump to

Keyboard shortcuts

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