Skip to content

Releases: TheHolyOneZ/ZBase-Studio

ZBase-Studio v0.2.0

04 Jun 17:12

Choose a tag to compare

Changelog

All notable changes to ZBase Studio are documented here.


[0.2.0] — ER Edit Mode · Full-Database Export & Import

Added

Full-Database Export — PostgreSQL, MySQL, MariaDB

Right-click any PostgreSQL, MySQL, or MariaDB tab → Export Database… to dump the entire database to a .sql file.

PostgreSQL export options

  • Toggle structure (tables + constraints + indexes), data, views (regular + materialized), functions, triggers, sequences, enums
  • DROP … IF EXISTS CASCADE, IF NOT EXISTS, wrap in transaction
  • Disable triggers option (SET session_replication_role = 'replica') — requires superuser
  • INSERT or INSERT … ON CONFLICT DO NOTHING
  • Configurable batch size (1–5,000 rows); progress bar with live row counter
  • SERIAL / BIGSERIAL / SMALLSERIAL shorthand emitted for sequence-backed columns (survives DROP TABLE CASCADE on re-import)
  • FK constraints deferred to ALTER TABLE … ADD CONSTRAINT after all tables are created — handles FK cycles cleanly

MySQL / MariaDB export options

  • Toggle structure, data, views, routines (procedures + functions), triggers
  • DROP … IF EXISTS, IF NOT EXISTS, wrap in transaction
  • SET FOREIGN_KEY_CHECKS = 0 / 1 and SET UNIQUE_CHECKS = 0 / 1 around the dump
  • INSERT, REPLACE, or INSERT IGNORE
  • SHOW CREATE TABLE / SHOW CREATE VIEW / SHOW CREATE PROCEDURE / SHOW CREATE TRIGGER used verbatim — preserves all MariaDB-specific syntax (UUID, INET4, INVISIBLE columns, etc.)
  • Procedures and triggers wrapped in DELIMITER // … DELIMITER ;
  • Tables emitted in FK dependency order (topological sort) — no FK constraint errors on import for non-cyclic schemas
  • Blob / binary columns encoded as 0xHEX (X'' for empty blobs)
  • SET NAMES utf8mb4 charset header

Full-Database SQL Import — PostgreSQL, MySQL, MariaDB

Right-click any PostgreSQL, MySQL, or MariaDB tab → Import SQL… to replay a .sql dump against the live connection.

  • Dialect-aware statement splitter: PG supports $$-dollar-quoting and nested /* */; MySQL/MariaDB supports DELIMITER directives, backtick identifiers, # line comments, and /*!NNN …*/ conditional comments
  • Transaction-control statements (BEGIN, COMMIT, START TRANSACTION, SAVEPOINT) are automatically skipped — each statement executes in auto-commit over the pool
  • MySQL/MariaDB uses COM_QUERY (text protocol) via sqlx::raw_sql — supports CREATE PROCEDURE, CREATE TRIGGER, and all statement types rejected by the binary prepared-statement protocol
  • Stop-on-error or continue modes; live progress bar; error summary with statement index, preview, and message
  • Errors grouped and displayed after completion — no silent failures

Visual Schema Builder — ER Edit Mode

A full drag-and-drop schema editor lives inside the ER Diagram tab, toggled with a View / Edit segmented control in the top toolbar. Edit mode is SQLite-only; the toggle is disabled with a tooltip on all other engines.

Canvas interactions

  • Double-click empty canvas → creates a new table with a default id INTEGER PRIMARY KEY column, positioned in a grid layout
  • Click a node → opens the side panel for that table; click the background to dismiss
  • Delete / Backspace on a selected node → confirmation modal before dropping (shows estimated row count as a data-loss warning)
  • Ctrl+Z / Cmd+Z → undo; Ctrl+Shift+Z / Cmd+Shift+Z → redo (session-scoped per tab)

Drag-to-FK

  • Every column row exposes a source handle (right, 13 × 13 px — intentionally large) and a target handle (left, 9 × 9 px)
  • Drag from a source handle to any target handle → FK creation popover appears with ON DELETE / ON UPDATE dropdowns (custom themed, not native <select>)
  • FK edges rendered with a custom Bezier edge (FkEdge); type-affinity mismatch shows an amber ⚠ badge; non-default ON DELETE / ON UPDATE actions show a compact badge on the edge midpoint

Edge context menu

  • Right-click any FK edge → context menu with Edit FK actions… and Delete FK
  • Edit FK actions opens a modal to change ON DELETE / ON UPDATE without re-drawing the line
  • Delete FK removes the constraint from the source column and triggers auto-save

Side panel (clamp(380px, 30vw, 520px) wide — scales with screen)

  • Table tab — full TableEditor (column name, type, PK / AI / NN / UQ / FK chips, DEFAULT, CHECK, COLLATE, drag-to-reorder, composite PK, table-level CHECK constraints, WITHOUT ROWID, STRICT)
  • Indexes tab — shows all indexes on the selected table; add / remove indexes via IndexEditor; index count badge on the tab label
  • Dropping a live column (one that exists in the DB) requires confirmation with row-count warning

