On-device storage

DataMind Oda keeps its own records on your computer: workspace records and the extra details attached to individual chats. This page is the reference for the storage layer behind those records: its parts, the two stores it can use, what every write guarantees, and its limits. Your own files are not part of this storage (see Workspaces, files and permissions), and chat logs and saved credentials have stores of their own (Chat logs on disk, Stored credentials).

The parts of the storage layer

Records are grouped into units: one unit is one named set of records kept by one backend. Within a unit, records sit in tables, and the unit can also keep single global values that are not tied to a record.

Note

This storage is Oda's own bookkeeping. It adds nothing to a model request, and no part of it is shown to the model.

The file store

The file store keeps each unit as files under one folder, in plain, formatted JSON that a person can read.

The database store

The database store keeps every unit in one SQLite database file.

How writes and reads behave

How storage is set up

ChoiceWhat it decidesDefault and limits
File store folderWhere the JSON files live.No default; chosen at setup and created when first needed.
Database pathWhich SQLite database holds the records.One file path, or an in-memory database that lasts only while the program runs.
Journal modeHow the database keeps its journal while it works.wal by default; delete, truncate or persist on filesystems where the shared files wal needs do not work, such as some network mounts; memory and off are refused.
Backend per domainWhich store keeps a given domain.One backend is the default for domains that do not choose; a domain can be routed to a different backend.

Names follow strict patterns: a unit or table name starts with a lowercase letter and continues with lowercase letters, digits and underscores; a record key uses letters, digits, hyphens and underscores. A name outside its pattern is refused before anything is written.

Limits and safety

Failure messages

When something is wrong with the storage's setup or its stored data, the failure names the problem instead of staying silent. Examples:

Questions, answered

What does Oda keep in this storage?

Oda's own records: its workspace list and the details it keeps about individual chats, so they survive a restart. Your own files are not part of it; they stay in the folders you gave Oda, as described in Workspaces, files and permissions.

Is this storage sent to the model?

No. Nothing in it is shown to the model, and it adds nothing to a model request. It is Oda's own bookkeeping, kept apart from the content of a chat.

Can I choose where the files are kept?

The folder for the file store is chosen when DataMind Oda is set up. There is no default and Oda never guesses one; it creates the folder when it first needs it.

What happens if a stored file is damaged?

It depends on the unit's layout. In the record-per-document layout, the damaged document reads as an absent record and the rest of the unit still opens. In the whole-unit layout, the file refuses to open and its stored data is left untouched.

Can an older database be upgraded?

No. A database stamped with a layout version other than the current one is refused outright; this format has no migrations. The file store follows the same idea: a document whose version is not accepted is not migrated, it reads as an absent record.

What happens when a write fails?

Nothing changes. The store keeps its last committed state, the in-memory copy is not updated, and no change is announced, so a rejected write never rides along with a later one.

Why can only one part of Oda open a unit at a time?

A unit has exactly one writer and one live handle at a time, so two writers cannot overwrite each other's records. A second attempt to open the same unit is refused.

Does the storage protect the data from another user of the computer?

Plainly, no. Oda creates its folders and files so that only your user account can use them, but if another user can replace a stored file or the database, nothing here detects or prevents that.

Which store keeps which records?

Each domain names its backend. One backend is the default for domains that do not choose, and a domain can be routed to a different backend, so records can live in different stores side by side.

What journal mode should the database use?

wal, the default, suits local disks. On filesystems where the shared files wal needs do not work, such as some network mounts, use a rollback mode: delete, truncate or persist. memory and off are refused, because they would drop the durability every write promises.