Search Results for

    Show / Hide Table of Contents
    View Source

    Class ExecuteSqlStatementExpression

    Represents a migration expression that executes a specified raw SQL statement. This is typically used to perform custom database operations during a migration.

    Inheritance
    object
    MigrationExpressionBase
    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute.Expressions
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class ExecuteSqlStatementExpression : MigrationExpressionBase, IMigrationExpression

    Constructors

    View Source

    ExecuteSqlStatementExpression(IMigrationContext)

    Initializes a new instance of the ExecuteSqlStatementExpression class with the specified migration context.

    Declaration
    public ExecuteSqlStatementExpression(IMigrationContext context)
    Parameters
    Type Name Description
    IMigrationContext context

    The IMigrationContext to use for the migration operation.

    Properties

    View Source

    SqlObject

    Gets or sets the SQL object that represents the SQL statement to be executed.

    Declaration
    public virtual Sql<ISqlContext>? SqlObject { get; set; }
    Property Value
    Type Description
    Sql<ISqlContext>
    View Source

    SqlStatement

    Gets or sets the SQL statement to be executed.

    Declaration
    public virtual string? SqlStatement { get; set; }
    Property Value
    Type Description
    string

    Methods

    View Source

    ExecuteSqlObject()

    Executes the SQL statement encapsulated in the SqlObject property.

    Declaration
    public void ExecuteSqlObject()
    View Source

    GetSql()

    Declaration
    protected override string? GetSql()
    Returns
    Type Description
    string
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX