Database Browser
Browse SQLite, PostgreSQL and MySQL tables in Axil Studio with server-side sort, search and filters, row details, FK links and CSV/JSON export.
On this page12
The Database view (#/database, shortcut g d) lets you browse every table Studio can see, read-only. Each table has three tabs: Data, Structure and Relations.
| Database | Driver package | How Studio connects |
|---|---|---|
| SQLite | better-sqlite3 | Read-only file handle on DATABASE_FILENAME |
| PostgreSQL | pg | Pool (max 2 connections) on DATABASE_URL |
| MySQL | mysql2 | Pool on DATABASE_URL |
If no database is connected, the view says so and explains how to point Studio at one.
Table list
The left pane lists the tables with their row count and column count, plus a Search tables… box. Pick a table to open it at #/database/<name>. On narrow screens the list and the table are shown one at a time, with a Tables back button.
The table header shows its row and column counts and a Query in SQL button, which opens the SQL console with SELECT * FROM <table> LIMIT 100; and runs it.
Data tab
Rows are fetched page by page from GET /api/studio/table/:name. Sorting, searching, filtering and paging all happen in the database, so they work on tables of any size.
Toolbar
| Control | What it does |
|---|---|
| Search all columns… | Case-insensitive "contains" match across every column |
| Filter | Adds a filter (see below) |
| Columns | Show or hide columns; Show all columns resets. Remembered per table |
| Export | Exports the current page (see below) |
| Reload | Fetches the current page again |
Sorting
Click a column header (or focus it and press Enter) to sort ascending, again for descending, and a third time to clear the sort. The footer shows the active sort.
Filters
Filter opens a small form: choose a column, a condition and (when needed) a value, then Add filter or press Enter. Active filters appear as chips under the toolbar ("Where column condition value"); remove one with its ✕ or all of them with Clear all. Filters are combined with AND.
| Operator | Condition | Notes |
|---|---|---|
eq | equals | = |
neq | not equal | <> |
contains | contains | Case-insensitive, matches anywhere in the value |
starts | starts with | Case-insensitive |
gt | greater than | > |
gte | greater or equal | >= |
lt | less than | < |
lte | less or equal | <= |
null | is null | No value needed |
notnull | is not null | No value needed |
Filters are written to the URL (#/database/orders?f=...), so a filtered view can be bookmarked or shared. If the database rejects a filter (for example comparing text with an integer column on PostgreSQL), the grid shows Couldn't load rows with the database error and a Reset filters & sort button.
Pagination
The footer shows the visible range and total (1–50 of 1,204 rows), the active sort and the number of hidden columns. Pick 25, 50, 100 or 250 rows per page (remembered in the browser), use the previous/next buttons, or type a page number and press Enter.
Cell rendering
| Value | Shown as |
|---|---|
NULL | A NULL pill |
Booleans (and 0/1 in bool columns) | true / false with a check or cross |
| Foreign-key values | A link to the referenced row (see below) |
| Numbers | Right-aligned digits |
| Objects and JSON strings | A JSON label plus compact JSON (cut at 90 characters) |
| Binary (Buffer) | <binary 1.2 KB>-style size label |
Dates and timestamps (YYYY-MM-DD, optionally with a time) | Date and time, with UTC for a Z suffix; the original text on hover |
| Other strings | The text, cut at 160 characters |
Column headers show a key icon for primary keys, a link icon for foreign keys (the tooltip names the target table.column) and the column type.
Foreign-key links
A foreign-key cell links to the referenced table, filtered to the matching row: for orders.user_id = 7 it opens users with the filter id = 7. This is how you follow relations from row to row.
Row details and copying
- Click a row to open a side drawer with every field: name, type,
PKbadge, a foreign-key badge that opens the referenced row, aJSONbadge for JSON values (shown pretty-printed), and a copy button per field. The drawer footer has Copy row as JSON. - Double-click a cell to copy its value.
Export
Export works on the current page and the visible columns:
| Item | Result |
|---|---|
| Download CSV | <table>.csv (or <table>-p3.csv for page 3) |
| Download JSON | <table>.json (or <table>-p3.json) |
| Copy as JSON | Rows as a JSON array on the clipboard |
| Copy as CSV | Rows as CSV on the clipboard |
Tip
To export more than one page, raise the page size to 250 or run a query in the SQL console and export its results.
Structure tab
#/database/<name>/structure shows the table definition.
Columns: position, name, type, constraint badges, default value and the referenced column for foreign keys (a link to that table's structure).
| Badge | Meaning |
|---|---|
| PRIMARY KEY | Part of the primary key |
| UNIQUE | Unique constraint, or a single-column unique index |
| FOREIGN KEY | References another table |
| NULL / NOT NULL | Nullability (not shown for primary keys) |
Foreign keys: each column and the table.column it references.
Indexes: index name, its columns and its type (UNIQUE or INDEX). Tables with no secondary indexes say so; primary keys are indexed implicitly.
Foreign keys and indexes come from GET /api/studio/schema: PRAGMA foreign_key_list / index_list on SQLite, information_schema and pg_index on PostgreSQL, and information_schema on MySQL. If that endpoint fails, the cards say the metadata is unavailable.
Relations tab
#/database/<name>/relations lists:
- References: outgoing foreign keys (
orders.user_id → users.id). - Referenced by: incoming foreign keys from other tables (
order_items.order_id → orders.id).
Each row opens the other table. The tab shows the total number of relations as a count. For the whole picture, open the Schema diagram.
Was this page helpful?