forked from verdnatura/hedera-web
39 lines
580 B
JavaScript
39 lines
580 B
JavaScript
|
|
var Expr = require ('./expr');
|
|
var List = require ('./list');
|
|
|
|
/**
|
|
* The equivalent of a SQL function.
|
|
*
|
|
* @param {string} funcName The name of the function
|
|
* @param {Array#Sql.Expr} param Array with function parameters
|
|
**/
|
|
module.exports = new Class
|
|
({
|
|
Extends: Expr
|
|
,Properties:
|
|
{
|
|
name:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
schema:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
params:
|
|
{
|
|
type: List
|
|
,value: null
|
|
}
|
|
}
|
|
|
|
,render: function (batch)
|
|
{
|
|
var sql = (this.schema) ? '`' + this.schema + '`.' : '';
|
|
return sql + '`' + this.name + '`()';
|
|
}
|
|
});
|