Skip to content

Files

Latest commit

2d37a75 · Jul 10, 2017

History

History
33 lines (27 loc) · 595 Bytes

README.md

File metadata and controls

33 lines (27 loc) · 595 Bytes

Data extractor

Extracts data from given database connectors.

Each connector needs at least the following exported methods:

function connect(cb) {
	//connect to database, return callback with (null,true) if successful
	cb(null, true)
}
function insert(object, cb){
    //...
    //insert object into db
    cb(null, success);
}
function getLastBlock(cb){
    //check db for highest block number inserted
    //return blocknumber or -1 if nothing is inserted yet.
}
function disconnect(){
    //close db connection
}