15 lines
333 B
JavaScript
15 lines
333 B
JavaScript
|
// 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');
|
||
|
};
|
||
|
|
||
|
module.exports = FunctionHelper;
|