TZUpdateSQL Class Reference

Implements an object which manages SQL DML statements to update TDatasets. More...

Inheritance diagram for TZUpdateSQL:

TComponent IZCachedResolver

List of all members.

Public Member Functions

 TZUpdateSQL (TComponent AOwner)
 Constructs this object and assignes main properties.
 ~TZUpdateSQL ()
 Destroys this object and cleanups the memory.

Public Attributes

TNotifyEvent AfterDeleteSQL
TZAfterSQLStatementEvent AfterDeleteSQLStatement
TNotifyEvent AfterInsertSQL
TZAfterInsertSQLStatementEvent AfterInsertSQLStatement
TNotifyEvent AfterModifySQL
TZAfterSQLStatementEvent AfterModifySQLStatement
TNotifyEvent BeforeDeleteSQL
TZBeforeSQLStatementEvent BeforeDeleteSQLStatement
TNotifyEvent BeforeInsertSQL
TZBeforeSQLStatementEvent BeforeInsertSQLStatement
TNotifyEvent BeforeModifySQL
TZBeforeSQLStatementEvent BeforeModifySQLStatement
TDataSet DataSet
TStrings DeleteSQL
TStrings InsertSQL
TStrings ModifySQL
Boolean MultiStatements
Boolean ParamCheck
Word ParamCount
TParams Params
TStrings RefreshSQL
TStrings SQL
Boolean UseSequenceFieldForRefreshSQL

Protected Member Functions

 CalculateDefaults (IZCachedResultSet Sender, TZRowAccessor RowAccessor)
 Calculate default values for the fields.
 DefineProperties (TFiler Filer)
 Defines a persistent dataset properties.
 DoAfterDeleteSQL ()
 Fires an event after delete Statement.
 DoAfterDeleteSQLStatement (const TObject Sender, Integer StatementIndex)
 DoAfterInsertSQL ()
 Fires an event after insert Statement.
 DoAfterInsertSQLStatement (const TObject Sender, Integer StatementIndex, Boolean &UpdateAutoIncFields)
 DoAfterModifySQL ()
 Fires an event after modify Statement.
 DoAfterModifySQLStatement (const TObject Sender, Integer StatementIndex)
 DoBeforeDeleteSQL ()
 Fires an event before delete Statement.
 DoBeforeDeleteSQLStatement (const TObject Sender, Integer StatementIndex, Boolean &Execute)
 DoBeforeInsertSQL ()
 Fires an event before insert Statement.
 DoBeforeInsertSQLStatement (const TObject Sender, Integer StatementIndex, Boolean &Execute)
 DoBeforeModifySQL ()
 Fires an event before modify Statement.
 DoBeforeModifySQLStatement (const TObject Sender, Integer StatementIndex, Boolean &Execute)
 FillStatement (IZCachedResultSet ResultSet, IZPreparedStatement Statement, TZSQLStatement Config, TZRowAccessor OldRowAccessor, TZRowAccessor NewRowAccessor)
 Fills the specified statement with stored or given parameters.
 PostUpdates (IZCachedResultSet Sender, TZRowUpdateType UpdateType, TZRowAccessor OldRowAccessor, TZRowAccessor NewRowAccessor)
 Posts updates to database.
 Rebuild (TZSQLStrings SQLStrings)
 Rebuilds parameters and inserts a new one from specified sql statements.
 RebuildAll ()
 Rebuilds all internal structures including parameters from SQL statements.
 UpdateAutoIncrementFields (IZCachedResultSet Sender, TZRowUpdateType UpdateType, TZRowAccessor OldRowAccessor, TZRowAccessor NewRowAccessor, IZCachedResolver Resolver)
 UpdateParams (TObject Sender)
 Updates all parameters.

Private Member Functions

TStrings GetDeleteSQL ()
 Gets strings with Delete statements.
TStrings GetInsertSQL ()
 Gets strings with Insert statements.
TStrings GetModifySQL ()
 Gets strings with Modify statements.
Word GetParamsCount ()
 Get parameters count.
