TS/JS, like other programming languages, introduces a syntax for guaranteed resource release (using). Ex.:
using pool = await oracledb.createPool({...});
using connection = await pool.getConnection();
using result = await connection.execute( 'SELECT b FROM no_lobs WHERE id = :id', { id: 2 });
using lob = result.rows[0][0];
lob.pipe(response);
TS/JS, like other programming languages, introduces a syntax for guaranteed resource release (
using
). Ex.:which is equivalent to:
I think it is worth expanding the library to support this solution.
The implementation involves adding aliased symbolic methods to close / destroy. See: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management https://tc39.es/proposal-explicit-resource-management/