Documentation
¶
Index ¶
- type DB
- func (d *DB) Connect() error
- func (d *DB) Create(key string, value interface{}) error
- func (d *DB) Delete(key string) error
- func (d *DB) DeleteMany(keys ...string) map[string]interface{}
- func (d *DB) Disconnect() error
- func (d *DB) NewWrite()
- func (d *DB) Read(key string) (interface{}, error)
- func (d *DB) ReadAll() string
- func (d *DB) ReadMany(keys ...string) map[string]interface{}
- func (d *DB) Update(key string, value interface{}) error
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 represents the database struct
func New ¶
func New(location string, memory bool, continousWrite bool, ec chan error, wd chan bool, writeInt int) *DB
New initializes a database to a given location and sets it's internal DB to an empty map or reads from file first
func (*DB) DeleteMany ¶
func (*DB) Disconnect ¶
Disconnect encodes database with json and saves it to location if provided
Click to show internal directories.
Click to hide internal directories.