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.field.push(new Field({name: fieldName})); this.expr.push(new Value({value: value})); } ,addExpr: function(fieldName, expr) { this.field.push(new Field({name: fieldName})); this.expr.push(expr); } ,delSet: function() { this.field.splice(0, this.field.length); this.expr.splice(0, this.expr.length); } });