SQL query keeper for Node.js
Qeeper is a SQL query keeper for Node.js.
npm install qeeper
var qeeper = require'qeeper'configuredefDir: __dirname + '/qeeper' defExt: '.def' cache: true;
Qeeper has the following configuration options:
The directory path which has SQL definition files.
The default value is process.env.PWD + '/qeeper'.
The extension of the SQL definition files.
The default value is 'def'.
The flag which indicates whether or not to cache the SQLs which are parsed and executed in the memory.
The default value is false.
You need to make SQL definition files like the following:
SELECTu.id, u.name, u.emailFROMusers uWHEREu.id = $1
You can execute SQL in the SQL definition files by calling Qeeper#sql and passing the SQL definition file's name (without the extension).