Closed
Conversation
Summary: This diff adds Flow type definitions for the `node:sqlite` module, Node.js's built-in SQLite database interface added experimentally in v22.5.0. **Module Overview:** The `node:sqlite` module provides synchronous SQLite database operations, enabling embedded database functionality without external dependencies. **Core Classes:** 1. **DatabaseSync** - Main database interface - `constructor(location: string, options?: DatabaseSyncOptions)` - `exec(sql: string)` - Execute SQL without returning results - `prepare(sql: string)` - Create prepared statement - `close()` / `open()` - Manage connection lifecycle - `function()` - Register custom SQL functions - `createSession()` / `applyChangeset()` - Session/changeset support - https://nodejs.org/api/sqlite.html#class-databasesync 2. **StatementSync** - Prepared statement interface - `all(...params)` - Return all rows as array - `get(...params)` - Return first row - `run(...params)` - Execute and return changes/lastInsertRowid - `iterate(...params)` - Return iterator over rows - `expandedSQL` / `sourceSQL` - SQL inspection - https://nodejs.org/api/sqlite.html#class-statementsync 3. **Session** - Change tracking interface - `changeset()` - Get changes as Uint8Array - `patchset()` - Get minimal changes - `close()` - End session **References:** - Node.js sqlite module documentation: https://nodejs.org/api/sqlite.html **Stability:** Experimental (added in v22.5.0) Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D90764441
meta-codesync Bot
pushed a commit
to facebook/metro
that referenced
this pull request
Jan 23, 2026
Summary: X-link: facebook/react-native#55284 This diff adds Flow type definitions for the `node:sqlite` module, Node.js's built-in SQLite database interface added experimentally in v22.5.0. **Module Overview:** The `node:sqlite` module provides synchronous SQLite database operations, enabling embedded database functionality without external dependencies. **Core Classes:** 1. **DatabaseSync** - Main database interface - `constructor(location: string, options?: DatabaseSyncOptions)` - `exec(sql: string)` - Execute SQL without returning results - `prepare(sql: string)` - Create prepared statement - `close()` / `open()` - Manage connection lifecycle - `function()` - Register custom SQL functions - `createSession()` / `applyChangeset()` - Session/changeset support - https://nodejs.org/api/sqlite.html#class-databasesync 2. **StatementSync** - Prepared statement interface - `all(...params)` - Return all rows as array - `get(...params)` - Return first row - `run(...params)` - Execute and return changes/lastInsertRowid - `iterate(...params)` - Return iterator over rows - `expandedSQL` / `sourceSQL` - SQL inspection - https://nodejs.org/api/sqlite.html#class-statementsync 3. **Session** - Change tracking interface - `changeset()` - Get changes as Uint8Array - `patchset()` - Get minimal changes - `close()` - End session **References:** - Node.js sqlite module documentation: https://nodejs.org/api/sqlite.html **Stability:** Experimental (added in v22.5.0) Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D90764441 fbshipit-source-id: 9bce1e13bf8d550211c62d7d5cde255854379363
|
This pull request has been merged in 3d0aa9f. |
Collaborator
|
This pull request was successfully merged by @robhogan in 3d0aa9f When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This diff adds Flow type definitions for the
node:sqlitemodule, Node.js's built-in SQLite database interface added experimentally in v22.5.0.Module Overview:
The
node:sqlitemodule provides synchronous SQLite database operations, enabling embedded database functionality without external dependencies.Core Classes:
DatabaseSync - Main database interface
constructor(location: string, options?: DatabaseSyncOptions)exec(sql: string)- Execute SQL without returning resultsprepare(sql: string)- Create prepared statementclose()/open()- Manage connection lifecyclefunction()- Register custom SQL functionscreateSession()/applyChangeset()- Session/changeset supportStatementSync - Prepared statement interface
all(...params)- Return all rows as arrayget(...params)- Return first rowrun(...params)- Execute and return changes/lastInsertRowiditerate(...params)- Return iterator over rowsexpandedSQL/sourceSQL- SQL inspectionSession - Change tracking interface
changeset()- Get changes as Uint8Arraypatchset()- Get minimal changesclose()- End sessionReferences:
Stability: Experimental (added in v22.5.0)
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D90764441