SERVER / DATABASE

Database

Dowe Database is a Rust-owned server runtime for records, SQL-like reads, and local transactions. It does not require Node.js, SQLite, or an external service for local development.

Read data

MENTAL MODEL

Declare a handle, then bind results

db creates a server-only handle. query executes one Database operation and makes its binding available to the following server statements.

dowe
handler getBlog req
  db db1 name:"content"
  query blog db:db1.read table:"blogs" where:{ id:req.params.id } required:true
  return response json:{ ok:true data:blog }

HANDLE

db db1 name

Opens or reuses one named local Database under .dowe/db.

RESULT

query blog

Keeps the result variable explicit and inferable for later response data.

BOUNDARY

Server only

Views receive response data, never a Database handle or its credentials.

OPERATIONS

Choose the data flow

Use the ORM operations for predictable record access. Use query for the supported SQL-like read grammar. Transactions are intentionally local and narrow.

LOCAL AND REMOTE

Keep authority in the server declaration

A handle without host is local. A remote handle uses one host, user, and credential referenced only by server source; declare their names in .env.example. Remote transactions are not currently supported.

dowe
db db name:"clinic" host:env.DB_HOST user:"clinic-api" token:env.CLINIC_DB_TOKEN
query appointments db:db.list table:"appointments"