This page explains the SQL Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to SQL Adapter in the Designer guide.

If big data sets has to be read from a database it is recommended not to read all records at once. Instead do the following steps:

  • Get a SQL handle using the <<SQLAdapter>> (action = getHandle).
  • Iterate over the database records by using fetchNext until no more records are returned.
  • If you don't iterate to the end of the result set, close the handle (action = closeHandle) to free resources.

The figure below shows an activity executing these steps. When retrieving the handle, it is possible to define the number of prefetched records (<<SQLAdapter>> action = getHandle, prefetchedRecors = <number>). This number of records is read block wise so that the xUML Runtime does not need to connect to the database for each fetchNext action.

The SQL output cannot be checked against the type since the output record is not known yet. Only action fetchNext knows this.

  • No labels