ORM Studio

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.

6 min readUpdated DocumentationEdit this page
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.

DatabaseDriver packageHow Studio connects
SQLitebetter-sqlite3Read-only file handle on DATABASE_FILENAME
PostgreSQLpgPool (max 2 connections) on DATABASE_URL
MySQLmysql2Pool 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

ControlWhat it does
Search all columns…Case-insensitive "contains" match across every column
FilterAdds a filter (see below)
ColumnsShow or hide columns; Show all columns resets. Remembered per table
ExportExports the current page (see below)
ReloadFetches 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.

OperatorConditionNotes
eqequals=
neqnot equal<>
containscontainsCase-insensitive, matches anywhere in the value
startsstarts withCase-insensitive
gtgreater than>
gtegreater or equal>=
ltless than<
lteless or equal<=
nullis nullNo value needed
notnullis not nullNo 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

ValueShown as
NULLA NULL pill
Booleans (and 0/1 in bool columns)true / false with a check or cross
Foreign-key valuesA link to the referenced row (see below)
NumbersRight-aligned digits
Objects and JSON stringsA 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 stringsThe 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.

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, PK badge, a foreign-key badge that opens the referenced row, a JSON badge 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:

ItemResult
Download CSV<table>.csv (or <table>-p3.csv for page 3)
Download JSON<table>.json (or <table>-p3.json)
Copy as JSONRows as a JSON array on the clipboard
Copy as CSVRows 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).

BadgeMeaning
PRIMARY KEYPart of the primary key
UNIQUEUnique constraint, or a single-column unique index
FOREIGN KEYReferences another table
NULL / NOT NULLNullability (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?

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY