SqlUpdate class

namespace: Serenity.Data   assemblySerenity.Net.Data

Generates queries of the form UPDATE tablename SET field1 = value1, field2 = value2 ... fieldN = valueN WHERE [filter].

public class SqlUpdate : QueryWithParams, IFilterableQuery, ISetFieldByStatement

Public Members

name description
SqlUpdate(…) Creates a new SqlUpdate query.
Clone() Clones this SqlUpdate query.
Dec(…) Decreases a fields value. (2 methods)
Dialect(…) Sets the dialect (SQL server type / version) for query.
Inc(…) Increases a fields value. (2 methods)
SetNull(…) Sets field value to NULL.
SetTo(…) Sets field value to the expression. (2 methods)
override ToString() Gets string representation of SqlUpdate query.
Where(…) Adds a condition to WHERE clause of the query. (2 methods)
static Format(…) Formats an SQL UPDATE statement.
static RemoveT0Reference(…) Removes the t0 reference from an SQL field reference.


To determine updated field values, Set(field, value) should be called several times.Where expressions determines the record(s) to update.

See Also