Getting Results from an Inserter
Normally, we wouldn't expect an insert operation to produce any results. However, some database implementations include triggers, which can cause other events not necessarily related to the insertion to occur. To allow applications to handle this sort of behavior, the execute() method of every class in the DB Interface Module returns an RWDBResult instance with the exception of RWDBOSql.
An RWDBResult encapsulates the notion of a sequence of zero or more tables. Its table() method is used to extract the next table from the sequence. Consequently, where our examples have shown:
 
insert.execute(myConnection); //1
we might have substituted a loop:
 
RWDBResult result = insert.execute(myConnection);
RWDBTable resultTable = result.table();
while(resultTable().isValid()) {
// process table of results
resultTable = result.table();
}
If your application has a sensible way to process these unexpected sets of results, you may prefer the second approach. If not, you can safely ignore the results as we did on //1, since the DB Interface Module takes responsibility for keeping connections in a consistent state. In these examples, any unexpected results are silently discarded the next time the connection is used.