Techniques for Two-Tier Tables
The IliTable class also provides a set of member functions dedicated to managing two-tier tables. A two-tier table is tied to rows that are managed by some external process or system; therefore serving as a bridge between Data Access and this external system. For instance, the IliSQLTable class (described in Hints and Tips for Using Data Access) serves as a bridge to relational database systems. The DirectoryTable sample class serves as a bridge to the file system. See Subclassing Example.
A two-tier table is usually defined by specifying some sort of criteria that will be used to identify a result set
The IliTable::select
With a two-tier table, the basic row management member functions (described in section Managing Rows in a Table) perform specific actions, the details of which depend on the specific subclass being used. For more information, refer to the appropriate class in the Views Data Access Reference Manual.
A two-tier table can retrieve rows in one of the following ways
-
The select member function immediately retrieves all rows identified by the selection criteria and stores them in the local row cache.
-
The select member function locates the rows identified by the selection criteria in the external system, but delays their retrieval until they are required.
The getRowsCount
The IliTable::fetchCompleted
The IliTable::fetchNext
The insertRowInCache, updateRowInCache, and deleteRowInCache member functions are similar to their non-inCache counterparts except that they simply act on the local row cache, leaving the remote data store unaffected.
The IliTable::clearRows
In a one-tier table, however, the IliTable::clearRows effectively deletes all rows in the IliTable object.