Skip to content

doc: finalize statements in sqlite examples - #65088

Open
araujogui wants to merge 1 commit into
nodejs:mainfrom
araujogui:sqlite-statement-teardown
Open

doc: finalize statements in sqlite examples#65088
araujogui wants to merge 1 commit into
nodejs:mainfrom
araujogui:sqlite-statement-teardown

Conversation

@araujogui

@araujogui araujogui commented Aug 6, 2026

Copy link
Copy Markdown
Member

The examples left prepared statements to be finalized implicitly. Use
close() in the introductory example and using in the shorter ones.

Refs: #64232 (review)

Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 17:03
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the SQLite API documentation examples to ensure prepared statements are properly finalized/closed, reducing the risk of leaking statement handles.

Changes:

  • Added explicit .close() calls to prepared statements in introductory examples.
  • Replaced one-liner prepare(...).get() usage with using declarations to leverage automatic disposal.
  • Updated session-related examples to use using for prepared statements.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/api/sqlite.md
Comment thread doc/api/sqlite.md
Comment thread doc/api/sqlite.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants