Class UpdateDataExpression
Represents an expression used to update records in a database table during a migration.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Update.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class UpdateDataExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceUpdateDataExpression(IMigrationContext)
Initializes a new instance of the UpdateDataExpression class with the specified migration context.
Declaration
public UpdateDataExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for the update data expression. |
Properties
View SourceIsAllRows
Gets or sets a value indicating whether the update applies to all rows.
Declaration
public bool IsAllRows { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Set
Gets or sets the collection of column-value pairs specifying the data to update.
Declaration
public List<KeyValuePair<string, object?>>? Set { get; set; }
Property Value
| Type | Description |
|---|---|
| List<KeyValuePair<string, object>> |
TableName
Gets or sets the name of the database table to be updated by this expression.
Declaration
public string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Where
Gets or sets the collection of conditions used to identify which records should be updated in the data store. Each condition is represented as a key-value pair, where the key is the column name and the value is the value to match.
Declaration
public List<KeyValuePair<string, object?>>? Where { get; set; }
Property Value
| Type | Description |
|---|---|
| List<KeyValuePair<string, object>> |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |