UNPKG

@trithanka/sql-builder

Version:

A lightweight, function-based, chainable SQL query builder for Node.js using MySQL pool connections.

7 lines (5 loc) 214 B
function buildDeleteQuery(table, whereClause, whereValues = []) { const sql = `DELETE FROM ${table} WHERE ${whereClause}`; return { sql, values: whereValues }; } module.exports = buildDeleteQuery;