Table of Contents

Class InformationSchema.DataContext

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll
public class InformationSchema.DataContext
Inheritance
InformationSchema.DataContext
Extension Methods

Constructors

DataContext(IDataContext)

public DataContext(IDataContext dataContext)

Parameters

dataContext IDataContext

Properties

CheckConstraints

CHECK_CONSTRAINTS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each CHECK constraint in the current database. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.CHECK_CONSTRAINTS.

public ITable<InformationSchema.CheckConstraint> CheckConstraints { get; }

Property Value

ITable<InformationSchema.CheckConstraint>

ColumnDomainUsages

COLUMN_DOMAIN_USAGE (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each column in the current database that has an alias data type. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.COLUMN_DOMAIN_USAGE.

public ITable<InformationSchema.ColumnDomainUsage> ColumnDomainUsages { get; }

Property Value

ITable<InformationSchema.ColumnDomainUsage>

ColumnPrivileges

COLUMN_PRIVILEGES (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each column that has a privilege that is either granted to or granted by the current user in the current database.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.COLUMN_PRIVILEGES.

public ITable<InformationSchema.ColumnPrivilege> ColumnPrivileges { get; }

Property Value

ITable<InformationSchema.ColumnPrivilege>

Columns

COLUMNS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each column that can be accessed by the current user in the current database.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA_.view_name_.


See INFORMATION_SCHEMA.COLUMNS.

public ITable<InformationSchema.Column> Columns { get; }

Property Value

ITable<InformationSchema.Column>

ConstraintColumnUsages

CONSTRAINT_COLUMN_USAGE (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each column in the current database that has a constraint defined on the column. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE.

public ITable<InformationSchema.ConstraintColumnUsage> ConstraintColumnUsages { get; }

Property Value

ITable<InformationSchema.ConstraintColumnUsage>

ConstraintTableUsages

CONSTRAINT_TABLE_USAGE (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each table in the current database that has a constraint defined on the table. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE.

public ITable<InformationSchema.ConstraintTableUsage> ConstraintTableUsages { get; }

Property Value

ITable<InformationSchema.ConstraintTableUsage>

DomainConstraints

DOMAIN_CONSTRAINTS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each alias data type in the current database that has a rule bound to it and that can be accessed by current user.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS.

public ITable<InformationSchema.DomainConstraint> DomainConstraints { get; }

Property Value

ITable<InformationSchema.DomainConstraint>

Domains

DOMAINS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each alias data type that can be accessed by the current user in the current database.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.DOMAINS.

public ITable<InformationSchema.Domain> Domains { get; }

Property Value

ITable<InformationSchema.Domain>

KeyColumnUsages

KEY_COLUMN_USAGE (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each column that is constrained as a key in the current database. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.KEY_COLUMN_USAGE.

public ITable<InformationSchema.KeyColumnUsage> KeyColumnUsages { get; }

Property Value

ITable<InformationSchema.KeyColumnUsage>

Parameters

PARAMETERS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each parameter of a user-defined function or stored procedure that can be accessed by the current user in the current database. For functions, this view also returns one row with return value information.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.PARAMETERS.

public ITable<InformationSchema.Parameter> Parameters { get; }

Property Value

ITable<InformationSchema.Parameter>

ReferentialConstraints

REFERENTIAL_CONSTRAINTS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each FOREIGN KEY constraint in the current database. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS.

public ITable<InformationSchema.ReferentialConstraint> ReferentialConstraints { get; }

Property Value

ITable<InformationSchema.ReferentialConstraint>

RoutineColumns

ROUTINE_COLUMNS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each column returned by the table-valued functions that can be accessed by the current user in the current database.
To retrieve information from this view, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.ROUTINE_COLUMNS.

public ITable<InformationSchema.RoutineColumn> RoutineColumns { get; }

Property Value

ITable<InformationSchema.RoutineColumn>

Routines

ROUTINES (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each stored procedure and function that can be accessed by the current user in the current database. The columns that describe the return value apply only to functions. For stored procedures, these columns will be NULL.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA.*view_name*.

note


The ROUTINE_DEFINITION column contains the source statements that created the function or stored procedure. These source statements are likely to contain embedded carriage returns. If you are returning this column to an application that displays the results in a text format, the embedded carriage returns in the ROUTINE_DEFINITION results may affect the formatting of the overall result set. If you select the ROUTINE_DEFINITION column, you must adjust for the embedded carriage returns; for example, by returning the result set into a grid or returning ROUTINE_DEFINITION into its own text box.


See INFORMATION_SCHEMA.ROUTINES.

public ITable<InformationSchema.Routine> Routines { get; }

Property Value

ITable<InformationSchema.Routine>

Schemata

SCHEMATA (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each schema in the current database. To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_. To retrieve information about all databases in an instance of SQL Server, query the sys.databases (Transact-SQL) catalog view.


See INFORMATION_SCHEMA.SCHEMATA.

public ITable<InformationSchema.Schema> Schemata { get; }

Property Value

ITable<InformationSchema.Schema>

TableConstraints

TABLE_CONSTRAINTS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each table constraint in the current database. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.TABLE_CONSTRAINTS.

public ITable<InformationSchema.TableConstraint> TableConstraints { get; }

Property Value

ITable<InformationSchema.TableConstraint>

TablePrivileges

TABLE_PRIVILEGES (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each table privilege that is granted to or granted by the current user in the current database.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.TABLE_PRIVILEGES.

public ITable<InformationSchema.TablePrivilege> TablePrivileges { get; }

Property Value

ITable<InformationSchema.TablePrivilege>

Tables

TABLES (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each table or view in the current database for which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.TABLES.

public ITable<InformationSchema.Table> Tables { get; }

Property Value

ITable<InformationSchema.Table>

ViewColumnUsages

VIEW_COLUMN_USAGE (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each column in the current database that is used in a view definition. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.VIEW_COLUMN_USAGE.

public ITable<InformationSchema.ViewColumnUsage> ViewColumnUsages { get; }

Property Value

ITable<InformationSchema.ViewColumnUsage>

ViewTableUsages

VIEW_TABLE_USAGE (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each table in the current database that is used in a view. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.VIEW_TABLE_USAGE.

public ITable<InformationSchema.ViewTableUsage> ViewTableUsages { get; }

Property Value

ITable<InformationSchema.ViewTableUsage>

Views

VIEWS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for views that can be accessed by the current user in the current database.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.VIEWS.

public ITable<InformationSchema.View> Views { get; }

Property Value

ITable<InformationSchema.View>