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)
Who benefits from SQL & Data
Individuals
Personal data analysis without risk
Teams & Managers
Ops dashboards from on-prem data
Developers & IT
Strict parameterization and safe migrations
Security & Compliance
Read defaults; writes require consent
How it works
Connect via DSN
Configure database connection string. Supports PostgreSQL, MySQL, SQLite, and others.
Run parameterized queries
Use sql.query with parameters. All queries are strictly parameterized to prevent SQL injection.
Stream results
Results are streamed for large datasets. Pagination and limits configurable.
Optional: Execute writes (gated)
Use sql.execute for INSERT/UPDATE/DELETE. Requires approval and schema allowlisting.
Example workflows
Show top 10 overdue tasks
Read-only"Show me the top 10 overdue tasks"
- sql.query (SELECT * FROM tasks WHERE due_date < NOW() ORDER BY due_date LIMIT 10)
- Format results as table
Table of overdue tasks—no write risk
Add new record
Approval before write"Add a new task: 'Review Q3 report' due next Friday"
- sql.execute (INSERT INTO tasks ...) — pauses for approval
- Preview diff: +1 row
- Execute after approval
New task added with approval timestamp
Generate weekly report
Read-onlyGenerate weekly sales report from local database
- sql.query (SELECT ... FROM sales WHERE week = ...)
- Aggregate and format results
- Generate report with charts
Weekly report—no cloud, no data exfiltration
Technical details
Configuration
DSN— database connection stringREAD_ONLY— true (default)SCHEMA_ALLOWLIST— allowed tables for writesMAX_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
Current features
- Parameterized SELECT queries
- Schema introspection
- Result streaming
Coming soon
- Gated writes (INSERT/UPDATE/DELETE)
- Migration helpers with approval gates
- Query plan analysis and optimization
Frequently asked questions
Ready to query your data safely?
Get started with SQL & Data in minutes. Read-only by default, writes require approval.