Class DeleteDataExpression
Represents a database migration expression that deletes data from a specified table. Used within migration operations to define data deletion actions.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class DeleteDataExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceDeleteDataExpression(IMigrationContext)
Initializes a new instance of the DeleteDataExpression class using the specified migration context. This expression is used to define data deletion operations within a migration.
Declaration
public DeleteDataExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext providing migration-specific information and services. |
Properties
View SourceIsAllRows
Gets or sets a value indicating whether the delete operation targets all rows.
Declaration
public virtual bool IsAllRows { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Rows
Gets the collection of data row definitions that specify which rows should be deleted.
Declaration
public List<DeletionDataDefinition> Rows { get; }
Property Value
| Type | Description |
|---|---|
| List<DeletionDataDefinition> |
TableName
Gets or sets the name of the table from which data is to be deleted.
Declaration
public string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |