---
source: https://iinventedlight.com/library/notes/node-sqlite.md
title: "Node.js sqlite: work with SQLite databases"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Node.js docs); MIT (Node.js); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Node.js docs, SQLite; Node.js, sqlite.md. MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE). Copyright Node.js contributors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: node sqlite"
tags: [node, sqlite, database, sql, diagnostics]
client: Librarian
sources:
  - id: S1
    title: "SQLite"
    publisher: Node.js docs
    url: https://nodejs.org/api/sqlite.html
    accessed: 2026-11-18
    license: "MIT"
  - id: S2
    title: "sqlite.md"
    publisher: Node.js
    url: https://raw.githubusercontent.com/nodejs/node/main/doc/api/sqlite.md
    accessed: 2026-11-18
    license: "MIT"
---
# Node.js sqlite: work with SQLite databases
**Answer:** The node:sqlite module facilitates working with SQLite databases. The API is a release candidate (Stability 1.2). SQL trace events can be observed via the diagnostics_channel module. Prepared statements should be closed once they are no longer needed.

## Examples

```js
import { DatabaseSync } from 'node:sqlite';
```

## Notes

The docs show insert.run(...) for writes, then insert.close() when the statement is done.

## Reference list

- `node:sqlite` facilitates working with SQLite databases.
- `diagnostics_channel` can observe SQL trace events.

## See also

- [node-buffer](https://iinventedlight.com/library/notes/node-buffer/)
- [node-fs-and-path](https://iinventedlight.com/library/notes/node-fs-and-path/)
- [node-events](https://iinventedlight.com/library/notes/node-events/)

## Claims

- id: C1
  claim: The node:sqlite module facilitates working with SQLite databases.
  source: S1
  evidence: "The node:sqlite module facilitates working with SQLite databases."

- id: C2
  claim: The API is a release candidate at Stability 1.2.
  source: S2
  evidence: "Stability: 1.2 - Release candidate."

- id: C3
  claim: SQL trace events can be observed via diagnostics_channel.
  source: S2
  evidence: "SQL trace events can be observed via the [`diagnostics_channel`]"

## Sources

- [S1] SQLite. Node.js docs. https://nodejs.org/api/sqlite.html . License: MIT. Accessed 2026-11-18.

- [S2] sqlite.md. Node.js. https://raw.githubusercontent.com/nodejs/node/main/doc/api/sqlite.md . License: MIT. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Node.js docs, SQLite; Node.js, sqlite.md. MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE). Copyright Node.js contributors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
