protected virtual SqlStatement VisitUpdate(UpdateStatement statement) { return(new UpdateStatement(statement.TableName, statement.WherExpression, statement.Assignments) { Limit = statement.Limit }); }
private void BuildSimpleUpdate(SqlCodeObjectBuilder builder, SimpleUpdateNode node) { var whereExpression = ExpressionBuilder.Build(node.WhereExpression); var assignments = UpdateAssignments(node.Columns); var statement = new UpdateStatement(node.TableName, whereExpression, assignments); statement.Limit = node.Limit; builder.AddObject(statement); }
public void UpdateOneRow() { var whereExp = SqlExpression.Parse("id = 2"); var assignments = new[] { new SqlColumnAssignment("birth_date", SqlExpression.Constant(DataObject.Date(new SqlDateTime(1970, 01, 20)))) }; var statement = new UpdateStatement("APP.test_table", whereExp, assignments); Query.ExecuteStatement(statement); }
protected override SqlStatement VisitUpdate(UpdateStatement statement) { return(base.VisitUpdate(statement)); }
protected virtual SqlStatement VisitUpdate(UpdateStatement statement) { return new UpdateStatement(statement.TableName, statement.WherExpression, statement.Assignments) { Limit = statement.Limit }; }
protected override SqlStatement VisitUpdate(UpdateStatement statement) { return base.VisitUpdate(statement); }