4.4.3 • Published 9 years ago

level-dat v4.4.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

level-dat

LevelDB storage backend for Dat

npm install level-dat

build status dat

Usage

var ldat = require('level-dat')

db = ldat(db) // where db is levelup instance
db.createReadStream().on('data', console.log)

API

In general the API is the same as the levelup api

db.put(key, value, [opts], [cb])

Insert a key and value. Use opts.version = number to specify the version.

db.get(key, [opts], cb)

Get a key and value and version.

db.del(key, [cb])

Delete a key.

var subdb = db.subset(name)

Create a subset database that will be versioned and replicated as well

db.stat(cb)

Returns a digest of all rows in the database.

db.createReadStream([opts])

Create a read stream to the database. Data includes the version.

db.createValueStream([opts])

Only get the values.

db.createKeyStream([opts])

Only get the keys.

db.createVersionStream(key, [opts])

Get all stored versions of a key.

db.createWriteStream([opts])

Stream data into the database. Data can include versions.

db.createChangesReadStream([opts])

Get a change feed stream from the database. Set options.since = change to only get a partial stream and options.data to get the data as well.

db.createChangesWriteStream([opts])

Pipe a change feed into the change write stream to replicate a database.

License

MIT

4.4.3

9 years ago

4.4.2

10 years ago

4.4.1

10 years ago

4.4.0

10 years ago

4.3.3

10 years ago

4.3.2

10 years ago

4.3.1

10 years ago

4.3.0

10 years ago

4.2.4

10 years ago

4.2.3

10 years ago

4.2.2

10 years ago

4.2.1

10 years ago

4.2.0

10 years ago

4.1.1

10 years ago

4.1.0

10 years ago

4.0.0

10 years ago

3.2.0

10 years ago

3.1.0

10 years ago

3.0.0

10 years ago

2.0.0

10 years ago

1.0.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago