Skip to main content
Available now

Query local databases; write operations under strict approval

Parameterized SELECT queries by default. INSERT/UPDATE within allowlists require approval.

What SQL & Data does

SQL & Data provides safe database access with parameterized queries. Read operations are enabled by default. Write operations (INSERT, UPDATE, DELETE) require explicit approval and schema allowlisting to prevent accidental data loss.

Reader capabilities

  • Parameterized SELECT queries
  • Schema introspection
  • Result streaming for large datasets

Writer capabilities Gated

  • INSERT/UPDATE/DELETE (requires approval)
  • Schema migrations (gated)
  • Bulk operations (gated)
Read-only by default: Writes require explicit enablement and approval. All queries are strictly parameterized to prevent SQL injection.

Who benefits from SQL & Data

Individuals

Personal data analysis without risk

Example: "Show top 10 overdue tasks" — safe SELECT query with no write risk.

Teams & Managers

Ops dashboards from on-prem data

Example: Generate weekly reports from local database—no cloud, no data exfiltration.

Developers & IT

Strict parameterization and safe migrations

Example: Run schema migrations with approval gates and diff previews.

Security & Compliance

Read defaults; writes require consent

Control: All writes gated. Audit logs show who changed what and when.

How it works

1

Connect via DSN

Configure database connection string. Supports PostgreSQL, MySQL, SQLite, and others.

2

Run parameterized queries

Use sql.query with parameters. All queries are strictly parameterized to prevent SQL injection.

3

Stream results

Results are streamed for large datasets. Pagination and limits configurable.

4

Optional: Execute writes (gated)

Use sql.execute for INSERT/UPDATE/DELETE. Requires approval and schema allowlisting.

Safety & approvals: Strictly parameterized queries. Write gates prevent accidental data loss. Audit diffs for all changes.

Example workflows

Show top 10 overdue tasks

Read-only
Input:

"Show me the top 10 overdue tasks"

Steps:
  1. sql.query (SELECT * FROM tasks WHERE due_date < NOW() ORDER BY due_date LIMIT 10)
  2. Format results as table
Output:

Table of overdue tasks—no write risk

Add new record

Approval before write
Input:

"Add a new task: 'Review Q3 report' due next Friday"

Steps:
  1. sql.execute (INSERT INTO tasks ...) — pauses for approval
  2. Preview diff: +1 row
  3. Execute after approval
Output:

New task added with approval timestamp

Generate weekly report

Read-only
Input:

Generate weekly sales report from local database

Steps:
  1. sql.query (SELECT ... FROM sales WHERE week = ...)
  2. Aggregate and format results
  3. Generate report with charts
Output:

Weekly report—no cloud, no data exfiltration

Technical details

Key tools

  • sql.query
  • sql.execute (gated)
  • sql.introspect
  • sql.migrate (gated)
View tool schemas

Configuration

  • DSN — database connection string
  • READ_ONLY — true (default)
  • SCHEMA_ALLOWLIST — allowed tables for writes
  • MAX_ROWS — result limit (default: 1000)

Performance notes

  • Query: depends on database and query complexity
  • Streaming: 100-1000 rows/sec
  • Writes: depends on transaction size

Observability

  • Query latency and row counts
  • Write approvals and affected rows
  • Connection pool metrics

Security posture

Strictly parameterized

All queries use parameterized statements. SQL injection is impossible.

Write gates

All writes require approval. Schema allowlists restrict which tables can be modified.

Audit diffs

All writes logged with diffs showing before/after state.

Read-only by default

Writes disabled unless explicitly enabled. No accidental data loss.

Roadmap & status

Available

Current features

  • Parameterized SELECT queries
  • Schema introspection
  • Result streaming
Planned

Coming soon

  • Gated writes (INSERT/UPDATE/DELETE)
  • Migration helpers with approval gates
  • Query plan analysis and optimization
View full roadmap

Frequently asked questions

Ready to query your data safely?

Get started with SQL & Data in minutes. Read-only by default, writes require approval.