Skip to main content

Interface: DBInstanceConfig

Defined in: db/db.ts:87

Extended by

Properties

PropertyTypeDescriptionDefined in
debug?booleanIf true, the DB will be in debug mode. Defaults to false.db/db.ts:133
maxShardCommits?numberMaximum commits per shard. Controls RAM: each shard holds approximately (max * 2.5 * 80 + max * 1.5 * 32) bytes of metadata. Defaults to 100,000 (server) or 25,000 (browser).db/db.ts:145
minShardCommits?numberShards below this count are candidates for merging. Defaults to 10% of maxShardCommits.db/db.ts:149
mode?DBModeThe mode of operation for this database instance.db/db.ts:95
orgId?stringOptional organization id used to sandbox the data of a specific organization in a multi-tenant deployment. Defaults to "localhost".db/db.ts:100
pathstringAbsolute path to the directory that'll store the DB's data.db/db.ts:91
peers?string | Iterable<string, any, any>Absolute URLs of peer nodes to sync with. This option is only used for server cluster configurations, where multiple server nodes act as a single logical node in the network, sharing the same root session and cryptographic keys. In a server cluster, all peers listed here must share the same public/private root keys, and will coordinate as one logical entity. For client applications, this argument is not needed—React hooks and the client library automatically set up communication with the server as required.db/db.ts:113
registry?DataRegistryOptional schema registry to use for this database instance. If not provided, the default global registry (DataRegistry.default) will be used. The registry contains all schema definitions and authorization rules that this database instance will work with. Authorization rules define who can read, write, or delete data based on user permissions and data properties.db/db.ts:128
splitThreshold?numberCommit count that triggers a background shard split. Defaults to 75% of maxShardCommits.db/db.ts:147
storageFormat?StorageFormatThe on-disk format for repository commit logs. Defaults to 'goat' (compact binary). Use 'jsonl' for human-readable output during development or debugging.db/db.ts:139
trusted?booleanIf true, all security mechanisms are bypassed in favor of speed. Set this to true when running purely in a trusted backend environment. Defaults to false.db/db.ts:119