TStrings GetRefreshSQL ()
TStrings GetSQL (TUpdateKind UpdateKind)
 Gets a DML statements for specified action.
 ReadParamData (TReader Reader)
 Reads parameter data from persistent storage.
 SetDataset (TDataset Value)
 Store the related dataset object for update sql editor.
 SetDeleteSQL (TStrings Value)
 Sets a new Delete SQL statement.
 SetInsertSQL (TStrings Value)
 Sets a new Insert SQL statement.
 SetModifySQL (TStrings Value)
 Sets a new Modify SQL statement.
 SetMultiStatements (Boolean Value)
 Sets multiple statements flag.
 SetParamCheck (Boolean Value)
 Sets parameters checking flag.
 SetParamsList (TParams Value)
 Set a new list of SQL parameters.
 SetRefreshSQL (TStrings Value)
 SetSQL (TUpdateKind UpdateKind, TStrings Value)
 Sets a DML statements for specified action.
 SetUseSequenceFieldForRefreshSQL (const Boolean Value)
 WriteParamData (TWriter Writer)
 Writes parameter data from persistent storage.

Private Attributes

TNotifyEvent FAfterDeleteSQL
TZAfterSQLStatementEvent FAfterDeleteSQLStatement
TNotifyEvent FAfterInsertSQL
TZAfterInsertSQLStatementEvent FAfterInsertSQLStatement
TNotifyEvent FAfterModifySQL
TZAfterSQLStatementEvent FAfterModifySQLStatement
TNotifyEvent FBeforeDeleteSQL
TZBeforeSQLStatementEvent FBeforeDeleteSQLStatement
TNotifyEvent FBeforeInsertSQL
TZBeforeSQLStatementEvent FBeforeInsertSQLStatement
TNotifyEvent FBeforeModifySQL
TZBeforeSQLStatementEvent FBeforeModifySQLStatement
TDataSet FDataSet
TZSQLStrings FDeleteSQL
TZSQLStrings FInsertSQL
TZSQLStrings FModifySQL
Boolean FMultiStatements
Boolean FParamCheck
TParams FParams
TZSQLStrings FRefreshSQL
Boolean FUseSequenceFieldForRefreshSQL


Detailed Description

Implements an object which manages SQL DML statements to update TDatasets.

Definition at line 84 of file ZSqlUpdate.pas.


Constructor & Destructor Documentation

TZUpdateSQL::TZUpdateSQL ( TComponent  AOwner  ) 

Constructs this object and assignes main properties.

Parameters:
AOwner a component owner.

Definition at line 425 of file ZSqlUpdate.pas.

TZUpdateSQL::~TZUpdateSQL (  ) 

Destroys this object and cleanups the memory.

Definition at line 453 of file ZSqlUpdate.pas.


Member Function Documentation

TZUpdateSQL::CalculateDefaults ( IZCachedResultSet  Sender,
TZRowAccessor  RowAccessor 
) [protected]

Calculate default values for the fields.

Parameters:
Sender a cached result set object.
RowAccessor an accessor object to column values.

Reimplemented from IZCachedResolver.

Definition at line 961 of file ZSqlUpdate.pas.

TZUpdateSQL::DefineProperties ( TFiler  Filer  )  [protected]

Defines a persistent dataset properties.

Parameters:
Filer a persistent manager object.

Definition at line 612 of file ZSqlUpdate.pas.

TZUpdateSQL::DoAfterDeleteSQL (  )  [protected]

Fires an event after delete Statement.

Definition at line 1206 of file ZSqlUpdate.pas.

TZUpdateSQL::DoAfterDeleteSQLStatement ( const TObject  Sender,
Integer  StatementIndex 
) [protected]

Definition at line 1257 of file ZSqlUpdate.pas.

TZUpdateSQL::DoAfterInsertSQL (  )  [protected]

Fires an event after insert Statement.

Definition at line 1218 of file ZSqlUpdate.pas.

TZUpdateSQL::DoAfterInsertSQLStatement ( const TObject  Sender,
Integer  StatementIndex,
Boolean &  UpdateAutoIncFields 
) [protected]

Definition at line 1268 of file ZSqlUpdate.pas.

TZUpdateSQL::DoAfterModifySQL (  )  [protected]

Fires an event after modify Statement.

Definition at line 1230 of file ZSqlUpdate.pas.

TZUpdateSQL::DoAfterModifySQLStatement ( const TObject  Sender,
Integer  StatementIndex 
) [protected]

