UNPKG

promisesql

Version:

A [node-sqlite3](https://www.npmjs.com/package/sqlite3) wrapper for running simple, promise-based database queries in Node.js. It works best in smaller projects with a lot of asynchronous development, e.g., a Discord bot that implements slash commands.

7 lines (5 loc) 240 B
const numericExpressions = new Object(); [ 'max', 'min', 'count', 'avg', 'sum' ].forEach(fn => { numericExpressions[fn] = options => `${fn.toUpperCase()}(${options.all ? '*' : options})`; }); module.exports = numericExpressions;