We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disposable
PreparedQuery
Docs for PreparedQuery.finalize() say:
PreparedQuery.finalize()
This must be called once the query is no longer needed to avoid leaking resources.
So users need to write something like:
const pq = connection.prepareQuery(query); try { // ... } finally { pq.finalize() }
But, if it were to implement Disposable, then users would only need to write:
using pq = connection.prepareQuery(query); // ...
In the meantime, users can explicitly defer a call to finalize like this:
const pq = connection.prepareQuery(query); using stack = new DisposableStack(); stack.defer(() => pq.finalize()); // ...
Note that until this issue is resolved, you will also need to explicitly:
import { DisposableStack } from "https://deno.land/x/[email protected]/mod.ts"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Docs for
PreparedQuery.finalize()
say:So users need to write something like:
But, if it were to implement Disposable, then users would only need to write:
Workaround:
In the meantime, users can explicitly defer a call to finalize like this:
Note that until this issue is resolved, you will also need to explicitly:
The text was updated successfully, but these errors were encountered: