Conversion of CachedLobs to LobCacheMode
Posted: 07.04.2021, 21:48
I've put in the pull request. A few notes:
I removed the code related to CachedLobs in procedure TZCachedResultSet.ResetCursor as I thought it might cause an issue for drivers that hard code the value.
I put the enumeration and some helper code in ZDbcIntfs. There may be a better place for it.
The LobCacheMode is now only set via properties, at the connection or dataset. E.g.:
ZConn.Properties.AddPair('LobCacheMode', 'OnAccess');
or
ZQuery.Properties.AddPair('LobCacheMode', 'OnLoad');
If TryKeepDataOnDisconnect is true the LobCacheMode will switch to "OnLoad" if it is currently "None". I use "OnAccess" with TryKeepData and it works very well.
I haven't tested:
The connection property editor
The ASA protocol
The SQLLite protocol
The ADO protocol
I don't think they'll be adversely affected, but just wanted to mention it.
-Mark
I removed the code related to CachedLobs in procedure TZCachedResultSet.ResetCursor as I thought it might cause an issue for drivers that hard code the value.
I put the enumeration and some helper code in ZDbcIntfs. There may be a better place for it.
The LobCacheMode is now only set via properties, at the connection or dataset. E.g.:
ZConn.Properties.AddPair('LobCacheMode', 'OnAccess');
or
ZQuery.Properties.AddPair('LobCacheMode', 'OnLoad');
If TryKeepDataOnDisconnect is true the LobCacheMode will switch to "OnLoad" if it is currently "None". I use "OnAccess" with TryKeepData and it works very well.
I haven't tested:
The connection property editor
The ASA protocol
The SQLLite protocol
The ADO protocol
I don't think they'll be adversely affected, but just wanted to mention it.
-Mark