x4Trace Documentation v1.0
Loading...
Searching...
No Matches
Ix4Trace.Engine.SQLGroupCommand Class Reference

Represents a command list of SQL. This makes one execution of all commands. Only update/insert is available. More...

Inheritance diagram for Ix4Trace.Engine.SQLGroupCommand:
Ix4Trace.Engine.Database.ISQL

Public Member Functions

 SQLGroupCommand (Controller controller)
 Constructor.
 
override Database.SQLDataTable Select (string select)
 Do not use!
 
override Database.SQLDataTable Select (string select, string[] names, object[] objects)
 Do not use!
 
override string DDL (string ddl)
 Executes SQL command. Adds the command to buffer.
 
override string DDL (string ddl, string[] names, object[] values)
 Executes SQL command. Adds the command to buffer.
 
void Send ()
 Sends all message. Executes all buffered command.
 
void SaveCommandsToXML (string fileName)
 Saves the commands to XML.
 
void LoadCommandsFromXML (string fileName)
 Loads the command list from XML.
 
string GetTempTableName (string name)
 Returns a temporary table name of this connection. Temporary tables will be deleted when the connection is closed.
 
void OnDatabaseRecordLocked (Entity.Entity obj, ISQL sqlConnection, string tableName, string pKey)
 Fires DatabaseRecordLocked event.
 
void OnDatabaseRecordUnLocked (Entity.Entity obj, ISQL sqlConnection, string tableName, string pKey)
 Fires DatabaseRecordUnLocked event.
 
void OnDatabaseRecordInserted (Entity.Entity obj, ISQL sqlConnection, string tableName, string pKey)
 Fires DatabaseRecordInserted event.
 
void OnDatabaseRecordUpdated (Entity.Entity obj, ISQL sqlConnection, string tableName, string pKey)
 Fires DatabaseRecordUpdated event.
 
List< T > SelectGenericList< T > (string select)
 Executes a selection and create list of entities.
 
List< T > SelectGenericList< T > (string select, string[] names, object[] objects)
 Executes a selection and create list of entities.
 
List< Entity.Entity > SelectEntityList< T > (string select)
 Executes a selection and create list of entities.
 
List< Entity.Entity > SelectEntityList< T > (string select, string[] names, object[] objects)
 Executes a selection and create list of entities.
 
Dictionary< string, T > SelectDictionaryByKey< T > (string select)
 Executes a selection and create dictonary of entities.
 
Dictionary< string, T > SelectDictionaryByKey< T > (string select, string[] names, object[] objects)
 Executes a selection and create dictonary of entities.
 

Static Public Member Functions

static Dictionary< string, T > ListToDictionaryByKey< T > (List< T > entities)
 

Public Attributes

int lockUserID = 0
 ID of user flor record lock.
 
string lockUserName = ""
 Name of user for record lock.
 
string lockIPAddress = ""
 IP address for record lock.
 

Protected Attributes

int connectionID = 0
 ID of network connection.
 

Properties

int ConnectionID [get, set]
 ID of network connection.
 

Events

DatabaseRecordLocked DatabaseRecordLocked
 Record locked event.
 
DatabaseRecordUnLocked DatabaseRecordUnLocked
 Record unlocked event.
 
DatabaseRecordInserted DatabaseRecordInserted
 Record inserted event.
 
DatabaseRecordUpdated DatabaseRecordUpdated
 Record updated event.
 

Private Attributes

Controller controller
 Controller.
 
List< Ix4Trace.Messages.SQLQuery > commands = new List<Messages.SQLQuery>()
 List of command messages.
 

Detailed Description

Represents a command list of SQL. This makes one execution of all commands. Only update/insert is available.

Constructor & Destructor Documentation

◆ SQLGroupCommand()

Ix4Trace.Engine.SQLGroupCommand.SQLGroupCommand ( Controller controller)

Constructor.

Parameters
controllerController.

Member Function Documentation

◆ DDL() [1/2]

override string Ix4Trace.Engine.SQLGroupCommand.DDL ( string ddl)

Executes SQL command. Adds the command to buffer.

Parameters
ddlCommand of SQL.
Returns
Result.

◆ DDL() [2/2]

override string Ix4Trace.Engine.SQLGroupCommand.DDL ( string ddl,
string[] names,
object[] values )

Executes SQL command. Adds the command to buffer.

Parameters
ddlCommand of SQL.
namesName of variables.
valuesValues of variables.
Returns
Result.

◆ GetTempTableName()

string Ix4Trace.Engine.Database.ISQL.GetTempTableName ( string name)
inherited

Returns a temporary table name of this connection. Temporary tables will be deleted when the connection is closed.

Parameters
nameName of table.
Returns
Temporary table name.

◆ ListToDictionaryByKey< T >()

static Dictionary< string, T > Ix4Trace.Engine.Database.ISQL.ListToDictionaryByKey< T > ( List< T > entities)
staticinherited
Type Constraints
T :Entity.Entity 