Toolbar

  • View / Edit toggle, Undo, Redo, Discard, Auto Layout — all in pill-group overlay, pointer-events isolated so the canvas stays interactive behind them
  • Dirty dot on the toolbar when there are unsaved (un-discarded) edits

Auto-save & reconciler

  • Every draft mutation is debounced 400 ms then diffed against the live schema (diffDrafts → planToStatements)
  • Safe ADD COLUMN used when possible; full 12-step rebuild (CREATE tmp → INSERT SELECT → DROP → RENAME) used for all other column changes and FK additions
  • Runs in a single Rust apply_schema_plan command: one pooled connection, BEGIN IMMEDIATE … COMMIT, PRAGMA foreign_keys=OFF/ON wrapping rebuild batches, per-rebuilt-table PRAGMA foreign_key_check before commit (avoids false rollbacks from pre-existing violations in unrelated tables)
  • On failure: draft is reverted to the last known-good live schema; error toast shows a human-readable message (SQLITE_BUSY, FK constraint violation, FK integrity check with row count, UNIQUE, NOT NULL)
  • On success: draft.snapshot is silently advanced to the new schema so Discard always goes back to the correct baseline without polluting undo history
  • Concurrent-change safety: if a draft mutation arrives while an apply is in-flight, a retry is scheduled automatically so no change is silently dropped

Schema fidelity on entry

  • schemaToErDraft enriches the converted draft by parsing each table's raw CREATE TABLE SQL from sqlite_master, preserving CHECK constraints, COLLATE, UNIQUE, and AUTOINCREMENT that are invisible to PRAGMA table_info

State isolation

  • Separate erDraftSlice (cloned from builderSliceFactory) keeps undo/redo history per tab, capped at 50 entries, with no cross-contamination between tabs or the existing Database Builder

Cable management

  • Drag the midpoint dot on any FK edge to reshape the curve — the edge stays connected; the path is stored per-edge in erEdgePoints
  • Double-click the midpoint dot to reset the edge back to the default auto-routed bezier

Changed

  • ErCanvas is now a pure switcher; view-mode logic extracted to ErViewCanvas
  • ErEditToolbar replaces the previous minimal Auto Layout overlay for both modes
  • SchemaSnapshot.tables[i].sql now included in Rust introspection result (fetched from sqlite_master) — other engines return an empty string

Fixed

  • Sidebar open/close flicker: replaced onSelectionChange (which fired with empty selection whenever the sidebar mounted and resized the canvas) with onNodeClick + onPaneClick for selection tracking
  • Tauri error serialization: errors from invoke come as { code, message } objects; error parser now extracts .message before pattern-matching instead of calling String(err) which produced [object Object]
  • All FK-related dropdowns use the custom SelectInput component (dark-themed portal dropdown) instead of native <select> elements
  • Persistence: FK connections and column changes now survive a restart and are visible in the Schema Builder — diffDrafts was not triggering a rebuild for FK action changes or new FK additions; fixed type comparison (now case-insensitive), added ON DELETE/ON UPDATE comparison, and fixed WITHOUT ROWID / STRICT / composite PK detection
  • Stale snapshot in auto-save: reconciler now reads snapshotRef.current when the debounce timer fires rather than the snapshot captured at effect registration time

[0.1.0] — Initial Release

  • SQLite: full schema browsing, query execution, table data viewer, Database Builder (visual schema editor with undo/redo), ER Diagram (view mode)
  • DuckDB: schema browsing and query execution (view-only)
  • PostgreSQL: schema browsing, query execution, Database Builder
  • Multi-tab interface with per-engine tab isolation
  • Dark theme with CSS design tokens throughout

ZBase-Studio v0.1.0

03 Jun 22:37
0fa04d2

Choose a tag to compare

ZBase Studio

ZBase Studio

One studio for every database engine you use.

Website GitHub release License Platform Built with Tauri Beta

⬇ Download Installers · Feature Matrix · Schema Builder · License


ZBase Studio is a native cross-platform database GUI that lets you browse, query, edit, and design schemas across five database engines — all in a single app. Open a SQLite file, connect to a remote PostgreSQL cluster, and explore a DuckDB analytics file at the same time, each in its own tab.

Note

Pre-built installers for Windows, macOS, and Linux are available at zsync.eu/zbase-studio (13–25 MB, no runtime required).


Table of Contents

Expand

Supported Engines

Engine Version Connection
SQLite 3.x Local file (.db, .sqlite, .sqlite3)
DuckDB 1.x Local file (.duckdb)
PostgreSQL 13 + Host / port / credentials
MySQL 8.0 + Host / port / credentials
MariaDB 10.3 + Host / port / credentials

Engine Feature Comparison

Feature SQLite DuckDB PostgreSQL MySQL MariaDB
Browse & paginate data
Sort columns
Filter columns
Inline cell editing
Add / delete rows
Query editor
ER Diagram
Stats tab
Full-database search
Visual schema builder
Export table
Export whole database ✅ (copy)
Import CSV
Import SQL file
Transaction bar

Tip

DuckDB is intentionally read-only in v1 — it's optimized for analytics workloads, not row-level mutations.


Download

Important