Definition at line 1280 of file ZSqlUpdate.pas.

TZUpdateSQL::DoBeforeDeleteSQL (  )  [protected]

Fires an event before delete Statement.

Definition at line 1170 of file ZSqlUpdate.pas.

TZUpdateSQL::DoBeforeDeleteSQLStatement ( const TObject  Sender,
Integer  StatementIndex,
Boolean &  Execute 
) [protected]

Definition at line 1291 of file ZSqlUpdate.pas.

TZUpdateSQL::DoBeforeInsertSQL (  )  [protected]

Fires an event before insert Statement.

Definition at line 1182 of file ZSqlUpdate.pas.

TZUpdateSQL::DoBeforeInsertSQLStatement ( const TObject  Sender,
Integer  StatementIndex,
Boolean &  Execute 
) [protected]

Definition at line 1303 of file ZSqlUpdate.pas.

TZUpdateSQL::DoBeforeModifySQL (  )  [protected]

Fires an event before modify Statement.

Definition at line 1194 of file ZSqlUpdate.pas.

TZUpdateSQL::DoBeforeModifySQLStatement ( const TObject  Sender,
Integer  StatementIndex,
Boolean &  Execute 
) [protected]

Definition at line 1315 of file ZSqlUpdate.pas.

TZUpdateSQL::FillStatement ( IZCachedResultSet  ResultSet,
IZPreparedStatement  Statement,
TZSQLStatement  Config,
TZRowAccessor  OldRowAccessor,
TZRowAccessor  NewRowAccessor 
) [protected]

Fills the specified statement with stored or given parameters.

Parameters:
ResultSet a source result set object.
Statement a DBC statement object.
Config a SQLStatement configuration.
OldRowAccessor an accessor object to old column values.
NewRowAccessor an accessor object to new column values.

Definition at line 809 of file ZSqlUpdate.pas.

TStrings TZUpdateSQL::GetDeleteSQL (  )  [private]

Gets strings with Delete statements.

Returns:
strings with Delete statements.

Definition at line 664 of file ZSqlUpdate.pas.

TStrings TZUpdateSQL::GetInsertSQL (  )  [private]

Gets strings with Insert statements.

Returns:
strings with Insert statements.

Definition at line 689 of file ZSqlUpdate.pas.

TStrings TZUpdateSQL::GetModifySQL (  )  [private]

Gets strings with Modify statements.

Returns:
strings with Modify statements.

Definition at line 714 of file ZSqlUpdate.pas.

Word TZUpdateSQL::GetParamsCount (  )  [private]

Get parameters count.

Returns:
a parameters count.

Definition at line 525 of file ZSqlUpdate.pas.

TStrings TZUpdateSQL::GetRefreshSQL (  )  [private]

Definition at line 533 of file ZSqlUpdate.pas.

TStrings TZUpdateSQL::GetSQL ( TUpdateKind  UpdateKind  )  [private]

Gets a DML statements for specified action.

Parameters:
UpdateKind a type of the DML statements.
Returns:
a stored DML statement.

Definition at line 487 of file ZSqlUpdate.pas.

TZUpdateSQL::PostUpdates ( IZCachedResultSet  Sender,
TZRowUpdateType  UpdateType,
TZRowAccessor  OldRowAccessor,
TZRowAccessor  NewRowAccessor 
) [protected]

Posts updates to database.

Parameters:
Sender a cached result set object.
UpdateType a type of updates.
OldRowAccessor an accessor object to old column values.
NewRowAccessor an accessor object to new column values.

Reimplemented from IZCachedResolver.

Definition at line 980 of file ZSqlUpdate.pas.

TZUpdateSQL::ReadParamData ( TReader  Reader  )  [private]

Reads parameter data from persistent storage.

Parameters:
Reader an input data stream.

Definition at line 637 of file ZSqlUpdate.pas.

TZUpdateSQL::Rebuild ( TZSQLStrings  SQLStrings  )  [protected]

Rebuilds parameters and inserts a new one from specified sql statements.

Parameters:
SQLStrings a strings with SQL statements.

Definition at line 752 of file ZSqlUpdate.pas.

TZUpdateSQL::RebuildAll (  )  [protected]

Rebuilds all internal structures including parameters from SQL statements.

