Database
Database is a built-in database client: connect to a database, browse its schema, run queries and edit data without leaving IZ Code. The same connections are available to agents, which can read freely and must ask you before they change anything.
What it is#
Database adds a Database icon to the Activity Bar. The sidebar shows your saved connections as a tree. Each query, table or tool you open becomes a normal editor tab, next to your code.
The database engine runs as a separate process on your computer. It starts the first time you use Database and stops itself after a period without use. While the feature is off, nothing of it runs or loads, and agents see no database tools.
Use it when you want to:
- check what is really in a table while you write the code that reads it;
- let an agent look up the schema before it writes a query or a migration;
- run SQL an agent wrote in chat and look at the result in a grid.
Supported databases#
The connection dialog offers these types:
| Group | Types |
|---|---|
| Relational | MySQL, PostgreSQL, SQLite, SQL Server, Redshift, GaussDB, openGauss, KWDB, RQLite, Turso, Cloudflare D1 |
| Analytics | ClickHouse, Doris, StarRocks, QuestDB, InfluxDB 3.x, VictoriaMetrics |
| Key-value and wide-column | Redis, Apache HBase |
| Search | Elasticsearch, Easysearch, Meilisearch, Apache Solr, Manticore Search |
| Document | Apache CouchDB |
| Vector | Qdrant, ChromaDB, Milvus, Weaviate |
| Other | Salesforce, Nacos, Consul, Message Queue (Kafka and others), MQTT |
What you can do depends on the type. For full SQL databases you get schema browsing, schema search and editing of table data. For some types, such as Redis or the search engines, you get a connection and a query console, or browsing only.
Turn it on#
Database is off by default.
- Open Settings ▸ Database Or turn on Database in the features step of the first-run setup.
- Turn on "Enable ADB" The Database icon appears in the Activity Bar, and the database tools appear in the agents' tool list.
- Open the Database view and add a connection Pick the type, enter the host, port, user and password, and save. The engine starts in the background the first time.
Work with your data#
- Query editor. Write SQL, run it and see the result in a grid. Saved queries and history are kept for you.
- Tables. Open a table to browse, sort, filter and edit rows. Schema tools include a structure editor, an ER diagram, schema diff, data compare and transfer.
- Backups and tunnels. Database backups and SSH tunnels are set up under Settings ▸ Database.
- Ask an agent. Fix with AI, Send to AI and Add to AI send the query, error or selected tables to IZ Code's chat, with the connection, database and schema named.
- From chat to the database. A SQL code block in chat has two extra buttons: Run in ADB opens a new query tab on the current connection and runs it, and Insert into ADB editor puts the SQL in a new tab without running it.
When Database is on, Settings ▸ Database has child pages for its own options: Appearance, Editor, SQL Formatter, Navigation, Data, Database Backups, Tunnels, Shortcuts, Snippets and MCP. Colors always follow your IZ Code theme.
How agents use it#
Agents reach your databases through IZ Code's built-in MCP tools. Every tool name starts with adb. Four are on as soon as Database is on:
| Tool | What it does |
|---|---|
adbListConnections | Lists saved connections: name, type and host. Never passwords. |
adbGetSchemaContext | Returns tables, columns and keys for a database. |
adbExecuteQuery | Runs a query. |
adbProposeChange | Proposes a SQL file from the project for you to approve and run. |
More tools (list databases and tables, describe a table, sessions and transactions, open a table in your Database view, run read-only SQL in a new tab, Redis commands, message queues, add or remove connections) are off until you turn them on in the chat's Configure Tools list.
What needs your approval#
flowchart TD
A[Agent] --> T[adb tool call]
T --> C{Read or change?}
C -- Read --> DB[(Your database)]
C -- Change --> Y{You approve?}
Y -- Allow --> DB
Y -- Deny --> X([Refused])IZ Code decides per call:
| Call | Approval |
|---|---|
| Listing, describing, reading routines and schema | Never asked |
SELECT, WITH, SHOW, DESCRIBE, EXPLAIN, VALUES | Never asked |
INSERT, UPDATE, CREATE, ALTER and other writes | Asked |
DROP, TRUNCATE, GRANT, DELETE or UPDATE without WHERE | Asked, marked as destructive |
| Adding or copying a saved connection | Asked; the prompt never shows the password |
| Removing a saved connection | Asked, marked as destructive |
| Anything IZ Code cannot classify | Asked |
SQL counts as a read only when it clearly is one. Anything that cannot be parsed is treated as a write.
The engine also checks every agent call on its own. Until you save a write policy in Settings ▸ Database ▸ MCP, agents are read-only there, whatever you approve. Per-connection rules, such as a read-only connection or a list of allowed connections, are enforced by the engine as well.
Production connections#
Label each connection with the environment it points at, in your user settings:
{
"izcode.adb.connectionEnvironments": {
"shop-prod": "prod",
"shop-staging": "staging",
"scratch": "local"
}
}Keys are connection names or ids. An unlabeled connection counts as dev.
| Environment | In chat | In a workflow step or unattended task |
|---|---|---|
local | Normal rules | Normal rules |
dev | Normal rules (writes ask) | Reads only |
staging | Reads only | Reads only |
prod | Reads only, each one asked | Nothing |
To change a database the agent may not write to directly, it uses adbProposeChange. It writes the change into a .sql file in the project and asks you. The prompt shows the connection, its environment, the file and the start of the SQL. When you approve, IZ Code runs that exact file, in one transaction when the database supports it. If the file changes after you approve, it is not run.
Secrets#
Agents never receive connection passwords. Results returned to an agent have values under keys like password, token or secret masked, and long results are cut off. A password an agent types into a chat message still goes to the model with that message, so enter passwords in the connection dialog yourself.
Settings#
| Setting | Values | Default |
|---|---|---|
izcode.adb.enabled | true, false | false |
izcode.adb.idleStopMinutes | minutes, 0 = never stop | 10 |
izcode.adb.connectionEnvironments | object: connection name or id → local, dev, staging, prod | none (all dev) |
Settings ▸ Database also shows the engine state (Stopped, Starting…, Running.) and a Stop now button. The engine starts again on next use.