https://github.com/wiredtiger/node-wiredtiger
https://github.com/wiredtiger/node-wiredtiger
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wiredtiger/node-wiredtiger
- Owner: wiredtiger
- License: other
- Created: 2014-05-14T02:15:04.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T02:00:49.000Z (almost 7 years ago)
- Last Synced: 2024-03-26T05:28:39.205Z (over 2 years ago)
- Language: C++
- Size: 3.99 MB
- Stars: 12
- Watchers: 8
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
WiredTiger Node.js API
===============
Fast transactional storage - a Node.js wrapper around the
[WiredTiger](http://wiredtiger.com) storage engine library.
Introduction
------------
WiredTiger is a fast transactional data storage engine that provides
high throughput data access and storage in a concurrent environment.
WiredTiger stores data on local disks. A single WiredTiger database can
contain multiple tables. Tables can be created in different formats to suit
the intended workload. Available table types are:
* Log Structured Merge (LSM) tree. Especially good for high insert/update
workloads, where the volume of data is large.
* Btree. Especially good for smaller datasets, or workloads that have a
relatively higher rate of queries compared to updates.
Platforms
---------
WiredTiger currently supports Linux, FreeBSD and Mac OS.
Usage
-----
The best way to see usage is to view the test code. The code at
test/test-basic.js is the recommended starting point.
The following might help (though it could be outdated).
```
var wiredtiger = require('wiredtiger');
var conn = new wiredtiger.WTConnection('/path/to/database/directory', 'create');
conn.Open( function(err) {
var table = new wiredtiger.WTTable(
conn, "table:test", "create,key_format=S,value_format=S");
table.Open( function(err) {
table.Put('abc', 'def', function(err) {
table.Search('abc', function(err, result) {
console.log("Woo! got: " + result);
});
});
});
});
```