KeyValueStore

Persistent indexed key-value store, backed by an SQLite database. Non-string keys/values are JSON-encoded.

Constructors

this
this(KeyValueDatabase* db, string tableName)

Constructor with KeyValueDatabase and tableName. Allows using the same database file for multiple key/value tables.

this
this(string fn)

Constructor with file name. Creates a new KeyValueDatabase for private use.

Members

Aliases

getOrAdd
deprecated alias getOrAdd = require
Undocumented in source.

Functions

get
V get(K k, V defaultValue)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(K key, V value) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
bool opBinaryRight(K k)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
V opIndex(K k)

Implements common D associative array operations.

opIndexAssign
const(V) opIndexAssign(V v, K k)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
void remove(K k)
Undocumented in source. Be warned that the author may not have intended to support it.
require
V require(K k, V defaultValue)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

keys
K[] keys [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
length
int length [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

db
KeyValueDatabase* db;
tableName
string tableName;

Meta