Interface IQueryUpdateBuilder
Creates UPDATE
SQL.
Inherited Members
Namespace: LemonEdge.DataAccess.Core.Abstractions.Builders
Assembly: LemonEdge.DataAccess.Core.Abstractions.dll
Syntax
public interface IQueryUpdateBuilder : IQueryBuilderFiltered, IQueryBuilder
Properties
HasUpdates
Whether this builder has updates.
Declaration
bool HasUpdates { get; }
Property Value
Type | Description |
---|---|
bool |
WithOutputValue
Indicates the update should include outputting the original value before the update
Declaration
string WithOutputValue { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
AddUpdateColumn(string, string)
Adds a column name to be updated with an associated new value
Declaration
IQueryUpdateBuilder AddUpdateColumn(string columnName, string newValue)
Parameters
Type | Name | Description |
---|---|---|
string | columnName | The name of the column to be updated. |
string | newValue | The new value to assign to the column (can be any valid SQL expression) |
Returns
Type | Description |
---|---|
IQueryUpdateBuilder |
AddUpdateColumn(string, string, bool)
Adds a column name to be updated with an associated new value
Declaration
IQueryUpdateBuilder AddUpdateColumn(string columnName, string newValue, bool surroundQuotes)
Parameters
Type | Name | Description |
---|---|---|
string | columnName | The name of the column to be updated. |
string | newValue | The new value to assign to the column (can be any valid SQL expression) |
bool | surroundQuotes | The new value to assign to the column (can be any valid SQL expression) |
Returns
Type | Description |
---|---|
IQueryUpdateBuilder |
ClearUpdateColumns()
Clears the columns.
Declaration
void ClearUpdateColumns()
UpdateFromSelect(IQuerySelectBuilder)
Use the supplied sql select builder as the from clause for the update builder
Of the form:
Update x
col_a = ...
From
SqlSelectBuilder
Declaration
void UpdateFromSelect(IQuerySelectBuilder sb)
Parameters
Type | Name | Description |
---|---|---|
IQuerySelectBuilder | sb | The SqlSelectBuilder to use as the from part of this update statement. |