Definition at line 773 of file ZSqlUpdate.pas.

TZUpdateSQL::SetDataset ( TDataset  Value  )  [private]

Store the related dataset object for update sql editor.

Definition at line 470 of file ZSqlUpdate.pas.

TZUpdateSQL::SetDeleteSQL ( TStrings  Value  )  [private]

Sets a new Delete SQL statement.

Parameters:
Value a new Delete SQL statement.

Definition at line 676 of file ZSqlUpdate.pas.

TZUpdateSQL::SetInsertSQL ( TStrings  Value  )  [private]

Sets a new Insert SQL statement.

Parameters:
Value a new Insert SQL statement.

Definition at line 701 of file ZSqlUpdate.pas.

TZUpdateSQL::SetModifySQL ( TStrings  Value  )  [private]

Sets a new Modify SQL statement.

Parameters:
Value a new Modify SQL statement.

Definition at line 726 of file ZSqlUpdate.pas.

TZUpdateSQL::SetMultiStatements ( Boolean  Value  )  [private]

Sets multiple statements flag.

Parameters:
Value a new multiple statements flag.

Definition at line 563 of file ZSqlUpdate.pas.

TZUpdateSQL::SetParamCheck ( Boolean  Value  )  [private]

Sets parameters checking flag.

Parameters:
Value a new parameters checking flag.

Definition at line 545 of file ZSqlUpdate.pas.

TZUpdateSQL::SetParamsList ( TParams  Value  )  [private]

Set a new list of SQL parameters.

Parameters:
Value a new list of SQL parameters.

Definition at line 581 of file ZSqlUpdate.pas.

TZUpdateSQL::SetRefreshSQL ( TStrings  Value  )  [private]

Definition at line 590 of file ZSqlUpdate.pas.

TZUpdateSQL::SetSQL ( TUpdateKind  UpdateKind,
TStrings  Value 
) [private]

Sets a DML statements for specified action.

Parameters:
UpdateKind a type of the DML statements.
Value a DML statements to be set.

Definition at line 506 of file ZSqlUpdate.pas.

TZUpdateSQL::SetUseSequenceFieldForRefreshSQL ( const Boolean  Value  )  [private]

Definition at line 599 of file ZSqlUpdate.pas.

TZUpdateSQL::UpdateAutoIncrementFields ( IZCachedResultSet  Sender,
TZRowUpdateType  UpdateType,
TZRowAccessor  OldRowAccessor,
TZRowAccessor  NewRowAccessor,
IZCachedResolver  Resolver 
) [protected]

Reimplemented from IZCachedResolver.

Definition at line 1240 of file ZSqlUpdate.pas.

TZUpdateSQL::UpdateParams ( TObject  Sender  )  [protected]

Updates all parameters.

Parameters:
Sender an event sender object.

Definition at line 739 of file ZSqlUpdate.pas.

TZUpdateSQL::WriteParamData ( TWriter  Writer  )  [private]

Writes parameter data from persistent storage.

Parameters:
Writer an output data stream.

Definition at line 651 of file ZSqlUpdate.pas.


Member Data Documentation

See also:
FAfterDeleteSQL For reading

FAfterDeleteSQL For writing

Definition at line 374 of file ZSqlUpdate.pas.

See also:
FAfterDeleteSQLStatement For reading

FAfterDeleteSQLStatement For writing

Definition at line 400 of file ZSqlUpdate.pas.

See also:
FAfterInsertSQL For reading

FAfterInsertSQL For writing

Definition at line 378 of file ZSqlUpdate.pas.

See also:
FAfterInsertSQLStatement For reading

FAfterInsertSQLStatement For writing

Definition at line 404 of file ZSqlUpdate.pas.

See also:
FAfterModifySQL For reading

FAfterModifySQL For writing

Definition at line 382 of file ZSqlUpdate.pas.

See also:
FAfterModifySQLStatement For reading

FAfterModifySQLStatement For writing

Definition at line 408 of file ZSqlUpdate.pas.

See also:
FBeforeDeleteSQL For reading

FBeforeDeleteSQL For writing

Definition at line 362 of file ZSqlUpdate.pas.

See also:
FBeforeDeleteSQLStatement For reading

FBeforeDeleteSQLStatement For writing

