SqlDriverDumont Class Reference

Datasource for Commence. More...

#include <sqldriverdumont.h>

Collaboration diagram for SqlDriverDumont:

Collaboration graph
[legend]

List of all members.

Public Member Functions

QSqlIndex primaryIndex (const QString &tableName) const
 Primary Index.
QStringList tables (QSql::TableType tableType) const
 Tables List.


Detailed Description

Datasource for Commence.

This object implements a Datasource for Commence Database Systems.

Regarding Item Inserts.

Commence does not provide the THID value on an item insert. This is somewhat problemmatic since the THID values are so useful during edits and deletes. One method of solving this issue is to allow this driver to insert an item with a {name} field value that is certainly unique, such as a GUID value. With this value the newly inserted item can be quickly found again, even in a category that allows duplicates, and edited based upon its THID value. The problem, however, is writing an item to the database may cause an agent or two to fire producing undesirable results. It would make sense therefore, to allow for some driver options that control how new items are inserted. If the target category allows for duplicates and no adverse agents will be fired, then this insertion routine could easily place a dummy item on first insert, relocate it and fetch its THID value for future updates. One important factor also in this driver/result is providing for the ability to perform updates to image fields and other fields that are only accessable through the DDE interface. In the DDE interface the THID is completely useless. We will have to think this through.

Definition at line 364 of file sqldriverdumont.h.


Member Function Documentation

QSqlIndex primaryIndex ( const QString &  tableName  )  const

Primary Index.

The primaryIndex is a tool that is used by the models to insure access to the correct rows in the rowsets. In the Commence driver we use the THID value are the primary index. Note that even if it is not requested as part of the query result set, the THID value is always provided, and is always the first field in the field list.

Adding the THID field to the primary index, and leaving the field as Read/Write, allows the models to properly manipulate the field value. When an update request is made, the primary key value is provided to access the row. In this case it will be the THID value. This driver is implemented to insure that the THID value is properly handled.

Definition at line 276 of file sqldriverdumont.cpp.

QStringList tables ( QSql::TableType  tableType  )  const

Tables List.

This returns a string list of Tables defined in the database. The -only- table types available are AllTables since Commence does not contain any accessable internal tables.

Definition at line 510 of file sqldriverdumont.cpp.


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




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database Support User Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com