ldb: minor.
This commit is contained in:
parent
b346397449
commit
27ba246027
@ -35,9 +35,11 @@ function ldb(options) {
|
||||
utils.mkdir(target.location, true);
|
||||
|
||||
return new LowlevelUp(target.location, {
|
||||
// LevelDB and others
|
||||
// Generic
|
||||
createIfMissing: options.createIfMissing !== false,
|
||||
errorIfExists: options.errorIfExists === true,
|
||||
|
||||
// LevelDB
|
||||
compression: options.compression !== false,
|
||||
cacheSize: options.cacheSize || (8 << 20),
|
||||
writeBufferSize: options.writeBufferSize || (4 << 20),
|
||||
@ -45,13 +47,13 @@ function ldb(options) {
|
||||
paranoidChecks: false,
|
||||
memory: false,
|
||||
|
||||
// For LMDB if we decide to use it:
|
||||
// LMDB
|
||||
sync: options.sync || false,
|
||||
mapSize: options.mapSize || 10 * (1024 << 20),
|
||||
mapSize: options.mapSize || 256 * (1024 << 20),
|
||||
writeMap: options.writeMap || false,
|
||||
noSubdir: options.noSubdir !== false,
|
||||
|
||||
// For browser buffer keys
|
||||
// Browser
|
||||
bufferKeys: options.bufferKeys,
|
||||
|
||||
db: target.db
|
||||
@ -88,6 +90,7 @@ ldb.getBackend = function getBackend(db) {
|
||||
name = 'lmdb';
|
||||
ext = 'mdb';
|
||||
break;
|
||||
case 'mem':
|
||||
case 'memory':
|
||||
case 'rbt':
|
||||
name = 'rbt';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user