Search Results for

    Show / Hide Table of Contents
    View Source

    Class ConstraintDefinition

    Represents the definition of a database constraint, such as a primary key, foreign key, or unique constraint, used within the persistence layer.

    Inheritance
    object
    Namespace: Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class ConstraintDefinition

    Constructors

    View Source

    ConstraintDefinition(ConstraintType)

    Initializes a new instance of the ConstraintDefinition class using the specified constraint type.

    Declaration
    public ConstraintDefinition(ConstraintType type)
    Parameters
    Type Name Description
    ConstraintType type

    The constraint type.

    Fields

    View Source

    Columns

    Declaration
    public ICollection<string?> Columns
    Field Value
    Type Description
    ICollection<string>

    Properties

    View Source

    ConstraintName

    Gets or sets the name of the database constraint associated with this definition.

    Declaration
    public string? ConstraintName { get; set; }
    Property Value
    Type Description
    string
    View Source

    IsNonUniqueConstraint

    Gets a value indicating whether this constraint is non-unique.

    Declaration
    public bool IsNonUniqueConstraint { get; }
    Property Value
    Type Description
    bool
    View Source

    IsPrimaryKeyClustered

    Gets or sets a value indicating whether the primary key constraint is clustered on the table. If true, the primary key is implemented as a clustered index; otherwise, it is non-clustered.

    Declaration
    public bool IsPrimaryKeyClustered { get; set; }
    Property Value
    Type Description
    bool
    View Source

    IsPrimaryKeyConstraint

    Gets a value indicating whether this constraint is a primary key constraint.

    Declaration
    public bool IsPrimaryKeyConstraint { get; }
    Property Value
    Type Description
    bool
    View Source

    IsUniqueConstraint

    Gets a value indicating whether this constraint is a unique constraint.

    Declaration
    public bool IsUniqueConstraint { get; }
    Property Value
    Type Description
    bool
    View Source

    SchemaName

    Gets or sets the schema name associated with the constraint.

    Declaration
    public string? SchemaName { get; set; }
    Property Value
    Type Description
    string
    View Source

    TableName

    Gets or sets the name of the table associated with the constraint.

    Declaration
    public string? TableName { get; set; }
    Property Value
    Type Description
    string
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX