@mcrowe/sql-builder
v0.0.2
Published
Javascript/Typescript helpers for building basic SQL queries.
Downloads
2
Readme
SQL Builder
Javascript/Typescript helpers for building basic SQL queries.
TODO
- Handle SQL injection on select statements
Usage
npm install @mcrowe/sql-builder --save
const Q = require('@mcrowe/sql-builder')
Q.insert('things', {name: 'Book', condition: 'good'})
// => INSERT INTO things (name, condition, created_at, updated_at) VALUES ('Book', 'good', now(), now());
// etc.
Development
Install npm modules:
npm install
Run tests:
npm test
Build:
npm run build
Publish to npm:
Update the version in
package.json
Build using
npm run build
Publish using
npm publish --access=public