hedera-web/js/sql/function.js

39 lines
580 B
JavaScript
Raw Normal View History

2016-09-26 09:28:47 +00:00
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
**/
2016-09-26 09:28:47 +00:00
module.exports = new Class
({
2016-09-26 09:28:47 +00:00
Extends: Expr
,Properties:
{
name:
{
type: String
,value: null
},
schema:
{
type: String
,value: null
},
params:
{
2016-09-26 09:28:47 +00:00
type: List
,value: null
}
}
,render: function (batch)
{
var sql = (this.schema) ? '`' + this.schema + '`.' : '';
return sql + '`' + this.name + '`()';
}
});