Skip to main content

Database Connections

Configure PostgreSQL, MySQL, SQLite, and Turso without mixing their connection contracts.

Studio presents each supported engine as a separate database option. SQLite and Turso share SQLite SQL semantics, but they use different connection and credential contracts.

EngineURLCredentialsStudio access
PostgreSQLpostgres:// or postgresql://URL or server environmentRead-only by default; typed writes are policy gated
MySQLmysql://URL or server environmentRead-only by default; typed writes are policy gated
SQLitefile: or sqlite:NoneAlways read-only
Tursolibsql: or turso:Separate auth tokenAlways read-only

SQLite

The URL must reference an existing local database file. Query strings and URL fragments are rejected.

export default defineTesseraConfig({
  database: {
    url: "file:/absolute/path/to/warehouse.db",
  },
});

SQLite exposes the main schema, uses ? parameters, and runs every public query in a read transaction.

Turso

Keep the token separate from the URL:

export default defineTesseraConfig({
  database: {
    url: "libsql://warehouse-org.turso.io",
    authToken: process.env.TURSO_AUTH_TOKEN,
  },
});

When database.authToken is omitted, Studio reads TURSO_AUTH_TOKEN. URL credentials, query strings, and fragments are rejected. HTTPS and WSS are also accepted; unencrypted HTTP and WS are limited to loopback development servers.

Catalog scope and limits

PostgreSQL and MySQL can narrow discovery with database.schemas. SQLite and Turso expose only main. All connectors apply maxRows, statementTimeoutMs, cancellation, and bounded serialization before results reach the Agent.