Download the latest release from zsync.eu/zbase-studio.
Installers are self-contained — no Java, no .NET, no Electron runtime required.

Platform Format Size
Windows x64 NSIS installer (.exe) ~13 MB
Windows x64 MSI package (.msi) ~18 MB
macOS Apple Silicon Disk image (.dmg) ~23 MB
macOS Intel x64 Disk image (.dmg) ~25 MB
Linux x64 .deb / .rpm ~25 MB
Linux x64 AppImage ~98 MB

SHA-256 checksums are provided alongside every release.


Opening a Database

Click the + button in the tab bar to open the connection chooser.

SQLite & DuckDB — File-based

Pick any .db, .sqlite, .sqlite3, or .duckdb file. ZBase Studio detects the engine automatically.

PostgreSQL

Fill in Host, Port (5432), Database, User/Password, and SSL Mode (Disable / Prefer / Require).

MySQL

Fill in Host, Port (3306), Database, and User/Password.

MariaDB

Same form as MySQL, default port 3307.

SQLite Templates

Don't have a database yet? Choose a built-in starter schema:

Template Tables
Blog users, posts, comments with foreign keys
E-Commerce customers, products, orders, order items
Inventory suppliers, items, locations, stock levels
Task Tracker projects, tasks, tags, task tags, users

Templates open as a draft tab — edit the schema, then save to a new .db file.

Open from CSV

Pick a .csv, .tsv, or .txt file. ZBase Studio auto-detects the delimiter, infers column types, and imports into a new or existing SQLite database.

Open a SQL script

Pick a .sql file — small scripts load into the query editor; large scripts execute directly against a database.


Browsing Data

Click any table in the sidebar to open it in the Data tab.

  • 200 rows per page — navigate with Prev / Next in the footer
  • Footer shows current range and estimated total (e.g. "1–200 of ~12,450")
  • NULL values appear in italic gray — visually distinct from empty strings
  • Right-click any cell: Copy cell, Copy row as JSON, Copy row as CSV

Sorting & Filtering

Sorting

Click any column header to cycle sort states:

  1. Click once → Ascending
  2. Click again → Descending
  3. Click again → Cleared

Filtering

Click the funnel icon in a column header to open the filter popup.

Available filter operators
Operator Meaning
= Exact match
!= Not equal
< Less than
<= Less than or equal
> Greater than
>= Greater than or equal
LIKE Pattern match (% and _ wildcards)
IS NULL Cell is null
IS NOT NULL Cell is not null

Multiple filters can be active simultaneously. Active filters appear as chips above the grid — click × on a chip to remove it.


Editing Data

Warning

Editing is available on SQLite, PostgreSQL, MySQL, and MariaDB only. DuckDB is read-only.

Click Edit in the data grid toolbar to enter edit mode.

Action How
Edit a cell Click it
Move to next column Tab
Commit edit Enter
Cancel edit Escape
Add a row Click Add Row
Delete rows Check rows → Delete (N)

Query Editor

The Query tab is powered by Monaco (the VS Code editor engine).

  • SQL syntax highlighting, 100+ keyword autocomplete, table/column suggestions
  • Run with the Run button or Ctrl+Enter (+Enter on macOS)
  • Results panel: row count, execution time, virtualized grid, NULL display, error messages
  • Per-tab query history (up to 200 entries, session-scoped)
  • Query content is auto-saved per file path and restored on next open

Schema Tree (Sidebar)

The left sidebar shows the live schema for the active tab:

  • Tables — row count badge; click to open in Data view
  • Views — openable in Data view (read-only)
  • Triggers — listed for reference

Right-click a table:

Item Engines
Edit Table… SQLite only
Open in Schema Builder… PostgreSQL, MySQL, MariaDB
Export table… All
Copy table name All

ER Diagram

The ER Diagram tab renders your full schema as an interactive node graph.

  • Tables as cards — column names, types, PK (yellow) and FK (cyan) badges
  • Lines connecting tables with FK relationships, labeled col → referenced_col
  • Drag nodes to rearrange — positions persist per tab
  • Auto Layout button, mini-map, zoom, and pan controls

Available on all five engines.


Schema Builder

ZBase Studio includes a full visual schema designer with live DDL preview and diff-based apply.


SQLite Builder

A standalone draft tab — design from scratch, then save. Or clone an existing schema via Edit Schema in Builder….

Column options
  • Type: INTEGER, TEXT, REAL, BLOB, NUMERIC, BOOLEAN, DATE, DATETIME, or any custom type
  • Constraint chips: PK, AI (autoincrement), NN (not null), UQ (unique)
  • Foreign key: referenced table/column, ON DELETE/UPDATE actions
  • DEFAULT expression, CHECK expression, COLLATION (BINARY, NOCASE, RTRIM)
  • Composite primary key, table-level CHECK constraints
  • WITHOUT ROWID and STRICT mode toggles
  • Indexes (UNIQUE, partial WHERE clause), Views, Triggers
  • Full undo/redo — Ctrl+Z / Ctrl+Shift+Z
  • Save Database… executes all DDL and promotes the draft to a live tab

PostgreSQL Builder

Live diff against t...

Read more