-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
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
The problem of closing the connection #71
Comments
There isn't a way to explicitly close a connection right now. See #55. However, if you just drop your reference to the connection, say by setting it to |
Duplicate of #55. |
Thank you for your reply. My code environment is Windows 11, Node.js, and I'm using @duckdb/node-api in an Electron application to create a local DuckDB file, write data, and after performing a SELECT query, I delete the DuckDB file. According to your method, after writing data to DuckDB, I set instance and connection to null. However, the DuckDB file is still occupied when I try to delete it. Please help me, thank you const instance = await DuckDBInstance.create(backPath, { const connection = await instance.connect(); } finally {
} |
For this use case, I think it'll work better to |
How should I close the connection? I couldn't find the close method. Please help me, thank you.
const instance = await DuckDBInstance.create(backPath, {
threads: '4'
});
const connection = await instance.connect();
The text was updated successfully, but these errors were encountered: