knex
Version:
A batteries-included SQL query & schema builder for Postgres, MySQL and SQLite3 and the Browser
24 lines (19 loc) • 501 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// FunctionHelper
// -------
function FunctionHelper(client) {
this.client = client;
}
FunctionHelper.prototype.now = function (precision) {
if (typeof precision === 'number') {
return this.client.raw(`CURRENT_TIMESTAMP(${precision})`);
}
return this.client.raw('CURRENT_TIMESTAMP');
};
var _default = FunctionHelper;
exports.default = _default;
module.exports = exports.default;