hedera-web/web/js/sql/stmt.js

44 lines
531 B
JavaScript
Raw Normal View History

/**
* The equivalent of a SQL statement.
**/
Sql.Stmt = new Class
({
Extends: Sql.Object
,Properties:
{
where:
{
type: Sql.Expr
,value: null
}
}
,target: []
,addTarget: function (target)
{
this.target.push (target);
}
,renderTarget: function (batch)
{
var sql;
var len = this.target.length;
if (len > 0)
{
sql = ' ';
for (var n = 0; n < len; n++)
{
if (n > 0) sql += ', ';
sql += this.target[n].render (batch);
}
}
else
sql += 'DUAL';
return sql;
}
});