Public Member Functions | |
Clear () | |
Clears Processor contents and all parsed statements. | |
Execute () | |
Executes a parsed SQL Processor. | |
LoadFromFile (const string FileName) | |
Loads a SQL Processor from the local file. | |
LoadFromStream (TStream Stream) | |
Loads a SQL Processor from the stream. | |
TParam | ParamByName (const string Value) |
Gets a SQL parameter by its name. | |
Parse () | |
Parses the loaded SQL Processor. | |
TZSQLProcessor (TComponent AOwner) | |
Creates this Processor component and assignes the main properties. | |
~TZSQLProcessor () | |
Destroys this component and cleanups the memory. | |
Public Attributes | |
TZProcessorNotifyEvent | AfterExecute |
TZProcessorNotifyEvent | BeforeExecute |
Boolean | CleanupStatements |
TZConnection | Connection |
string | Delimiter |
TZDelimiterType | DelimiterType |
TZProcessorErrorEvent | OnError |
Boolean | ParamCheck |
TParams | Params |
TStrings | Script |
Integer | StatementCount |
string | Statements |
Protected Member Functions | |
CheckConnected () | |
Checks is the database connection assignes and tries to connect. | |
IZPreparedStatement | CreateStatement (const string SQL, TStrings Properties) |
Creates a DBC statement for the query. | |
DoAfterExecute (Integer StatementIndex) | |
Performs an action action execute a statement. | |
DoBeforeExecute (Integer StatementIndex) | |
Performs an action before execute a statement. | |
TZErrorHandleAction | DoOnError (Integer StatementIndex, Exception E) |
Performs OnError Event and returns an error handle action. | |
SetStatementParams (IZPreparedStatement Statement, const TStringDynArray ParamNames, TParams Params) | |
Fill prepared statement with parameters. | |
Private Member Functions | |
Boolean | GetCleanupStatements () |
string | GetDelimiter () |
Gets a script delimiter;. | |
TZDelimiterType | GetDelimiterType () |
Gets a script delimiter type;. | |
Boolean | GetParamCheck () |
Gets a parameters check value. | |
TStrings | GetScript () |
Gets the SQL script. | |
string | GetStatement (Integer Index) |
Gets a parsed statement by it's index. | |
Integer | GetStatementCount () |
Gets a statements count. | |
SetCleanupStatements (const Boolean Value) | |
SetConnection (TZConnection Value) | |
Sets a new SQL connection component. | |
SetDelimiter (const string Value) | |
Sets a new Processor delimiter. | |
SetDelimiterType (TZDelimiterType Value) | |
Sets a new Processor delimiter type. | |
SetParamCheck (Boolean Value) | |
Sets a new parameters check value. | |
SetParams (TParams Value) | |
Sets a new set of parameters. | |
SetScript (TStrings Value) | |
Sets a new SQL script. | |
UpdateSQLStrings (TObject Sender) | |
Updates parameters from SQL statement. | |
Private Attributes | |
TZProcessorNotifyEvent | FAfterExecute |
TZProcessorNotifyEvent | FBeforeExecute |
TZConnection | FConnection |
TZProcessorErrorEvent | FOnError |
TParams | FParams |
TZSQLStrings | FScript |
TZSQLScriptParser | FScriptParser |
Definition at line 97 of file ZSqlProcessor.pas.
TZSQLProcessor::TZSQLProcessor | ( | TComponent | AOwner | ) |
Creates this Processor component and assignes the main properties.
AOwner | an owner component. |
Definition at line 290 of file ZSqlProcessor.pas.
TZSQLProcessor::~TZSQLProcessor | ( | ) |
TZSQLProcessor::CheckConnected | ( | ) | [protected] |
Checks is the database connection assignes and tries to connect.
Definition at line 449 of file ZSqlProcessor.pas.
TZSQLProcessor::Clear | ( | ) |
Clears Processor contents and all parsed statements.
Definition at line 462 of file ZSqlProcessor.pas.
IZPreparedStatement TZSQLProcessor::CreateStatement | ( | const string | SQL, | |
TStrings | Properties | |||
) | [protected] |
Creates a DBC statement for the query.
SQL | an SQL query. | |
Properties | a statement specific properties. |
Definition at line 638 of file ZSqlProcessor.pas.
TZSQLProcessor::DoAfterExecute | ( | Integer | StatementIndex | ) | [protected] |
Performs an action action execute a statement.
StatementIndex | an index of the executing statement. |
Definition at line 507 of file ZSqlProcessor.pas.
TZSQLProcessor::DoBeforeExecute | ( | Integer | StatementIndex | ) | [protected] |
Performs an action before execute a statement.
StatementIndex | an index of the executing statement. |
Definition at line 493 of file ZSqlProcessor.pas.
TZErrorHandleAction TZSQLProcessor::DoOnError | ( | Integer | StatementIndex, | |
Exception | E | |||
) | [protected] |
Performs OnError Event and returns an error handle action.
StatementIndex | an index of the statement which failt. | |
E | an exception object. |
Definition at line 477 of file ZSqlProcessor.pas.
TZSQLProcessor::Execute | ( | ) |
Boolean TZSQLProcessor::GetCleanupStatements | ( | ) | [private] |
Definition at line 814 of file ZSqlProcessor.pas.
string TZSQLProcessor::GetDelimiter | ( | ) | [private] |
TZDelimiterType TZSQLProcessor::GetDelimiterType | ( | ) | [private] |
Boolean TZSQLProcessor::GetParamCheck | ( | ) | [private] |
Gets a parameters check value.
Definition at line 792 of file ZSqlProcessor.pas.
TStrings TZSQLProcessor::GetScript | ( | ) | [private] |
Gets the SQL script.
Definition at line 749 of file ZSqlProcessor.pas.
string TZSQLProcessor::GetStatement | ( | Integer | Index | ) | [private] |
Gets a parsed statement by it's index.
Definition at line 326 of file ZSqlProcessor.pas.
Integer TZSQLProcessor::GetStatementCount | ( | ) | [private] |
Gets a statements count.
Definition at line 342 of file ZSqlProcessor.pas.
TZSQLProcessor::LoadFromFile | ( | const string | FileName | ) |
Loads a SQL Processor from the local file.
FileName | a name of the file. |
Definition at line 521 of file ZSqlProcessor.pas.
TZSQLProcessor::LoadFromStream | ( | TStream | Stream | ) |
Loads a SQL Processor from the stream.
Stream | a stream object. |
Definition at line 534 of file ZSqlProcessor.pas.
TParam TZSQLProcessor::ParamByName | ( | const string | Value | ) |
Gets a SQL parameter by its name.
Value | a parameter name. |
Definition at line 607 of file ZSqlProcessor.pas.
TZSQLProcessor::Parse | ( | ) |
TZSQLProcessor::SetCleanupStatements | ( | const Boolean | Value | ) | [private] |
Definition at line 822 of file ZSqlProcessor.pas.
TZSQLProcessor::SetConnection | ( | TZConnection | Value | ) | [private] |
Sets a new SQL connection component.
Value | am SQL connection component. |
Definition at line 356 of file ZSqlProcessor.pas.
TZSQLProcessor::SetDelimiter | ( | const string | Value | ) | [private] |
Sets a new Processor delimiter.
Value | a new Processor delimiter. |
Definition at line 408 of file ZSqlProcessor.pas.
TZSQLProcessor::SetDelimiterType | ( | TZDelimiterType | Value | ) | [private] |
Sets a new Processor delimiter type.
Value | a new Processor delimiter type. |
Definition at line 382 of file ZSqlProcessor.pas.
TZSQLProcessor::SetParamCheck | ( | Boolean | Value | ) | [private] |
Sets a new parameters check value.
Value | a parameters check value. |
Definition at line 804 of file ZSqlProcessor.pas.
TZSQLProcessor::SetParams | ( | TParams | Value | ) | [private] |
Sets a new set of parameters.
Value | a set of parameters. |
Definition at line 423 of file ZSqlProcessor.pas.
TZSQLProcessor::SetScript | ( | TStrings | Value | ) | [private] |
Sets a new SQL script.
Value | a new SQL script. |
Definition at line 436 of file ZSqlProcessor.pas.
TZSQLProcessor::SetStatementParams | ( | IZPreparedStatement | Statement, | |
const TStringDynArray | ParamNames, | |||
TParams | Params | |||
) | [protected] |
Fill prepared statement with parameters.
Statement | a prepared SQL statement. | |
ParamNames | an array of parameter names. | |
Params | a collection of SQL parameters. |
Definition at line 669 of file ZSqlProcessor.pas.
TZSQLProcessor::UpdateSQLStrings | ( | TObject | Sender | ) | [private] |
Updates parameters from SQL statement.
Sender | an event sender object. |
Definition at line 761 of file ZSqlProcessor.pas.
FAfterExecute For writing
Definition at line 271 of file ZSqlProcessor.pas.
FBeforeExecute For writing
Definition at line 274 of file ZSqlProcessor.pas.
SetCleanupStatements For writing
Definition at line 265 of file ZSqlProcessor.pas.
SetConnection For writing
Definition at line 254 of file ZSqlProcessor.pas.
string TZSQLProcessor::Delimiter |
SetDelimiter For writing
Definition at line 261 of file ZSqlProcessor.pas.
SetDelimiterType For writing
Definition at line 258 of file ZSqlProcessor.pas.
Definition at line 112 of file ZSqlProcessor.pas.
Definition at line 110 of file ZSqlProcessor.pas.
TZConnection TZSQLProcessor::FConnection [private] |
Definition at line 108 of file ZSqlProcessor.pas.
Definition at line 114 of file ZSqlProcessor.pas.
TParams TZSQLProcessor::FParams [private] |
Definition at line 102 of file ZSqlProcessor.pas.
TZSQLStrings TZSQLProcessor::FScript [private] |
Definition at line 104 of file ZSqlProcessor.pas.
Definition at line 106 of file ZSqlProcessor.pas.
Definition at line 268 of file ZSqlProcessor.pas.
Boolean TZSQLProcessor::ParamCheck |
SetParamCheck For writing
Definition at line 245 of file ZSqlProcessor.pas.
TParams TZSQLProcessor::Params |
Definition at line 248 of file ZSqlProcessor.pas.
TStrings TZSQLProcessor::Script |
Definition at line 251 of file ZSqlProcessor.pas.
Integer TZSQLProcessor::StatementCount |
string TZSQLProcessor::Statements |