Classe: ODBCCachedResultSet - X-Ref
ODBC implementation of a cached ResultSet.
In addition to limit/offset emulation, this class implements a resultset
cache. This can be useful as a workaround for some ODBC drivers which lack
support for reverse/absolute cursor scrolling, etc.
This class will cache rows _on-demand_. So if you only read the first couple
rows of a result, then only those rows will be cached. However, note that if
you call getRecordCount() or last(), the class must read and cache all
available records.
The offset / limit variables are also taken into account when caching. Any
rows preceding the offset value will be skipped. Caching will stop once the
limit value is reached.
To use this class, create a derived {@link ODBCAdapter} class which returns
an instance of ODBCCachedResultSet from the {@link ODBCAdapter::createResultSet()} method.
Specify the adapter via the query portion of the Connection URL:
odbc://localhost/Driver=MySQL ODBC 3.51 Driver;Database=test?adapter=MySQL
loadCache($recPos = -1)
X-Ref
|
Caches specified records up to and including the specified 1-based
record position. If -1 is specified, all records will be cached.
param: integer Maximum record position to cache.
return: void
|