◆ LoadCommandsFromXML()

void Ix4Trace.Engine.SQLGroupCommand.LoadCommandsFromXML ( string fileName)

Loads the command list from XML.

Parameters
fileNameName of XML file.

◆ OnDatabaseRecordInserted()

void Ix4Trace.Engine.Database.ISQL.OnDatabaseRecordInserted ( Entity.Entity obj,
ISQL sqlConnection,
string tableName,
string pKey )
inherited

Fires DatabaseRecordInserted event.

Parameters
objEntity to lock.
sqlConnectionConnection.
tableNameName of thable.
pKeyKey of table.

◆ OnDatabaseRecordLocked()

void Ix4Trace.Engine.Database.ISQL.OnDatabaseRecordLocked ( Entity.Entity obj,
ISQL sqlConnection,
string tableName,
string pKey )
inherited

Fires DatabaseRecordLocked event.

Parameters
objEntity to lock.
sqlConnectionConnection.
tableNameName of thable.
pKeyKey of table.

◆ OnDatabaseRecordUnLocked()

void Ix4Trace.Engine.Database.ISQL.OnDatabaseRecordUnLocked ( Entity.Entity obj,
ISQL sqlConnection,
string tableName,
string pKey )
inherited

Fires DatabaseRecordUnLocked event.

Parameters
objEntity to lock.
sqlConnectionConnection.
tableNameName of thable.
pKeyKey of table.

◆ OnDatabaseRecordUpdated()

void Ix4Trace.Engine.Database.ISQL.OnDatabaseRecordUpdated ( Entity.Entity obj,
ISQL sqlConnection,
string tableName,
string pKey )
inherited

Fires DatabaseRecordUpdated event.

Parameters
objEntity to lock.
sqlConnectionConnection.
tableNameName of thable.
pKeyKey of table.

◆ SaveCommandsToXML()

void Ix4Trace.Engine.SQLGroupCommand.SaveCommandsToXML ( string fileName)

Saves the commands to XML.

Parameters
fileNamename of the xml file.

◆ Select() [1/2]

override Database.SQLDataTable Ix4Trace.Engine.SQLGroupCommand.Select ( string select)

Do not use!

Parameters
selectSelect query.
Returns
Table.

◆ Select() [2/2]

override Database.SQLDataTable Ix4Trace.Engine.SQLGroupCommand.Select ( string select,
string[] names,
object[] objects )

Do not use!

Parameters
selectSelect query.
namesName of variables.
objectsValues of variables.
Returns
Table.

◆ SelectDictionaryByKey< T >() [1/2]

Dictionary< string, T > Ix4Trace.Engine.Database.ISQL.SelectDictionaryByKey< T > ( string select)
inherited

Executes a selection and create dictonary of entities.

Template Parameters
TType of entity.
Parameters
selectCommand.
Returns
The dictionary of entities.
Type Constraints
T :Entity.Entity 

◆ SelectDictionaryByKey< T >() [2/2]

Dictionary< string, T > Ix4Trace.Engine.Database.ISQL.SelectDictionaryByKey< T > ( string select,
string[] names,
object[] objects )
inherited

Executes a selection and create dictonary of entities.

Template Parameters
TType of entity.
Parameters
selectCommand.
namesName of parameters.
objectsValue of parameters.
Returns
The dictionary of entities.
Type Constraints
T :Entity.Entity 

◆ SelectEntityList< T >() [1/2]

List< Entity.Entity > Ix4Trace.Engine.Database.ISQL.SelectEntityList< T > ( string select)
inherited

Executes a selection and create list of entities.

Template Parameters
TType of entity.
Parameters
selectCommand.
Returns
The list of entities.
Type Constraints
T :Entity.Entity 

◆ SelectEntityList< T >() [2/2]

List< Entity.Entity > Ix4Trace.Engine.Database.ISQL.SelectEntityList< T > ( string select,
string[] names,
object[] objects )
inherited

Executes a selection and create list of entities.

Template Parameters
TType of entity.
Parameters
selectCommand.
namesName of parameters.
objectsValue of parameters.
Returns
The list of entities.
Type Constraints
T :Entity.Entity 

◆ SelectGenericList< T >() [1/2]

List< T > Ix4Trace.Engine.Database.ISQL.SelectGenericList< T > ( string select)
inherited

Executes a selection and create list of entities.

Template Parameters
TType of entity.
Parameters
selectCommand.
Returns
The list of entities.
Type Constraints
T :Entity.Entity 

◆ SelectGenericList< T >() [2/2]

List< T > Ix4Trace.Engine.Database.ISQL.SelectGenericList< T > ( string select,
string[] names,
object[] objects )
inherited

Executes a selection and create list of entities.

Template Parameters
TType of entity.
Parameters
selectCommand.
namesName of parameters.
objectsValue of parameters.
Returns
The list of entities.
Type Constraints
T :Entity.Entity 

The documentation for this class was generated from the following file: