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
|
|
|
|
**/
|
|
|
|
Sql.Func = new Class
|
|
|
|
({
|
|
|
|
Extends: Sql.Expr
|
|
|
|
,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:
|
|
|
|
{
|
|
|
|
type: Sql.List
|
|
|
|
,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
|
|
|
}
|
|
|
|
});
|