Stop the application first.info, query, insert, delete, timestamp, revert and
maintenance open the database, and its log file has a single writer. If a running application
holds it, the command fails and says so. The engine has no read-only access to a live database.
schema, validate, codegen and settings do not open the database.
Opening writes. Opening a database replays the log and updates index files, as the application
does. Nothing is lost, but take care with production data.
Background work is off. Auto backup, auto truncate, index state snapshots and the task queue
do not run while a command runs. --allow-background keeps them as configured. maintenance
finishes its work before it returns.
Secrets are not printed.settings shows whether a password, token secret, API key or
connection string is set, never its value.
Output is split. Results go to stdout; progress and warnings go to stderr. So
relatude query ... 2>/dev/null > out.json gives a clean file. Most commands take --json. Exit
codes: 0 success, 1 the command failed, 2 wrong command line.
insert sets scalar members only: text, numbers, bool, guid, dates, timespan, enums by name or
number, arrays of these, and geo coordinates as [latitude, longitude]. It refuses relations,
references, files and embedded values. Set those from code.
Pin ids before you rename.validate warns about node types and members whose ids come from
their names: renaming one hides the data stored under the old name. codegen writes the model out
with those ids spelled out, which pins them. See the pitfall about pinning ids in
section 30.