Difference between revisions of "SQLdb Programming Reference"

From Free Pascal wiki
Jump to navigationJump to search
(New page: ==Class Structure== The following diagram attempts to show the hierarchy and required links of the MAIN components involved in SQLdb. It is certainly not exhaustive, nor does it use any "...)
 
Line 2: Line 2:
 
The following diagram attempts to show the hierarchy and required links of the MAIN components involved in SQLdb.  It is certainly not exhaustive, nor does it use any "proper" diagram structure, so please don't try to read too much into it.  I hope it will make it easier to work out which bits of the source code you need to look at to really work out what is happening.
 
The following diagram attempts to show the hierarchy and required links of the MAIN components involved in SQLdb.  It is certainly not exhaustive, nor does it use any "proper" diagram structure, so please don't try to read too much into it.  I hope it will make it easier to work out which bits of the source code you need to look at to really work out what is happening.
 
[[Image:Laz SqlDB components.png]]
 
[[Image:Laz SqlDB components.png]]
 +
====Notes====
 +
*  The link from TDatabase to TTransaction is Transactions, and is a list, implying many transactions are possible for the one database.  However, a new link is defined from TSQLConnection to TSQLTransaction which is Transaction - a single transaction per database.  This does not actually hide the previous link, but only the new link is published, and it is probably inadvisable to use the ancestor's link.
 +
*  Some of the inherited links need to be typecast to the new types to be useful.  You can't call SQLQuery.Transaction.Commit, as Commit is only defined in TSQLTransaction.  Call SQLTransaction.Commit, or "with SQLQuery.Transaction as TSQLTransaction do commit"
 +
 +
(This is only the beginning of this page ...)

Revision as of 14:52, 12 July 2007

Class Structure

The following diagram attempts to show the hierarchy and required links of the MAIN components involved in SQLdb. It is certainly not exhaustive, nor does it use any "proper" diagram structure, so please don't try to read too much into it. I hope it will make it easier to work out which bits of the source code you need to look at to really work out what is happening. Laz SqlDB components.png

Notes

  • The link from TDatabase to TTransaction is Transactions, and is a list, implying many transactions are possible for the one database. However, a new link is defined from TSQLConnection to TSQLTransaction which is Transaction - a single transaction per database. This does not actually hide the previous link, but only the new link is published, and it is probably inadvisable to use the ancestor's link.
  • Some of the inherited links need to be typecast to the new types to be useful. You can't call SQLQuery.Transaction.Commit, as Commit is only defined in TSQLTransaction. Call SQLTransaction.Commit, or "with SQLQuery.Transaction as TSQLTransaction do commit"

(This is only the beginning of this page ...)