Workspace

Databases

PostgreSQL, SQLite, MongoDB, and Redis in the same project. Each connection picks an engine; the workspace changes with it.

A Based project can hold any mix of the four engines. The engine is a field on the connection file (engine = "postgres","sqlite", "mongodb", or "redis"), not a separate app mode. Postgres is the deepest daily driver; SQLite, MongoDB, and Redis share the same catalog, tabs, and saved-query model.

At a glance

PostgreSQLSQLiteMongoDBRedis
Query languageSQLSQL (multi-statement scripts)Aggregation pipeline (JSON)Raw commands (console)
CatalogSchemas → tables, views, materialized viewsTables, views, triggersCollectionsKeys (first 2000, searchable)
Data viewerPaginated SELECT *Paginated SELECT *find(), first 200 documentsPer-key view: string, hash, list, set, zset
StructureColumns, indexes, constraints, statsColumns, indexes, constraints, DDLCollection stats / inferred schemaType, TTL, length, memory
ExplainEXPLAIN (FORMAT JSON)EXPLAIN QUERY PLAN——
AutocompleteNot yetTables, columns, keywords, functions——
Read-only modeNot in the connection fileread_only = true or a readonly tagNot in the connection fileNot in the connection file
Inline row editingNot shippedNot shippedDocument edit UI not wiredEdit strings, add/remove entries, set TTL, delete keys

PostgreSQL

Primary SQL engine via sqlx. A project connection needshost, database, and username.port defaults to 5432. Password should be{ env = "VAR" }, not a literal in git.

ssl on a connection file is a boolean: true maps to SSL mode Require, false (the default) toDisable. The New Connection wizard exposes the full set: Prefer, Require, Disable, Verify CA, Verify Full.

  • Ad-hoc SQL editor and saved [sql] queries.
  • Data viewer with page size from Settings (default 100 rows).
  • Structure inspector for tables and views.
  • Explain pane on the query editor.
  • Test-before-connect in the wizard (latency + server version).

SQLite

File-backed. file is a path relative to the repo root (or absolute). Connection-time PRAGMAs live in an optional[pragma] table and are applied when the pool opens.

KeyDefaultNotes
journal_modewalSkipped when the connection is read-only (would mutate storage).
synchronousnormalAlso skipped in read-only mode.
foreign_keystrueStill applied when read-only.

Set read_only = true (preferred) or a readonly tag to open with mode=ro: no writes, and no empty database created if the file is missing. The connection dashboard also shows a live PRAGMA snapshot.

SQLite is the only engine with SQL autocomplete today. Multi-statement scripts run as a batch; the last result is shown. Query timeout from Settings is enforced on SQLite runs.

MongoDB

Native driver. The connection file needs a url (literal URI or{ env = "MONGO_URL" }) and an optional defaultdatabase.

  • Catalog lists collections.
  • Pipeline builder: JSON array of stages, run against a collection.
  • Saved queries use [aggregate] with pipeline and usually collection.
  • Document viewer: flattened find(), capped at 200 documents.
  • Change-stream sampler opens on connect (needs a replica set; samples up to 64 events).

Introspection pipelines whose first stage is database-scoped (for example$listCollections) may omit collection; Based supplies a harmless default handle. Data pipelines that read documents must set collection.

Redis

Native async driver. The connection file needs a url(redis://[:password@]host:6379[/db], or rediss://for TLS), usually as { env = "REDIS_URL" }.

  • Catalog lists keys via SCAN (never KEYS), capped at 2000.
  • Key viewer shows type, TTL, length, and memory. Edit string values, add or remove hash/list/set/zset entries (first 500 shown), set or clear a TTL, and delete a key.
  • Console runs raw commands with redis-cli style output.FLUSHALL, FLUSHDB, DEBUG,SHUTDOWN, and KEYS * need a second Enter.
  • Not yet: streams, SSH tunnels, Cluster/Sentinel, saved queries.

What is not engine-specific

Saved queries, history, the command palette, export to CSV/XLSX, and the table grid chrome are shared. A query’s [target] decides which connection (and therefore which engine) it may run against — seeConnections andEditor.