Skip to content

IndexedDB Tables

Menu: Database → IndexedDB Tables
Deep link: /_Admin/database/table?SiteId={siteGuid}

IndexedDB tables are the site’s built-in dynamic table storage: after defining table names and fields (columns) in the admin, you maintain data on this page and read/write in KScript through k.DB.indexedDb.{tableName}. Data is isolated per site; no separate connection string is required.

Permissions

List and browse data: database (view). Create table, change columns, and create/update/delete data require database·edit; multi-select delete of tables or rows requires database·delete.

Difference from SQLite / MySQL menus

IndexedDB tablesSQLite tables, etc.
StorageSite IndexedDB dynamic tablesSite SQLite file or external database connections
Create tableEnter table name in adminSQLite works out of the box; MySQL/SQL Server require connection setup first
Change schemaMaintain fields on Column settings pageMostly existing physical tables; capabilities depend on the UI
Scriptk.DB.indexedDb.tableNamek.DB.sqlite, etc.

See Database overview.

How to Open

  1. In Edit Menu, check Database → IndexedDB Tables.
  2. Open Database → IndexedDB Tables in the left sidebar.
IndexedDB table list

Table List

Toolbar

ButtonPermissionDescription
Create tabledatabase·editOpens the create table dialog
Table list toolbar

List

Column / actionDescription
NameClick the table name to open table data
Row Settings (gear)Opens column settings
Multi-select DeleteDeletes the entire table and its data (database·delete)

System internal table names starting with _sys_ or _koobootemp are not shown in the list.

Table list

Create table dialog

FieldRule
Table nameRequired; 1–50 characters; must start with a letter or digit; letters and digits only; unique within the site

After confirmation, the table definition is registered. You can open Column settings to add fields, or click the table name to maintain data directly (empty tables can receive data first; columns take effect when Column settings is saved).

Create table dialog

Column Settings

Route: /_Admin/database/table/columns?SiteId=...&table={tableName}

Enter from list Settings, or from Settings on the Table data toolbar. The page header shows the current table name.

Toolbar

ButtonDescription
New columnOpens the column editor dialog

Column list

ColumnDescription
Column nameField name
Control typeSee table below
Primary key / UniqueShown only for IndexedDB tables
IndexWhether an index is created (primary key columns are treated as indexed)
Edit / DeleteChange column definition; remove column from list (effective after save)

Bottom Save / Cancel: Save writes the full column definition back to the site; unsaved changes prompt before leaving. Internal fields _id (primary key) and _version are not shown in the list.

Column settings list

Column editor dialog

FieldDescription
NameRequired when creating; cannot be renamed after save
Control typeDetermines data type and input control (see below)
LengthMax length for text controls
OptionsSelect / checkbox / radio require display name and value
Auto-incrementNumber type only: increments by seed and step; not editable on the data edit page
Primary keyBusiness primary key marker (coexists with system _id; use per table design)
UniqueColumn values must be unique
IndexQuery index
Control type (UI)Typical use
Text boxShort text
TextareaLong text
Rich textHTML content
Select / checkbox / radioEnumerated options
BooleanYes/no
Date-timeDate and time
NumberNumeric values; can auto-increment
Column editor dialog

Table Data

Route: /_Admin/database/table/data?SiteId=...&table={tableName}

Click a table name in the list to open.

Toolbar

ButtonPermissionDescription
New datadatabase·editOpens edit data (create)
Export datadatabase (view)Exports current filter/sort data as CSV
SettingsJump to Column settings

No CSV import

The IndexedDB tables data page does not provide an Import data button (that feature is on SQLite / MySQL / SQL Server table menus). For bulk writes use script k.DB.indexedDb or custom import logic.

Table data toolbar

Data table

  • Columns: business fields except _id and _version; headers support sorting (sort state is saved locally in the browser).
  • Pagination: default 30 rows per page; page through results.
  • Row Edit: opens edit data.
  • Multi-select Delete: deletes rows by primary key (database·delete).

Date-time columns are formatted as local time in the list.

Table data list

Edit Data

Route: /_Admin/database/table/edit-data?SiteId=...&table={tableName} (no id when creating; id when editing)

Form fields are rendered by control type from Column settings: text, rich text, options, boolean, date-time, number, etc. Auto-increment fields show the current value only and cannot be edited.

Save returns to the Table data list; Cancel discards and returns.

Script access (development)

In Code / module server-side scripts, access tables as properties of k.DB.indexedDb, for example:

typescript
const row = k.DB.indexedDb.orders.find("orderNo", "A1001")
k.DB.indexedDb.orders.add({ orderNo: "A1002", amount: 99 })

Chained APIs (find / findAll / add / update / delete / pagination, etc.) are documented in k.DB.indexedDb. Column and data changes made in the admin use the same tables as scripts.

SQL logs

IndexedDB operations are not written to SQL logs. Only SQL from k.DB.sqlite / MySQL / SQL Server appears in SQL logs when site SQL logging is enabled.

Typical workflow

  1. Create table with a valid table name.
  2. Open Settings, New column, and Save the column definition.
  3. Click the table name, New data to enter records, or write via script.
  4. For multi-table associations, configure IndexedDB table relations.
  5. For troubleshooting or auditing, see SQL logs.
DocDescription
Database overviewSubmenus and routes
IndexedDB table relationsTable associations
k.DB.indexedDbFull script API
Development · CodeWriting Code that calls tables