forked from verdnatura/hedera-web
30 lines
543 B
JavaScript
30 lines
543 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(fieldName, value) {
|
|
this.field.push(new Field({name: fieldName}));
|
|
this.expr.push(new Value({value: value}));
|
|
}
|
|
|
|
,addExpr(fieldName, expr) {
|
|
this.field.push(new Field({name: fieldName}));
|
|
this.expr.push(expr);
|
|
}
|
|
|
|
,delSet() {
|
|
this.field.splice(0, this.field.length);
|
|
this.expr.splice(0, this.expr.length);
|
|
}
|
|
});
|