Class InformationSchema.Routine
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
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.
[Table(Schema = "INFORMATION_SCHEMA", Name = "ROUTINES", IsView = true)]
public class InformationSchema.Routine
- Inheritance
-
InformationSchema.Routine
- Extension Methods
Properties
CharacterMaximumLength
Maximum length in characters, if the return type is a character type.
-1 for xml and large-value type data.
[Column("CHARACTER_MAXIMUM_LENGTH")]
[Nullable]
public int? CharacterMaximumLength { get; set; }
Property Value
- int?
CharacterOctetLength
Maximum length in bytes, if the return type is a character type.
-1 for xml and large-value type data.
[Column("CHARACTER_OCTET_LENGTH")]
[Nullable]
public int? CharacterOctetLength { get; set; }
Property Value
- int?
CharacterSetCatalog
Always returns NULL.
[Column("CHARACTER_SET_CATALOG")]
[Nullable]
public string? CharacterSetCatalog { get; set; }
Property Value
CharacterSetName
Name of the character set of the return value. For noncharacter types, returns NULL.
[Column("CHARACTER_SET_NAME")]
[Nullable]
public string? CharacterSetName { get; set; }
Property Value
CharacterSetSchema
Always returns NULL.
[Column("CHARACTER_SET_SCHEMA")]
[Nullable]
public string? CharacterSetSchema { get; set; }
Property Value
CollationCatalog
Always returns NULL.
[Column("COLLATION_CATALOG")]
[Nullable]
public string? CollationCatalog { get; set; }
Property Value
CollationName
Collation name of the return value. For noncharacter types, returns NULL.
[Column("COLLATION_NAME")]
[Nullable]
public string? CollationName { get; set; }
Property Value
CollationSchema
Always returns NULL.
[Column("COLLATION_SCHEMA")]
[Nullable]
public string? CollationSchema { get; set; }
Property Value
Created
Time when the routine was created.
[Column("CREATED")]
[NotNull]
public DateTime Created { get; set; }
Property Value
DataType
Data type of the return value of the function. Returns table if a table-valued function.
[Column("DATA_TYPE")]
[Nullable]
public string? DataType { get; set; }
Property Value
DatetimePrecision
Fractional precision of a second if the return value is of type datetime. Otherwise, returns NULL.
[Column("DATETIME_PRECISION")]
[Nullable]
public short? DatetimePrecision { get; set; }
Property Value
DtdIdentifier
NULL. Reserved for future use.
[Column("DTD_IDENTIFIER")]
[Nullable]
public string? DtdIdentifier { get; set; }
Property Value
ExternalLanguage
NULL. Reserved for future use.
[Column("EXTERNAL_LANGUAGE")]
[Nullable]
public string? ExternalLanguage { get; set; }
Property Value
ExternalName
NULL. Reserved for future use.
[Column("EXTERNAL_NAME")]
[Nullable]
public string? ExternalName { get; set; }
Property Value
IntervalPrecision
NULL. Reserved for future use.
[Column("INTERVAL_PRECISION")]
[Nullable]
public short? IntervalPrecision { get; set; }
Property Value
IntervalType
NULL. Reserved for future use.
[Column("INTERVAL_TYPE")]
[Nullable]
public string? IntervalType { get; set; }
Property Value
IsDeterministic
Returns YES if the routine is deterministic.
Returns NO if the routine is nondeterministic.
Always returns NO for stored procedures.
[Column("IS_DETERMINISTIC")]
[Nullable]
public string? IsDeterministic { get; set; }
Property Value
IsImplicitlyInvocable
Returns YES if the routine can be implicitly invoked, and NO if function cannot be implicitly invoked.
Always returns NO.
[Column("IS_IMPLICITLY_INVOCABLE")]
[Nullable]
public string? IsImplicitlyInvocable { get; set; }
Property Value
IsNullCall
Indicates whether the routine will be called if any one of its arguments is NULL.
[Column("IS_NULL_CALL")]
[Nullable]
public string? IsNullCall { get; set; }
Property Value
IsUserDefinedCast
Returns YES if user-defined cast function, and NO if not a user-defined cast function.
Always returns NO.
[Column("IS_USER_DEFINED_CAST")]
[Nullable]
public string? IsUserDefinedCast { get; set; }
Property Value
LastAltered
The last time the function was modified.
[Column("LAST_ALTERED")]
[NotNull]
public DateTime LastAltered { get; set; }
Property Value
MaxDynamicResultSets
Maximum number of dynamic result sets returned by routine.
Returns 0 if functions.
[Column("MAX_DYNAMIC_RESULT_SETS")]
[Nullable]
public short? MaxDynamicResultSets { get; set; }
Property Value
MaximumCardinality
NULL. Reserved for future use.
[Column("MAXIMUM_CARDINALITY")]
[Nullable]
public long? MaximumCardinality { get; set; }
Property Value
- long?
ModuleCatalog
NULL. Reserved for future use.
[Column("MODULE_CATALOG")]
[Nullable]
public string? ModuleCatalog { get; set; }
Property Value
ModuleName
NULL. Reserved for future use.
[Column("MODULE_NAME")]
[Nullable]
public string? ModuleName { get; set; }
Property Value
ModuleSchema
NULL. Reserved for future use.
[Column("MODULE_SCHEMA")]
[Nullable]
public string? ModuleSchema { get; set; }
Property Value
NumericPrecision
Numeric precision of the return value. For the nonnumeric types, returns NULL.
[Column("NUMERIC_PRECISION")]
[Nullable]
public short? NumericPrecision { get; set; }
Property Value
NumericPrecisionRadix
Numeric precision radix of the return value. For nonnumeric types, returns NULL.
[Column("NUMERIC_PRECISION_RADIX")]
[Nullable]
public short? NumericPrecisionRadix { get; set; }
Property Value
NumericScale
Scale of the return value. For nonnumeric types, returns NULL.
[Column("NUMERIC_SCALE")]
[Nullable]
public short? NumericScale { get; set; }
Property Value
ParameterStyle
NULL. Reserved for future use.
[Column("PARAMETER_STYLE")]
[Nullable]
public string? ParameterStyle { get; set; }
Property Value
RoutineBody
Returns SQL for a Transact-SQL function and EXTERNAL for an externally written function.
Functions will always be SQL.
[Column("ROUTINE_BODY")]
[Nullable]
public string? RoutineBody { get; set; }
Property Value
RoutineCatalog
Catalog name of the function.
[Column("ROUTINE_CATALOG")]
[Nullable]
public string? RoutineCatalog { get; set; }
Property Value
RoutineDefinition
Returns the first 4000 characters of the definition text of the function or stored procedure if the function or stored procedure is not encrypted. Otherwise, returns NULL.
To ensure that you obtain the complete definition, query the OBJECT_DEFINITION function or the definition column in the sys.sql_modules catalog view.
[Column("ROUTINE_DEFINITION")]
[Nullable]
public string? RoutineDefinition { get; set; }
Property Value
RoutineName
Name of the function.
[Column("ROUTINE_NAME")]
[NotNull]
public string RoutineName { get; set; }
Property Value
RoutineSchema
Name of the schema that contains this function.
Important *</strong>* Do not use INFORMATION_SCHEMA views to determine the schema of an object. INFORMATION_SCHEMA views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the sys.objects catalog view.
[Column("ROUTINE_SCHEMA")]
[Nullable]
public string? RoutineSchema { get; set; }
Property Value
RoutineType
Returns PROCEDURE for stored procedures, and FUNCTION for functions.
[Column("ROUTINE_TYPE")]
[Nullable]
public string? RoutineType { get; set; }
Property Value
SchemaLevelRoutine
Returns YES if schema-level function, or NO if not a schema-level function.
Always returns YES.
[Column("SCHEMA_LEVEL_ROUTINE")]
[Nullable]
public string? SchemaLevelRoutine { get; set; }
Property Value
ScopeCatalog
NULL. Reserved for future use.
[Column("SCOPE_CATALOG")]
[Nullable]
public string? ScopeCatalog { get; set; }
Property Value
ScopeName
NULL. Reserved for future use.
[Column("SCOPE_NAME")]
[Nullable]
public string? ScopeName { get; set; }
Property Value
ScopeSchema
NULL. Reserved for future use.
[Column("SCOPE_SCHEMA")]
[Nullable]
public string? ScopeSchema { get; set; }
Property Value
SpecificCatalog
Specific name of the catalog. This name is the same as ROUTINE_CATALOG.
[Column("SPECIFIC_CATALOG")]
[Nullable]
public string? SpecificCatalog { get; set; }
Property Value
SpecificName
Specific name of the catalog. This name is the same as ROUTINE_NAME.
[Column("SPECIFIC_NAME")]
[NotNull]
public string SpecificName { get; set; }
Property Value
SpecificSchema
Specific name of the schema.
Important *</strong>* Do not use INFORMATION_SCHEMA views to determine the schema of an object. INFORMATION_SCHEMA views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the sys.objects catalog view.
[Column("SPECIFIC_SCHEMA")]
[Nullable]
public string? SpecificSchema { get; set; }
Property Value
SqlDataAccess
Returns one of the following values:
NONE = Function does not contain SQL.
CONTAINS = Function possibly contains SQL.
READS = Function possibly reads SQL data.
MODIFIES = Function possibly modifies SQL data.
Returns READS for all functions, and MODIFIES for all stored procedures.
[Column("SQL_DATA_ACCESS")]
[Nullable]
public string? SqlDataAccess { get; set; }
Property Value
SqlPath
NULL. Reserved for future use.
[Column("SQL_PATH")]
[Nullable]
public string? SqlPath { get; set; }
Property Value
TypeUdtCatalog
NULL. Reserved for future use.
[Column("TYPE_UDT_CATALOG")]
[Nullable]
public string? TypeUdtCatalog { get; set; }
Property Value
TypeUdtName
NULL. Reserved for future use.
[Column("TYPE_UDT_NAME")]
[Nullable]
public string? TypeUdtName { get; set; }
Property Value
TypeUdtSchema
NULL. Reserved for future use.
[Column("TYPE_UDT_SCHEMA")]
[Nullable]
public string? TypeUdtSchema { get; set; }
Property Value
UdtCatalog
NULL. Reserved for future use.
[Column("UDT_CATALOG")]
[Nullable]
public string? UdtCatalog { get; set; }
Property Value
UdtName
NULL. Reserved for future use.
[Column("UDT_NAME")]
[Nullable]
public string? UdtName { get; set; }
Property Value
UdtSchema
NULL. Reserved for future use.
[Column("UDT_SCHEMA")]
[Nullable]
public string? UdtSchema { get; set; }