trim method
Trim the LOB to the specified size
Implementation
Future<void> trim(int newSize) async {
_ensureNotDisposed();
final result = _dpiOracle.dpiLob_trim(_lobPtr, newSize);
if (result == DPI_FAILURE) {
final errorInfo = _memoryManager.allocate<dpiErrorInfo>(sizeOf<dpiErrorInfo>());
_dpiOracle.dpiContext_getError(_context, errorInfo);
final errorMsg = StringUtils.fromNativeUtf8(errorInfo.ref.message.cast<Char>());
throw OracleException(
'Failed to trim LOB',
errorMessage: errorMsg,
);
}
_cachedSize = newSize;
}