Class ObjectSchema.ComputedColumn
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.computed_columns (Transact-SQL)
Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)
Contains a row for each column found in sys.columns that is a computed-column.
See sys.computed_columns.
[Table(Schema = "sys", Name = "computed_columns", IsView = true)]
public class ObjectSchema.ComputedColumn
- Inheritance
-
ObjectSchema.ComputedColumn
- Extension Methods
Properties
CollationName
Name of the collation of the column if character-based; otherwise NULL
.
[Column("collation_name")]
[Nullable]
public string? CollationName { get; set; }
Property Value
ColumnEncryptionKeyDatabaseName
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
The name of the database where the column encryption key exists if different than the database of the column. NULL
if the key exists in the same database as the column.
[Column("column_encryption_key_database_name")]
[Nullable]
public string? ColumnEncryptionKeyDatabaseName { get; set; }
Property Value
ColumnEncryptionKeyID
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
ID of the CEK.
[Column("column_encryption_key_id")]
[Nullable]
public int? ColumnEncryptionKeyID { get; set; }
Property Value
- int?
ColumnID
ID of the column. Is unique within the object.
Column IDs might not be sequential.
[Column("column_id")]
[NotNull]
public int ColumnID { get; set; }
Property Value
DefaultObjectID
ID of the default object, regardless of whether it is a stand-alone object sys.sp_bindefault, or an inline, column-level DEFAULT constraint. The parent_object_id column of an inline column-level default object is a reference back to the table itself.
0 = No default.
[Column("default_object_id")]
[NotNull]
public int DefaultObjectID { get; set; }
Property Value
Definition
SQL text that defines this computed-column.
[Column("definition")]
[Nullable]
public string? Definition { get; set; }
Property Value
EncryptionAlgorithmName
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
Name of encryption algorithm.
Only AEAD_AES_256_CBC_HMAC_SHA_512 is supported.
[Column("encryption_algorithm_name")]
[Nullable]
public string? EncryptionAlgorithmName { get; set; }
Property Value
EncryptionType
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
Encryption type:
1 = Deterministic encryption
2 = Randomized encryption
[Column("encryption_type")]
[Nullable]
public int? EncryptionType { get; set; }
Property Value
- int?
EncryptionTypeDesc
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
Encryption type description:
RANDOMIZED
DETERMINISTIC
[Column("encryption_type_desc")]
[Nullable]
public string? EncryptionTypeDesc { get; set; }
Property Value
GeneratedAlwaysType
Applies to: SQL Server 2016 (13.x) and later, SQL Database. 7, 8, 9, 10 only applies to SQL Database.
Identifies when the column value is generated (will always be 0 for columns in system tables):
0 = NOT_APPLICABLE
1 = AS_ROW_START
2 = AS_ROW_END
7 = AS_TRANSACTION_ID_START
8 = AS_TRANSACTION_ID_END
9 = AS_SEQUENCE_NUMBER_START
10 = AS_SEQUENCE_NUMBER_END
For more information, see Temporal Tables (Relational databases).
[Column("generated_always_type")]
[Nullable]
public byte? GeneratedAlwaysType { get; set; }
Property Value
- byte?
GeneratedAlwaysTypeDesc
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
Textual description of generated_always_type
's value (always NOT_APPLICABLE for columns in system tables)
NOT_APPLICABLE
AS_ROW_START
AS_ROW_END
Applies to: SQL Database
AS_TRANSACTION_ID_START
AS_TRANSACTION_ID_END
AS_SEQUENCE_NUMBER_START
AS_SEQUENCE_NUMBER_END
[Column("generated_always_type_desc")]
[Nullable]
public string? GeneratedAlwaysTypeDesc { get; set; }
Property Value
GraphType
Internal column with a set of values. The values are between 1-8 for graph columns and NULL
for others.
[Column("graph_type")]
[Nullable]
public int? GraphType { get; set; }
Property Value
- int?
GraphTypeDesc
internal column with a set of values
[Column("graph_type_desc")]
[Nullable]
public string? GraphTypeDesc { get; set; }
Property Value
IsAnsiPadded
1 = Column uses ANSI_PADDING ON behavior if character, binary, or variant.
0 = Column is not character, binary, or variant.
[Column("is_ansi_padded")]
[NotNull]
public bool IsAnsiPadded { get; set; }
Property Value
IsColumnSet
1 = Column is a column set. For more information, see Use Sparse Columns.
[Column("is_column_set")]
[NotNull]
public bool IsColumnSet { get; set; }
Property Value
IsComputed
1 = Column is a computed column.
[Column("is_computed")]
[NotNull]
public bool IsComputed { get; set; }
Property Value
IsDataDeletionFilterColumn
Applies to: Azure SQL Database Edge. Indicates if the column is the data retention filter column for the table.
[Column("is_data_deletion_filter_column")]
[NotNull]
public bool IsDataDeletionFilterColumn { get; set; }
Property Value
IsDtsReplicated
1 = Column is replicated by using SSIS.
[Column("is_dts_replicated")]
[Nullable]
public bool? IsDtsReplicated { get; set; }
Property Value
- bool?
IsFilestream
1 = Column is a FILESTREAM column.
[Column("is_filestream")]
[NotNull]
public bool IsFilestream { get; set; }
Property Value
IsHidden
Applies to: SQL Server 2019 (15.x) and later, SQL Database.
Indicates if the column is hidden:
0 = regular, not-hidden, visible column
1 = hidden column
[Column("is_hidden")]
[NotNull]
public bool IsHidden { get; set; }
Property Value
IsIdentity
1 = Column has identity values
[Column("is_identity")]
[NotNull]
public bool IsIdentity { get; set; }
Property Value
IsMasked
Applies to: SQL Server 2019 (15.x) and later, SQL Database.
Indicates if the column is masked by a dynamic data masking:
0 = regular, not-masked column
1 = column is masked
[Column("is_masked")]
[NotNull]
public bool IsMasked { get; set; }
Property Value
IsMergePublished
1 = Column is merge-published.
[Column("is_merge_published")]
[Nullable]
public bool? IsMergePublished { get; set; }
Property Value
- bool?
IsNonSqlSubscribed
1 = Column has a non-SQL Server subscriber.
[Column("is_non_sql_subscribed")]
[Nullable]
public bool? IsNonSqlSubscribed { get; set; }
Property Value
- bool?
IsNullable
1 = Column is nullable.
[Column("is_nullable")]
[Nullable]
public bool? IsNullable { get; set; }
Property Value
- bool?
IsPersisted
Computed column is persisted.
[Column("is_persisted")]
[NotNull]
public bool IsPersisted { get; set; }
Property Value
IsReplicated
1 = Column is replicated.
[Column("is_replicated")]
[Nullable]
public bool? IsReplicated { get; set; }
Property Value
- bool?
IsRowGuidCol
1 = Column is a declared ROWGUIDCOL.
[Column("is_rowguidcol")]
[NotNull]
public bool IsRowGuidCol { get; set; }
Property Value
IsSparse
1 = Column is a sparse column. For more information, see Use Sparse Columns.
[Column("is_sparse")]
[NotNull]
public bool IsSparse { get; set; }
Property Value
IsXmlDocument
1 = Content is a complete XML document.
0 = Content is a document fragment or the column data type is not xml.
[Column("is_xml_document")]
[NotNull]
public bool IsXmlDocument { get; set; }
Property Value
LedgerViewColumnType
Applies to: SQL Database.
If not NULL, indicates the type of a column in a ledger view:
1 = TRANSACTION_ID
2 = SEQUENCE_NUMBER
3 = OPERATION_TYPE
4 = OPERATION_TYPE_DESC
For more information on database ledger, see Azure SQL Database ledger.
[Column("ledger_view_column_type")]
[NotNull]
public byte LedgerViewColumnType { get; set; }
Property Value
LedgerViewColumnTypeDesc
Applies to: SQL Database.
If not NULL, contains a textual description of the the type of a column in a ledger view:
TRANSACTION_ID
SEQUENCE_NUMBER
OPERATION_TYPE
OPERATION_TYPE_DESC
[Column("ledger_view_column_type_desc")]
[NotNull]
public string LedgerViewColumnTypeDesc { get; set; }
Property Value
MaxLength
Maximum length (in bytes) of the column.
-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml.
For text, ntext, and image columns, the max_length value will be 16 (representing the 16-byte pointer only) or the value set by sp_tableoption 'text in row'.
[Column("max_length")]
[NotNull]
public short MaxLength { get; set; }
Property Value
Name
Name of the column. Is unique within the object.
[Column("name")]
[Nullable]
public string? Name { get; set; }
Property Value
Object
objects (sys.objects)
[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.Object Object { get; set; }
Property Value
ObjectID
ID of the object to which this column belongs.
[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }
Property Value
Precision
Precision of the column if numeric-based; otherwise, 0.
[Column("precision")]
[NotNull]
public byte Precision { get; set; }
Property Value
RuleObjectID
ID of the stand-alone rule bound to the column by using sys.sp_bindrule.
0 = No stand-alone rule. For column-level CHECK constraints, see sys.check_constraints (Transact-SQL).
[Column("rule_object_id")]
[NotNull]
public int RuleObjectID { get; set; }
Property Value
Scale
Scale of column if numeric-based; otherwise, 0.
[Column("scale")]
[NotNull]
public byte Scale { get; set; }
Property Value
SystemTypeID
ID of the system type of the column.
[Column("system_type_id")]
[NotNull]
public byte SystemTypeID { get; set; }
Property Value
UserTypeID
ID of the type of the column as defined by the user.
To return the name of the type, join to the sys.types catalog view on this column.
[Column("user_type_id")]
[NotNull]
public int UserTypeID { get; set; }
Property Value
UsesDatabaseCollation
1 = The column definition depends on the default collation of the database for correct evaluation; otherwise, 0. Such a dependency prevents changing the database default collation.
[Column("uses_database_collation")]
[NotNull]
public bool UsesDatabaseCollation { get; set; }
Property Value
XmlCollectionID
Nonzero if the data type of the column is xml and the XML is typed. The value will be the ID of the collection containing the validating XML schema namespace of the column.
0 = No XML schema collection.
[Column("xml_collection_id")]
[NotNull]
public int XmlCollectionID { get; set; }