Definition at line 388 of file ZSqlUpdate.pas.

See also:
FBeforeInsertSQL For reading

FBeforeInsertSQL For writing

Definition at line 366 of file ZSqlUpdate.pas.

See also:
FBeforeInsertSQLStatement For reading

FBeforeInsertSQLStatement For writing

Definition at line 392 of file ZSqlUpdate.pas.

See also:
FBeforeModifySQL For reading

FBeforeModifySQL For writing

Definition at line 370 of file ZSqlUpdate.pas.

See also:
FBeforeModifySQLStatement For reading

FBeforeModifySQLStatement For writing

Definition at line 396 of file ZSqlUpdate.pas.

See also:
FDataSet For reading

SetDataSet For writing

Definition at line 327 of file ZSqlUpdate.pas.

See also:
GetDeleteSQL For reading

SetDeleteSQL For writing

Definition at line 332 of file ZSqlUpdate.pas.

TNotifyEvent TZUpdateSQL::FAfterDeleteSQL [private]

Definition at line 115 of file ZSqlUpdate.pas.

Definition at line 126 of file ZSqlUpdate.pas.

TNotifyEvent TZUpdateSQL::FAfterInsertSQL [private]

Definition at line 117 of file ZSqlUpdate.pas.

Definition at line 130 of file ZSqlUpdate.pas.

TNotifyEvent TZUpdateSQL::FAfterModifySQL [private]

Definition at line 119 of file ZSqlUpdate.pas.

Definition at line 134 of file ZSqlUpdate.pas.

TNotifyEvent TZUpdateSQL::FBeforeDeleteSQL [private]

Definition at line 109 of file ZSqlUpdate.pas.

Definition at line 124 of file ZSqlUpdate.pas.

TNotifyEvent TZUpdateSQL::FBeforeInsertSQL [private]

Definition at line 111 of file ZSqlUpdate.pas.

Definition at line 128 of file ZSqlUpdate.pas.

TNotifyEvent TZUpdateSQL::FBeforeModifySQL [private]

Definition at line 113 of file ZSqlUpdate.pas.

Definition at line 132 of file ZSqlUpdate.pas.

TDataSet TZUpdateSQL::FDataSet [private]

Definition at line 89 of file ZSqlUpdate.pas.

Definition at line 92 of file ZSqlUpdate.pas.

Definition at line 94 of file ZSqlUpdate.pas.

Definition at line 96 of file ZSqlUpdate.pas.

Boolean TZUpdateSQL::FMultiStatements [private]

Definition at line 107 of file ZSqlUpdate.pas.

Boolean TZUpdateSQL::FParamCheck [private]

Definition at line 103 of file ZSqlUpdate.pas.

TParams TZUpdateSQL::FParams [private]

Definition at line 105 of file ZSqlUpdate.pas.

Definition at line 99 of file ZSqlUpdate.pas.

Definition at line 121 of file ZSqlUpdate.pas.

See also:
GetInsertSQL For reading

SetInsertSQL For writing

Definition at line 335 of file ZSqlUpdate.pas.

See also:
GetModifySQL For reading

SetModifySQL For writing

Definition at line 338 of file ZSqlUpdate.pas.

See also:
FMultiStatements For reading

SetMultiStatements For writing

Definition at line 357 of file ZSqlUpdate.pas.

See also:
FParamCheck For reading

SetParamCheck For writing

Definition at line 354 of file ZSqlUpdate.pas.

See also:
GetParamsCount For reading

Definition at line 324 of file ZSqlUpdate.pas.

See also:
FParams For reading

False For writing

Definition at line 351 of file ZSqlUpdate.pas.

See also:
GetRefreshSQL For reading

SetRefreshSQL For writing

Definition at line 342 of file ZSqlUpdate.pas.

TStrings TZUpdateSQL::SQL

See also:
GetSQL For reading

SetSQL For writing

Definition at line 318 of file ZSqlUpdate.pas.

See also:
FUseSequenceFieldForRefreshSQL For reading

SetUseSequenceFieldForRefreshSQL For writing

Definition at line 346 of file ZSqlUpdate.pas.


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

Generated on Wed Dec 30 08:42:58 2009 for zeoslib by  doxygen 1.5.7.1