Qeeper
Qeeper is a SQL query keeper for Node.js.
The main task of Qeeper is to cut SQL out of JavaScript.
You can manage SQL and JavaScript separately by using Qeeper.
Installation
npm install qeeper
Load and configuration
var qeeper = ;
Qeeper has the following configuration options:
- defDir
The directory path which has SQL definition files.
The default value is process.env.PWD + '/qeeper'. - defExt
The extension of the SQL definition files.
The default value is 'def'. - cache
The flag which indicates whether or not to cache the SQLs which are parsed and executed in the memory.
The default value is false.
SQL definition files
You need to make SQL definition files like the following:
SELECT u.id, u.name, u.emailFROM users uWHERE u.id = $1
Usage
You can execute SQL in the SQL definition files by calling Qeeper#sql and passing the SQL definition file's name (without the extension).
client