rqlite-fp
A client library for rqlite in a functional programming style
Installation
npm install --save rqlite-fp
Example
With promises
const rqlite = ; { const connection = await const tableCreated = await const testResults = await console}
With callbacks
const connect = const execute = const getAll = { }
righto
Withconst righto = const connect = const execute = const getAll = const connection = const tableCreated = const testResults =
Functions signatures
start -> {httpAddr, raftAddr, join} -> (error, connection)
connect -> filename -> [mode] -> (error, connection)
run -> connection -> sql -> [parameters] -> (error, result={lastId, changes})
getAll -> connection -> sql -> (error, rows)
getOne -> connection -> sql -> (error, row)
batch -> connection -> sql -> [[parameters]] -> (error, result={lastId, changes})
execute -> connection -> sql -> (error, connection)
close -> connection -> (error)
License
This project is licensed under the terms of the MIT license.