Class SqlCommand
Abstract class, root of all Sql commands in the NetServer OSQL abstraction layer
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public abstract class SqlCommand
Constructors
SqlCommand()
Abstract class, root of all Sql commands in the NetServer OSQL abstraction layer
Declaration
public SqlCommand()
Fields
AdditionalInfo
Additional information to be taken into account when processing the query
Declaration
public Dictionary<string, object> AdditionalInfo
Field Value
Type | Description |
---|---|
Dictionary<string, object> |
Origin
This text is included - if possible - as an SQL comment in the generated SQL statement. It will usually be visible in database tracing tools, and the intention is to make it possible to identify the code that gave created a particular query. This has great "forensic" value when investigating performance or reverse-engineering the system.
Declaration
public string Origin
Field Value
Type | Description |
---|---|
string |
Properties
AutoSentryIgnoredTables
Return an enumerator over the list of tables for which no Auto Sentry will be created. See AddIgnoreAutoSentryTableInfo(TableInfo) for more information.
Declaration
public IEnumerable<TableInfo> AutoSentryIgnoredTables { get; }
Property Value
Type | Description |
---|---|
IEnumerable<TableInfo> |
SqlType
Abstract, Get SqlType
Declaration
public abstract SqlType SqlType { get; }
Property Value
Type | Description |
---|---|
SqlType | The SQL type. |
Methods
AddIgnoreAutoSentryTableInfo(TableInfo)
Add a table info to the list of table infos for which no Auto Sentry will be created
Declaration
public void AddIgnoreAutoSentryTableInfo(TableInfo tableToIgnore)
Parameters
Type | Name | Description |
---|---|---|
TableInfo | tableToIgnore | Table to ignore, must be a member of the query to have any meaning. null is allowed and causes nothing to happen. |
Remarks
The Sentry system will analyze the query and add sentries for any tables that are subject to access restrictions. The sentries may in turn modify/extend the query to ensure correct processing. If you want to inhibit this behaviour on a per-table basis, you can do so by adding table infos to the ignore list here.
AddIgnoreAutoSentryTableInfo(IEnumerable<TableInfo>)
Add a set of table infos to the list of table infos for which no Auto Sentry will be created
Declaration
public void AddIgnoreAutoSentryTableInfo(IEnumerable<TableInfo> tablesToIgnore)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TableInfo> | tablesToIgnore |
Remarks
The Sentry system will analyze the query and add sentries for any tables that are subject to access restrictions. The sentries may in turn modify/extend the query to ensure correct processing. If you want to inhibit this behaviour on a per-table basis, you can do so by adding table infos to the ignore list here.
ClearIgnoreAutoSentryTableInfos()
Clear the list of table infos for which no Auto Sentry will be created. See AddIgnoreAutoSentryTableInfo(TableInfo) for more information.
Declaration
public void ClearIgnoreAutoSentryTableInfos()
GetDeletes()
Get any Delete elements from a BatchSave, or individual command so you don't have to check for BatchSave specifically. Returns an empty sequence if there are none.
Declaration
public virtual IEnumerable<Delete> GetDeletes()
Returns
Type | Description |
---|---|
IEnumerable<Delete> |
GetInserts()
Get any Insert elements from a BatchSave, or individual command so you don't have to check for BatchSave specifically. Returns an empty sequence if there are none.
Declaration
public virtual IEnumerable<Insert> GetInserts()
Returns
Type | Description |
---|---|
IEnumerable<Insert> |
GetPrivateSaves()
Get the PrivateSave members of a BatchSave
Declaration
public virtual IEnumerable<PrivateSave> GetPrivateSaves()
Returns
Type | Description |
---|---|
IEnumerable<PrivateSave> |
GetSelect()
Get any Select elements from a Union, or individual Select command so you don't have to check for Union specifically. Returns an empty sequence if there are none.
Declaration
public virtual IEnumerable<Select> GetSelect()
Returns
Type | Description |
---|---|
IEnumerable<Select> |
GetTableInfos()
Obtain a list of all tables involved in the query.
Declaration
public abstract TableInfo[] GetTableInfos()
Returns
Type | Description |
---|---|
TableInfo[] | List of all tables involved in the query. |
GetUpdates()
Get any Update elements from a BatchSave, or individual command so you don't have to check for BatchSave specifically. Returns an empty sequence if there are none.
Declaration
public virtual IEnumerable<Update> GetUpdates()
Returns
Type | Description |
---|---|
IEnumerable<Update> |
IsAutoSentryIgnoredOnTableInfo(TableInfo)
Check if the given table info is in the ignore list. See AddIgnoreAutoSentryTableInfo(TableInfo) for more information.
Declaration
public bool IsAutoSentryIgnoredOnTableInfo(TableInfo tableInfoToCheck)
Parameters
Type | Name | Description |
---|---|---|
TableInfo | tableInfoToCheck | Table info to check |
Returns
Type | Description |
---|---|
bool | true if the given table info is in the ignore list |
RemoveIgnoreAutoSentryTableInfo(TableInfo)
Remove a table info from the list of tables infos for which no Auto Sentry will be created. See AddIgnoreAutoSentryTableInfo(TableInfo) for more information.
Declaration
public bool RemoveIgnoreAutoSentryTableInfo(TableInfo tableToNotIgnoreAnyMore)
Parameters
Type | Name | Description |
---|---|---|
TableInfo | tableToNotIgnoreAnyMore | Table info to be removed from the ignore list. Nonexistent table infos and null are allowed, and cause nothing to happen. |
Returns
Type | Description |
---|---|
bool | true if the table info was in the list and was removed, otherwise false |