Class PrimaryKey

Namespace
DbExport.Schema
Assembly
DbExport.Api.dll

Represents the primary key of a database table. A primary key uniquely identifies each record in the table and enforces entity integrity within the database schema.

public class PrimaryKey : Key, IVisitorAcceptor, ICheckable
Inheritance
PrimaryKey
Implements
Inherited Members

Constructors

PrimaryKey(Table, string, IEnumerable<string>)

Initializes a new instance of the PrimaryKey class.

public PrimaryKey(Table table, string name, IEnumerable<string> columnNames)

Parameters

table Table

The table that owns the primary key.

name string

The name of the primary key constraint.

columnNames IEnumerable<string>

The names of the columns that make up the primary key.

Properties

IsComputed

Gets a value indicating whether the primary key is computed.

public bool IsComputed { get; }

Property Value

bool

IsIdentity

Gets a value indicating whether the primary key is an identity column.

public bool IsIdentity { get; }

Property Value

bool

Methods

AcceptVisitor(IVisitor)

Accepts a visitor, allowing it to perform operations on the implementing class. The visitor will typically have specific methods for handling different types of elements in the object structure.

public override void AcceptVisitor(IVisitor visitor)

Parameters

visitor IVisitor

The visitor instance that will perform operations on the implementing class.