close method

Future<void> close()

Close the LOB (for temporary LOBs)

Implementation

Future<void> close() async {
  _ensureNotDisposed();

  final result = _dpiOracle.dpiLob_close(_lobPtr);

  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 close LOB',
      errorMessage: errorMsg,
    );
  }
}