0
1
Fork 0
hedera-web-mindshore/js/sql/dml.js

34 lines
592 B
JavaScript

var Stmt = require ('./stmt');
var Value = require ('./value');
var Field = require ('./field');
/**
* The equivalent of a SQL DML.
*/
module.exports = new Class
({
Extends: Stmt
,field: []
,expr: []
,addSet: function (fieldName, value)
{
this.expr.push (new Value ({value: value}));
this.field.push (new Field ({name: fieldName}));
}
,addExpr: function (fieldName, expr)
{
this.expr.push (expr);
this.field.push (new Field ({name: fieldName}));
}
,delSet: function ()
{
this.field.splice (0, this.field.length);
this.expr.splice (0, this.expr.length);
}
});