UNPKG

quickpostgres

Version:

An easy, beginner-friendly PostgreSQL database wrapper similar to quick.db.

12 lines 454 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = async (db, params, options) => { var _a; // Get amount of rows const fetched = await db.query(`SELECT * FROM ${options.table}`); // Delete all rows await db.query(`DELETE FROM ${options.table}`); // Return values return ((_a = fetched.rows) === null || _a === void 0 ? void 0 : _a.length) || 0; }; //# sourceMappingURL=clear.js.map