Class: LowlevelUp

LowlevelUp

new LowlevelUp(file, options)

Extremely low-level version of levelup. The only levelup feature it provides is error-wrapping. It gives a nice recallable open() method and event. It assumes ascii keys and binary values.

This avoids pulling in extra deps and lowers memory usage.

Parameters:
Name Type Description
file String

Location.

options Object

Leveldown options.

Source:

Methods

approximateSize(start, end, callback)

Calculate approximate database size.

Parameters:
Name Type Description
start String

Start key.

end String

End key.

callback function

Returns [Error, Number].

Source:

batch(opsnullable, optionsnullable, callback) → {Leveldown.Batch}

Create an atomic batch.

Parameters:
Name Type Attributes Description
ops Array <nullable>
options Object <nullable>
callback function
Source:
Returns:
Type
Leveldown.Batch

close(callback)

Close the database (not recallable).

Parameters:
Name Type Description
callback function
Source:

del(key, optionsnullable, callback)

Remove a record from the database.

Parameters:
Name Type Attributes Description
key String
options Object <nullable>
callback function
Source:

get(key, optionsnullable, callback)

Retrieve a record from the database.

Parameters:
Name Type Attributes Description
key String
options Object <nullable>
callback function

Returns [Error, Buffer].

Source:

getProperty(name) → (nullable) {String}

Get a database property.

Parameters:
Name Type Description
name String

Property name.

Source:
Returns:
Type
String

iterator(options) → {Leveldown.Iterator}

Create an iterator.

Parameters:
Name Type Description
options Object
Source:
Returns:
Type
Leveldown.Iterator

open(callback)

Open the database (recallable).

Parameters:
Name Type Description
callback function
Source:

put(key, value, optionsnullable, callback)

Store a record in the database.

Parameters:
Name Type Attributes Description
key String
value Buffer
options Object <nullable>
callback function
Source: