Skip to content

Conversation

@jobansd
Copy link

@jobansd jobansd commented Nov 7, 2025

What does this PR do?

Updates instances of deprecated Database.exec method with Database.run in documentation examples across:

  • docs/bundler/fullstack.mdx
  • docs/runtime/http/server.mdx
  • docs/runtime/sqlite.mdx
  • packages/bun-types/sqlite.d.ts

How did you verify your code works?

No runtime changes were made; this is purely a documentation update, verified by building and previewing locally.

References

Replace deprecated `.exec` method with `.run` in documentation examples across:

- docs/bundler/fullstack.mdx
- docs/runtime/http/server.mdx
- docs/runtime/sqlite.mdx
- packages/bun-types/sqlite.d.ts
@jobansd jobansd requested a review from alii as a code owner November 7, 2025 19:24
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Walkthrough

This change updates SQLite database operation method calls from exec() to run() across documentation files and TypeScript type definitions. The modifications replace the method name in code examples without altering the underlying SQL statements or overall logic.

Changes

Cohort / File(s) Summary
Documentation - db.exec to db.run replacement
docs/bundler/fullstack.mdx, docs/runtime/http/server.mdx, docs/runtime/sqlite.mdx
Replaces db.exec() calls with db.run() in code examples for table creation and PRAGMA statements across bundler, HTTP server, and SQLite documentation
Type Definitions - Documentation examples
packages/bun-types/sqlite.d.ts
Updates inline documentation examples to reflect Database.run() usage instead of Database.exec() in code samples and comments

Pre-merge checks

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: replacing deprecated Database.exec with Database.run in documentation examples.
Description check ✅ Passed The PR description follows the required template with both sections completed: it explains what the PR does and how verification was performed.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0db90b2 and c4c114e.

📒 Files selected for processing (4)
  • docs/bundler/fullstack.mdx (1 hunks)
  • docs/runtime/http/server.mdx (1 hunks)
  • docs/runtime/sqlite.mdx (1 hunks)
  • packages/bun-types/sqlite.d.ts (9 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: AmanVarshney01
Repo: oven-sh/bun PR: 23580
File: docs/guides/ecosystem/prisma.md:21-26
Timestamp: 2025-10-15T04:01:16.478Z
Learning: For Prisma with Bun runtime and Rust-free client (engineType "client"), when using local SQLite files (file:// URLs), use either prisma/adapter-better-sqlite3 or the Bun-native synapsenwerkstatt/prisma-bun-sqlite-adapter. The prisma/adapter-libsql adapter is only for remote libSQL/Turso endpoints and will not work with local SQLite file URLs.
📚 Learning: 2025-10-15T04:01:16.478Z
Learnt from: AmanVarshney01
Repo: oven-sh/bun PR: 23580
File: docs/guides/ecosystem/prisma.md:21-26
Timestamp: 2025-10-15T04:01:16.478Z
Learning: For Prisma with Bun runtime and Rust-free client (engineType "client"), when using local SQLite files (file:// URLs), use either prisma/adapter-better-sqlite3 or the Bun-native synapsenwerkstatt/prisma-bun-sqlite-adapter. The prisma/adapter-libsql adapter is only for remote libSQL/Turso endpoints and will not work with local SQLite file URLs.

Applied to files:

  • docs/runtime/http/server.mdx
  • packages/bun-types/sqlite.d.ts
📚 Learning: 2025-09-26T01:36:48.705Z
Learnt from: cirospaciari
Repo: oven-sh/bun PR: 22946
File: src/js/internal/sql/postgres.ts:1326-1332
Timestamp: 2025-09-26T01:36:48.705Z
Learning: In PostgreSQL single-object INSERT path (src/js/internal/sql/postgres.ts), when handling array values in columnValue, the user prefers to rely on PostgreSQL's native type conversion rather than explicitly checking for typed arrays with isTypedArray(). The current $isArray(columnValue) check with serializeArray(columnValue, "JSON") is sufficient, and native PostgreSQL handling is preferred over explicit typed array detection in this specific INSERT context.

Applied to files:

  • packages/bun-types/sqlite.d.ts
📚 Learning: 2025-09-30T02:56:30.615Z
Learnt from: cirospaciari
Repo: oven-sh/bun PR: 22700
File: test/js/sql/sql.test.ts:11673-11710
Timestamp: 2025-09-30T02:56:30.615Z
Learning: Repository oven-sh/bun tests run in a Docker image where the pgcrypto extension is pre-installed, so gen_random_uuid() is available without explicitly running CREATE EXTENSION in tests (e.g., in test/js/sql/sql.test.ts “upsert helper”).

Applied to files:

  • packages/bun-types/sqlite.d.ts
🔇 Additional comments (4)
docs/runtime/sqlite.mdx (1)

193-193: WAL example update to db.run — looks good

Matches deprecation guidance and other examples.

docs/bundler/fullstack.mdx (1)

550-550: Swapped to db.run in setup — 👍

Accurate and consistent with current API guidance.

docs/runtime/http/server.mdx (1)

418-418: CREATE TABLE now uses db.run — LGTM

Keeps the example aligned with the deprecation of exec.

packages/bun-types/sqlite.d.ts (1)

364-364: Review comment verified — all changes are correct

The migration to db.run() examples is complete and properly maintained:

  • All mentioned example lines use db.run() consistently
  • exec() is properly retained as a deprecated alias with appropriate @deprecated annotation directing to Database.run
  • No stray exec() references remain in documentation or type definitions
  • No type changes or semantic drift introduced

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RiskyMH RiskyMH added the docs Improvements or additions to documentation label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants