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:

GroupTypes
RelationalMySQL, PostgreSQL, SQLite, SQL Server, Redshift, GaussDB, openGauss, KWDB, RQLite, Turso, Cloudflare D1
AnalyticsClickHouse, Doris, StarRocks, QuestDB, InfluxDB 3.x, VictoriaMetrics
Key-value and wide-columnRedis, Apache HBase
SearchElasticsearch, Easysearch, Meilisearch, Apache Solr, Manticore Search
DocumentApache CouchDB
VectorQdrant, ChromaDB, Milvus, Weaviate
OtherSalesforce, 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.

  1. Open Settings ▸ Database Or turn on Database in the features step of the first-run setup.
  2. Turn on "Enable ADB" The Database icon appears in the Activity Bar, and the database tools appear in the agents' tool list.
  3. 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:

ToolWhat it does
adbListConnectionsLists saved connections: name, type and host. Never passwords.
adbGetSchemaContextReturns tables, columns and keys for a database.
adbExecuteQueryRuns a query.
adbProposeChangeProposes 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#

Reads go straight through; changes wait for you
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:

CallApproval
Listing, describing, reading routines and schemaNever asked
SELECT, WITH, SHOW, DESCRIBE, EXPLAIN, VALUESNever asked
INSERT, UPDATE, CREATE, ALTER and other writesAsked
DROP, TRUNCATE, GRANT, DELETE or UPDATE without WHEREAsked, marked as destructive
Adding or copying a saved connectionAsked; the prompt never shows the password
Removing a saved connectionAsked, marked as destructive
Anything IZ Code cannot classifyAsked

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:

settings.json
{
  "izcode.adb.connectionEnvironments": {
    "shop-prod": "prod",
    "shop-staging": "staging",
    "scratch": "local"
  }
}

Keys are connection names or ids. An unlabeled connection counts as dev.

EnvironmentIn chatIn a workflow step or unattended task
localNormal rulesNormal rules
devNormal rules (writes ask)Reads only
stagingReads onlyReads only
prodReads only, each one askedNothing

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#

SettingValuesDefault
izcode.adb.enabledtrue, falsefalse
izcode.adb.idleStopMinutesminutes, 0 = never stop10
izcode.adb.connectionEnvironmentsobject: connection name or id → local, dev, staging, prodnone (all dev)

Settings ▸ Database also shows the engine state (Stopped, Starting…, Running.) and a Stop now button. The engine starts again on next use.

Tips and limits#

Last updated: December 1, 2026Was this page helpful?