Skip to content

SqlInsert class

namespace: Serenity.Data   assemblySerenity.Net.Services

Class to generate queries of the form INSERT INTO tablename (field1, field2..fieldN) VALUES (value1, value2..valueN)

public class SqlInsert : QueryWithParams, ISetFieldByStatement

Public Members

name description
SqlInsert(…) Creates a new SqlInsert query.
Clone() Clones the query.
Dialect(…) Sets the dialect (SQL server type / version) for query.
GetFieldExpressions() Returns field and value expression pairs.
IdentityColumn() Gets the identity column.
IdentityColumn(…) Sets the identity column.
SetNull(…) Assigns NULL as the field value.
SetTo(…) Sets field value. (2 methods)
TableName() Gets the table name.
override ToString() Gets string representation of the query.
ToUpsertString(…) Formats an UPSERT query, i.e. a query that updates the row matching the key fields or inserts a new row if no such row exists.
static Format(…) Formats an INSERT query.
static FormatUpsert(…) Formats an UPSERT query, i.e. a query that updates the row matching the key fields or inserts a new row if no such row exists.

See Also