SchemaColumnIndex
One [Index]-attribute participation of a column — either its own single-column index (when Name is ) or a slot inside a named composite identified by Name. IsUnique is per index: a column may take part in a unique composite and a non-unique single index at the same time, so uniqueness belongs to the participation, not to the column. Condition, when set, makes it a partial (filtered) index — a trailing WHERE whose braced column tokens are quoted per dialect.
Реализует: IEquatable<SchemaColumnIndex>
Конструкторы
public SchemaColumnIndex(string Name, int Order, bool IsUnique, string Condition)
schemaColumnIndex = SchemaColumnIndex(Name, Order, IsUnique, Condition)
One [Index]-attribute participation of a column — either its own single-column index (when Name is ) or a slot inside a named composite identified by Name. IsUnique is per index: a column may take part in a unique composite and a non-unique single index at the same time, so uniqueness belongs to the participation, not to the column. Condition, when set, makes it a partial (filtered) index — a trailing WHERE whose braced column tokens are quoted per dialect.
Методы
public static SchemaColumnIndex From(IndexAttribute attr, string name, int order)
result = SchemaColumnIndex.From(attr, name, order)
Builds one column's participation in the index declared by . Uniqueness and Condition are read off the attribute instance, so a subclass that fills them in its constructor — NonEmptyUniqueAttribute — is honoured without the caller knowing that subclass exists. and stay with the caller: only it knows the table name the auto-generated index name is built from and the column's position in the whole declaration.
- attr
- The declared index attribute.
- name
- Resolved index name, or for the single-column fallback.
- order
- The column's position inside the index.
Возвращает: The participation.