1.0.12 • Published 7 years ago
curkel-db v1.0.12
CurkelDB
This is an implementation of the Urkel Tree. This is a specific database api.
Installation
npm install curkel-dbUse
This package can be used as follows:
const Curkel = require('curkel-db')API Documentation
Create a table
Curkel.create(tableName)| name | type | description |
|---|---|---|
| tableName | string | name of the table |
This creates a table with name, tableName, and returns a confirmation boolean if correct.
Put
Curkel.put(tableName, key, value)| name | type | description |
|---|---|---|
| tableName | string | name of the table |
| key | byte array | key for the value |
| value | bytes array | value being placed in the table |
This operation does a put, and returns a proof.
Get
Curkel.get(tableName, key)| name | type | description |
|---|---|---|
| tableName | string | name of the table |
| key | byte array | key for the value |
Gets a value corresponding to the key, within the tableName.
Del
Curkel.del(tableName, key)| name | type | description |
|---|---|---|
| tableName | string | name of the table |
| key | byte array | key for the value |
Deletes the value associated with the key at the designated table.