dbstream-fs
File-system based database compatible with the dbstream API.
This implementation doesn't implement any indexing logic, which means that the database performance will scale proportionally to the data size. It's recommended to only use it in development environments or very tiny applications.
Usage
var db = ;var connection = db; // write or updatevar cursor = cursor;cursor;cursor;cursor; // read ;
API
This module implements the dbstream API. For the complete documention see: https://github.com/avinoamr/dbstream
connect( [file-path] )
file-path
a String path to the database file to be used- Returns a dbstream Connection object
Connection.compact( destination-path )
destination-path
is a String path to the desination file
This method will compact the size of the DB file by removing duplicate or obsolete lines. This is useful because this module always maintains the file in append-mode in order to avoid conflicts and locks. Every insertion, update or even removal will append another line to the file which will therefore always get bigger. You may want to run this command periodically in order to create a new database file that is move concise.