SchemaColumn

Ecng.Serialization

Represents a single column in a database schema.

Implementa: IEquatable<SchemaColumn>

Propriedades

ClrType
public Type ClrType { get; set; }
value = schemaColumn.ClrType
schemaColumn.ClrType = value

Gets the CLR type of the column value.

Indexes
public IReadOnlyList<SchemaColumnIndex> Indexes { get; set; }
value = schemaColumn.Indexes
schemaColumn.Indexes = value

All [Index] participations declared on this column. Each entry pairs the optional composite-index name ( = own single-column index named IX_{Table}_{Column}) with the column's position inside that composite. A column may carry multiple [Index] attributes — e.g. its own standalone index plus the leading slot of two different named composites — and every entry here drives a distinct CREATE INDEX.

IsIndex
public bool IsIndex { get; set; }
value = schemaColumn.IsIndex
schemaColumn.IsIndex = value

Gets whether the column is indexed.

IsNullable
public bool IsNullable { get; set; }
value = schemaColumn.IsNullable
schemaColumn.IsNullable = value

Gets whether the column allows NULL values.

IsReadOnly
public bool IsReadOnly { get; set; }
value = schemaColumn.IsReadOnly
schemaColumn.IsReadOnly = value

Gets whether the column is read-only (e.g. computed or identity).

IsUnique
public bool IsUnique { get; set; }
value = schemaColumn.IsUnique
schemaColumn.IsUnique = value

Gets whether the column has a unique constraint.

MaxLength
public int MaxLength { get; set; }
value = schemaColumn.MaxLength
schemaColumn.MaxLength = value

Gets the maximum length for string columns (0 = unlimited/MAX).

Name
public string Name { get; set; }
value = schemaColumn.Name
schemaColumn.Name = value

Gets the column name.

Precision
public int Precision { get; set; }
value = schemaColumn.Precision
schemaColumn.Precision = value

Gets the numeric precision for decimal/numeric columns, or the fractional-second digits for date/time columns (0 = dialect default).

ReferencedEntityType
public Type ReferencedEntityType { get; set; }
value = schemaColumn.ReferencedEntityType
schemaColumn.ReferencedEntityType = value

Gets the referenced entity CLR type if this column is a foreign key, or null. The target table name and PK column are resolved from the referenced entity's schema.

Scale
public int Scale { get; set; }
value = schemaColumn.Scale
schemaColumn.Scale = value

Gets the numeric scale for decimal/numeric columns; see Scale.