Skip to content

docs: document async_db_url and reflex[db] extra (ENG-8371)#6699

Open
adhami3310 wants to merge 4 commits into
mainfrom
claude/angry-shtern-7f3f2b
Open

docs: document async_db_url and reflex[db] extra (ENG-8371)#6699
adhami3310 wants to merge 4 commits into
mainfrom
claude/angry-shtern-7f3f2b

Conversation

@adhami3310

Copy link
Copy Markdown
Member

What

Fixes ENG-8371.

Two gaps in the database docs:

  1. async_db_url was undocumented. rx.asession() requires a separate async_db_url (with an async driver) in rxconfig.py, and raises ValueError("No async database url configured") when it is unset — but nothing in the docs mentioned this.
  2. The reflex[db] extra was undocumented. The ORM dependencies (SQLAlchemy, SQLModel, Alembic) are an optional extra, installed via pip install "reflex[db]".

Changes

  • docs/database/overview.md: new Installation section covering pip install "reflex[db]".
  • docs/database/queries.md: new Configuring the Async Database URL subsection with a config example (sqlite+aiosqlite), the async-driver install step, and a note on the PostgreSQL (asyncpg) variant.

Docs-only change.

@adhami3310 adhami3310 requested review from a team and Alek99 as code owners July 2, 2026 18:23
@linear-code

linear-code Bot commented Jul 2, 2026

Copy link
Copy Markdown

ENG-8371

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This docs-only PR fills two gaps in the database documentation: the undocumented reflex[db] optional extra and the required async_db_url configuration for rx.asession.

  • docs/database/overview.md: adds an Installation section documenting pip install "reflex[db]" to install SQLModel and Alembic as an optional extra.
  • docs/database/queries.md: adds a Configuring the Async Database URL subsection with a complete rxconfig.py example, per-driver install steps (aiosqlite for SQLite, psycopg3 for PostgreSQL), and a note that async drivers are not bundled in the reflex[db] extra. Previously-reviewed concerns (dangling "as shown above", incorrect dependency listing) are resolved in this revision.

Confidence Score: 5/5

Docs-only change with no runtime code modified; safe to merge.

Both additions are accurate: the reflex[db] extra does install SQLModel and Alembic, async_db_url is genuinely required for rx.asession, and the psycopg3 claim that a single postgresql+psycopg:// URL works for both sync and async engines is correct per SQLAlchemy 2.x + psycopg3 documentation. Previously flagged issues from earlier review rounds are resolved in this revision.

No files require special attention.

Important Files Changed

Filename Overview
docs/database/overview.md Adds a new "Installation" section documenting the reflex[db] optional extra (SQLModel + Alembic), placed appropriately between the NoSQL callout and the Connecting section.
docs/database/queries.md Adds a "Configuring the Async Database URL" subsection before the existing rx.asession usage examples, covering the required async_db_url config, aiosqlite install for SQLite, and psycopg3 for PostgreSQL. Previously-flagged issues (dangling "as shown above", asyncpg install step) are resolved.

Reviews (3): Last reviewed commit: "docs: tighten async database prose" | Re-trigger Greptile

Comment thread docs/database/queries.md Outdated
Comment thread docs/database/overview.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd68a02fd9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/database/queries.md Outdated
@codspeed-hq

codspeed-hq Bot commented Jul 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing claude/angry-shtern-7f3f2b (899ce98) with main (4c63f00)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@adhami3310 adhami3310 added the documentation Improvements or additions to documentation label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant