2016-09-26 09:28:47 +00:00
|
|
|
|
|
|
|
var Expr = require ('./expr');
|
|
|
|
var List = require ('./list');
|
|
|
|
|
2015-01-23 13:09:30 +00:00
|
|
|
/**
|
|
|
|
* The equivalent of a SQL function.
|
|
|
|
*
|
|
|
|
* @param {string} funcName The name of the function
|
|
|
|
* @param {Array#Sql.Expr} param Array with function parameters
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2016-09-26 09:28:47 +00:00
|
|
|
module.exports = new Class
|
2015-01-23 13:09:30 +00:00
|
|
|
({
|
2016-09-26 09:28:47 +00:00
|
|
|
Extends: Expr
|
2015-01-23 13:09:30 +00:00
|
|
|
,Properties:
|
|
|
|
{
|
|
|
|
name:
|
|
|
|
{
|
|
|
|
type: String
|
|
|
|
,value: null
|
|
|
|
},
|
2015-03-19 19:36:11 +00:00
|
|
|
schema:
|
|
|
|
{
|
|
|
|
type: String
|
|
|
|
,value: null
|
|
|
|
},
|
2015-01-23 13:09:30 +00:00
|
|
|
params:
|
|
|
|
{
|
2016-09-26 09:28:47 +00:00
|
|
|
type: List
|
2015-01-23 13:09:30 +00:00
|
|
|
,value: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
,render: function (batch)
|
|
|
|
{
|
2015-03-19 19:36:11 +00:00
|
|
|
var sql = (this.schema) ? '`' + this.schema + '`.' : '';
|
|
|
|
return sql + '`' + this.name + '`()';
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
});
|