We just added Cloudflare D1 support to Dory.
Dory can now connect directly to a Cloudflare D1 database as a first-class data source. You can browse your D1 schema, inspect tables, preview data, and run SQL from the same workspace you use for other databases.
What Is Supported
The first version focuses on the core database exploration workflow:
- Test connection
- Run SQL in the SQL Console
- Browse databases, tables, and views
- Inspect table columns
- Preview table data
- View table DDL
- Use SQLite-compatible SQL behavior
Cloudflare D1 is treated as a remote SQLite-like database, but it has its own dedicated driver inside Dory. We intentionally did not reuse the local SQLite file runtime because D1 runs through Cloudflare's remote API surface.
How It Works
This integration uses Cloudflare's official D1 REST query API:
POST /accounts/{account_id}/d1/database/{database_id}/query
Dory sends SQL and positional parameters to the Cloudflare API, then normalizes the response into Dory's standard query result format.
Connection settings are simple:
- Cloudflare Account ID
- D1 Database ID
- Cloudflare API Token
The API token is handled through Dory's existing encrypted identity secret path. It is not stored in connection options or displayed in the UI.
SQLite Semantics
D1 is SQLite-compatible, so Dory maps the SQL dialect to SQLite for formatting, editor behavior, metadata queries, and table preview SQL.
For metadata, Dory uses standard SQLite-style introspection, such as querying sqlite_schema for tables and views.
Column details use PRAGMA table_xinfo(...).
DDL display reads from sqlite_master or sqlite_schema, with a fallback generated from column metadata when needed.
Why This Matters
Cloudflare D1 is a good fit for serverless applications, edge workloads, prototypes, and lightweight production systems. But once a database exists, teams still need practical tools to inspect, query, and understand it.
With this integration, Dory can be used as a lightweight workbench for D1:
- Check what tables exist
- Inspect schema quickly
- Run ad hoc SQL
- Preview rows without writing a Worker
- Review DDL from the table browser
Current Scope
This first version is intentionally focused.
It does not add D1-specific management features such as import/export, time travel, metrics, permission management, or custom Worker proxy protocols.
The goal is direct database access and exploration through the official Cloudflare REST API.
What Is Next
We will keep improving the D1 experience based on real usage. Possible next steps include better D1-specific metadata, richer schema summaries, and workflow improvements around serverless database debugging.
For now: Dory x Cloudflare D1 is available as a new data source.
Download Dory: https://getdory.dev
Top comments (0)