Database

A database stores entities and their transactions. Documents and expression programs can operate without a database. The example opens a database, lists its included plugins, and closes it. The plugins option selects the plugins that the database enables. The reactors plugin runs live mutations, and the history plugin purges old history.

License checks

Opening a database checks the active license, its optional expiry, and permissions for the enabled plugins. An open database and its derived handles keep working after expiry or license replacement. See Core activation.

Example

Open a database and retain an independent native document

python98 B
async with (await stardust.open(database_path)) as opened:
    result = (await stardust.plugins())
TRON1.2 kB
Offset (hex)Bytes (hex)Meaning
00054 52 4F 4Emagic TRON
0047C 6261636B757073txt "backups"
00C0E 0D 00 0100 010000 00 04000000array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4
0197C 76657273696F6Etxt "version"
0211C 31txt "1"
0230F 0A 19000000 2100 0000map leaf, size 10: @19 → @21
02DDC 64617461626173 65486F6F6B73txt "databaseHooks"
03B09bit true
03C0F 0A 2D000000 3B00 0000map leaf, size 10: @2D → @3B
04607 0E 00810000 2300 0000 3C000000map branch, size 14, depth 1, slots 8, 15: @23 → @3C
054FC 77696C6C4E6F74 576F726B57697468txt "willNotWorkWith"
0640F 0A 54000000 0C00 0000map leaf, size 10: @54 → @C
06E4C 6E616D65txt "name"
0737C 686973746F7279txt "history"
07B0F 0A 6E000000 7300 0000map leaf, size 10: @6E → @73
085BC 64657363726970 74696F6Etxt "description"
09114 49 486973746F72 7920726574656E74 696F6E3A20707572 67657320656E7469 747920686973746F 7279206279206561 6368207374617264 7573742F68697374 6F72792073657474 696E67txt "History retention: purge…"
0DC0F 0A 85000000 9100 0000map leaf, size 10: @85 → @91
0E607 0E 88000000 7B00 0000 DC000000map branch, size 14, depth 2, slots 3, 7: @7B → @DC
0F407 0A 02000000 E600 0000map branch, size 10, depth 1, slots 1: @E6
0FE07 12 08C00000 4600 0000 64000000 F400 0000map branch, size 18, depth 0 (root), slots 3, 14, 15: @46 → @64 → @F4
1107C 76657273696F6Etxt "version"
1181C 31txt "1"
11A0F 0A 10010000 1801 0000map leaf, size 10: @110 → @118
124DC 64617461626173 65486F6F6B73txt "databaseHooks"
13209bit true
1330F 0A 24010000 3201 0000map leaf, size 10: @124 → @132
13D07 0E 00810000 1A01 0000 33010000map branch, size 14, depth 1, slots 8, 15: @11A → @133
14B4C 6E616D65txt "name"
15014 16 616461707469 76655F7175657279 5F706C616E6E6572txt "adaptive_query_planner"
1680F 0A 4B010000 5001 0000map leaf, size 10: @14B → @150
172BC 64657363726970 74696F6Etxt "description"
Show all 85 nodes
Offset (hex)Bytes (hex)Meaning
17E14 4E 416461707469 7665206A6F696E20 6F72646572733A20 6C6561726E732066 726F6D2072756E73 20616E642073746F 7265732074686520 706C616E73207468 61742070726F7665 6420626574746572txt "Adaptive join orders: le…"
1CE0F 0A 72010000 7E01 0000map leaf, size 10: @172 → @17E
1D807 0E 88000000 6801 0000 CE010000map branch, size 14, depth 2, slots 3, 7: @168 → @1CE
1E607 0A 02000000 D801 0000map branch, size 10, depth 1, slots 1: @1D8
1F007 0E 08800000 3D01 0000 E6010000map branch, size 14, depth 0 (root), slots 3, 15: @13D → @1E6
1FE7C 76657273696F6Etxt "version"
2061C 31txt "1"
2080F 0A FE010000 0602 0000map leaf, size 10: @1FE → @206
212DC 64617461626173 65486F6F6B73txt "databaseHooks"
22009bit true
2210F 0A 12020000 2002 0000map leaf, size 10: @212 → @220
22B07 0E 00810000 0802 0000 21020000map branch, size 14, depth 1, slots 8, 15: @208 → @221
2394C 6E616D65txt "name"
23E7C 6F626A65637473txt "objects"
2460F 0A 39020000 3E02 0000map leaf, size 10: @239 → @23E
250BC 64657363726970 74696F6Etxt "description"
25C14 47 4F626A656374 2073746F72653A20 636F6E74656E742D 6164647265737365 64207061796C6F61 647320696E206E61 6D65642066696C65 7320616E64206469 726563746F726965 73txt "Object store: content-ad…"
2A50F 0A 50020000 5C02 0000map leaf, size 10: @250 → @25C
2AF07 0E 88000000 4602 0000 A5020000map branch, size 14, depth 2, slots 3, 7: @246 → @2A5
2BD07 0A 02000000 AF02 0000map branch, size 10, depth 1, slots 1: @2AF
2C707 0E 08800000 2B02 0000 BD020000map branch, size 14, depth 0 (root), slots 3, 15: @22B → @2BD
2D57C 76657273696F6Etxt "version"
2DD1C 31txt "1"
2DF0F 0A D5020000 DD02 0000map leaf, size 10: @2D5 → @2DD
2E9DC 64617461626173 65486F6F6B73txt "databaseHooks"
2F709bit true
2F80F 0A E9020000 F702 0000map leaf, size 10: @2E9 → @2F7
30207 0E 00810000 DF02 0000 F8020000map branch, size 14, depth 1, slots 8, 15: @2DF → @2F8
3104C 6E616D65txt "name"
3158C 72656163746F72 73txt "reactors"
31E0F 0A 10030000 1503 0000map leaf, size 10: @310 → @315
328BC 64657363726970 74696F6Etxt "description"
33414 41 4C697665206D 75746174696F6E73 3A2073746F726564 206D75746174696F 6E73207769746820 6C6976653A207472 7565207265616374 20746F20636F6D6D 697473txt "Live mutations: stored m…"
3770F 0A 28030000 3403 0000map leaf, size 10: @328 → @334
38107 0E 88000000 1E03 0000 77030000map branch, size 14, depth 2, slots 3, 7: @31E → @377
38F07 0A 02000000 8103 0000map branch, size 10, depth 1, slots 1: @381
39907 0E 08800000 0203 0000 8F030000map branch, size 14, depth 0 (root), slots 3, 15: @302 → @38F
3A77C 76657273696F6Etxt "version"
3AF1C 31txt "1"
3B10F 0A A7030000 AF03 0000map leaf, size 10: @3A7 → @3AF
3BBDC 64617461626173 65486F6F6B73txt "databaseHooks"
3C909bit true
3CA0F 0A BB030000 C903 0000map leaf, size 10: @3BB → @3C9
3D407 0E 00810000 B103 0000 CA030000map branch, size 14, depth 1, slots 8, 15: @3B1 → @3CA
3E24C 6E616D65txt "name"
3E73C 73646Btxt "sdk"
3EB0F 0A E2030000 E703 0000map leaf, size 10: @3E2 → @3E7
3F5BC 64657363726970 74696F6Etxt "description"
40114 5E 53444B206765 6E65726174696F6E 3A207075626C6973 6865732061207479 706564207061636B 616765206F662074 68652073746F7265 6420646566696E69 74696F6E73207768 696C652074686520 6461746162617365 206973206F70656Etxt "SDK generation: publishe…"
4610F 0A F5030000 0104 0000map leaf, size 10: @3F5 → @401
46B07 0E 88000000 EB03 0000 61040000map branch, size 14, depth 2, slots 3, 7: @3EB → @461
47907 0A 02000000 6B04 0000map branch, size 10, depth 1, slots 1: @46B
48307 0E 08800000 D403 0000 79040000map branch, size 14, depth 0 (root), slots 3, 15: @3D4 → @479
4910E 1D 00 1F00 050000 00 FE000000 F00100 00 C7020000 990300 00 83040000array leaf, size 29, shift 0, bitmap 001F, count 5 (root): @FE → @1F0 → @2C7 → @399 → @483
Offset (hex)Bytes (hex)Meaning

Locking

Opening a database requires the file lock that protects its recorded changes. The lock_timeout option sets how the call waits for that lock:

lock_timeoutResult
ZeroIf the lock is unavailable, the call fails immediately.
PositiveThe call waits up to that duration, rounded up to whole milliseconds.
NegativeThe call waits without limit.

When the wait ends without the lock, the call fails with the locked status. The options table gives the default and the type in your language.

Operations

OperationReturnsSummary
opendatabaseopen(path, options) opens a database.
Database.closenoneRelease the database handle.

open

python426 B
def open(
    path: str,
    *,
    create: bool | None = None,
    clear: bool | None = None,
    pin_memory: bool | None = None,
    page_size: int | None = None,
    lock_timeout: timedelta | None = None,
    initial_map_bytes: int | None = None,
    commit_batch: timedelta | None = None,
    memory_budget_bytes: int | None = None,
    plugins: dict[str, dict] | None = None,
    library: str | None = None,
) -> Database

Parameters

ParameterTypeOwnershipDefaultMeaning
pathstrValueRequiredThe database file path.
createbool | NoneValueNone—
clearbool | NoneValueNone—
pin_memorybool | NoneValueNone—
page_sizeint | NoneValueNone—
lock_timeouttimedelta | NoneValueNone—
initial_map_bytesint | NoneValueNone—
commit_batchtimedelta | NoneValueNone—
memory_budget_bytesint | NoneValueNone—
pluginsdict[str, dict] | NoneValueNone—
librarystr | NoneValueNoneLoaded native library used by this call.

Errors

StatusWhen
"not_found"the parent directory is missing, or the file is missing and create is false
"locked"another process holds the lock after lock_timeout
"invalid_argument"the file is not a database, an option is invalid or selected plugins are incompatible
"conflict"an enabled plugin finds the database inconsistent with its copies: backups refuse diverging copies with code backup_history_divergent, naming them
"unavailable"an enabled plugin cannot reach what the open needs: backups refuse with backup_targets_unreachable, backup_target_unreadable or backup_objects_required
"out_of_memory"native memory is exhausted

Examples

Open a database and retain an independent native document

python98 B
async with (await stardust.open(database_path)) as opened:
    result = (await stardust.plugins())
TRON1.2 kB
Offset (hex)Bytes (hex)Meaning
00054 52 4F 4Emagic TRON
0047C 6261636B757073txt "backups"
00C0E 0D 00 0100 010000 00 04000000array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4
0197C 76657273696F6Etxt "version"
0211C 31txt "1"
0230F 0A 19000000 2100 0000map leaf, size 10: @19 → @21
02DDC 64617461626173 65486F6F6B73txt "databaseHooks"
03B09bit true
03C0F 0A 2D000000 3B00 0000map leaf, size 10: @2D → @3B
04607 0E 00810000 2300 0000 3C000000map branch, size 14, depth 1, slots 8, 15: @23 → @3C
054FC 77696C6C4E6F74 576F726B57697468txt "willNotWorkWith"
0640F 0A 54000000 0C00 0000map leaf, size 10: @54 → @C
06E4C 6E616D65txt "name"
0737C 686973746F7279txt "history"
07B0F 0A 6E000000 7300 0000map leaf, size 10: @6E → @73
085BC 64657363726970 74696F6Etxt "description"
09114 49 486973746F72 7920726574656E74 696F6E3A20707572 67657320656E7469 747920686973746F 7279206279206561 6368207374617264 7573742F68697374 6F72792073657474 696E67txt "History retention: purge…"
0DC0F 0A 85000000 9100 0000map leaf, size 10: @85 → @91
0E607 0E 88000000 7B00 0000 DC000000map branch, size 14, depth 2, slots 3, 7: @7B → @DC
0F407 0A 02000000 E600 0000map branch, size 10, depth 1, slots 1: @E6
0FE07 12 08C00000 4600 0000 64000000 F400 0000map branch, size 18, depth 0 (root), slots 3, 14, 15: @46 → @64 → @F4
1107C 76657273696F6Etxt "version"
1181C 31txt "1"
11A0F 0A 10010000 1801 0000map leaf, size 10: @110 → @118
124DC 64617461626173 65486F6F6B73txt "databaseHooks"
13209bit true
1330F 0A 24010000 3201 0000map leaf, size 10: @124 → @132
13D07 0E 00810000 1A01 0000 33010000map branch, size 14, depth 1, slots 8, 15: @11A → @133
14B4C 6E616D65txt "name"
15014 16 616461707469 76655F7175657279 5F706C616E6E6572txt "adaptive_query_planner"
1680F 0A 4B010000 5001 0000map leaf, size 10: @14B → @150
172BC 64657363726970 74696F6Etxt "description"
Show all 85 nodes
Offset (hex)Bytes (hex)Meaning
17E14 4E 416461707469 7665206A6F696E20 6F72646572733A20 6C6561726E732066 726F6D2072756E73 20616E642073746F 7265732074686520 706C616E73207468 61742070726F7665 6420626574746572txt "Adaptive join orders: le…"
1CE0F 0A 72010000 7E01 0000map leaf, size 10: @172 → @17E
1D807 0E 88000000 6801 0000 CE010000map branch, size 14, depth 2, slots 3, 7: @168 → @1CE
1E607 0A 02000000 D801 0000map branch, size 10, depth 1, slots 1: @1D8
1F007 0E 08800000 3D01 0000 E6010000map branch, size 14, depth 0 (root), slots 3, 15: @13D → @1E6
1FE7C 76657273696F6Etxt "version"
2061C 31txt "1"
2080F 0A FE010000 0602 0000map leaf, size 10: @1FE → @206
212DC 64617461626173 65486F6F6B73txt "databaseHooks"
22009bit true
2210F 0A 12020000 2002 0000map leaf, size 10: @212 → @220
22B07 0E 00810000 0802 0000 21020000map branch, size 14, depth 1, slots 8, 15: @208 → @221
2394C 6E616D65txt "name"
23E7C 6F626A65637473txt "objects"
2460F 0A 39020000 3E02 0000map leaf, size 10: @239 → @23E
250BC 64657363726970 74696F6Etxt "description"
25C14 47 4F626A656374 2073746F72653A20 636F6E74656E742D 6164647265737365 64207061796C6F61 647320696E206E61 6D65642066696C65 7320616E64206469 726563746F726965 73txt "Object store: content-ad…"
2A50F 0A 50020000 5C02 0000map leaf, size 10: @250 → @25C
2AF07 0E 88000000 4602 0000 A5020000map branch, size 14, depth 2, slots 3, 7: @246 → @2A5
2BD07 0A 02000000 AF02 0000map branch, size 10, depth 1, slots 1: @2AF
2C707 0E 08800000 2B02 0000 BD020000map branch, size 14, depth 0 (root), slots 3, 15: @22B → @2BD
2D57C 76657273696F6Etxt "version"
2DD1C 31txt "1"
2DF0F 0A D5020000 DD02 0000map leaf, size 10: @2D5 → @2DD
2E9DC 64617461626173 65486F6F6B73txt "databaseHooks"
2F709bit true
2F80F 0A E9020000 F702 0000map leaf, size 10: @2E9 → @2F7
30207 0E 00810000 DF02 0000 F8020000map branch, size 14, depth 1, slots 8, 15: @2DF → @2F8
3104C 6E616D65txt "name"
3158C 72656163746F72 73txt "reactors"
31E0F 0A 10030000 1503 0000map leaf, size 10: @310 → @315
328BC 64657363726970 74696F6Etxt "description"
33414 41 4C697665206D 75746174696F6E73 3A2073746F726564 206D75746174696F 6E73207769746820 6C6976653A207472 7565207265616374 20746F20636F6D6D 697473txt "Live mutations: stored m…"
3770F 0A 28030000 3403 0000map leaf, size 10: @328 → @334
38107 0E 88000000 1E03 0000 77030000map branch, size 14, depth 2, slots 3, 7: @31E → @377
38F07 0A 02000000 8103 0000map branch, size 10, depth 1, slots 1: @381
39907 0E 08800000 0203 0000 8F030000map branch, size 14, depth 0 (root), slots 3, 15: @302 → @38F
3A77C 76657273696F6Etxt "version"
3AF1C 31txt "1"
3B10F 0A A7030000 AF03 0000map leaf, size 10: @3A7 → @3AF
3BBDC 64617461626173 65486F6F6B73txt "databaseHooks"
3C909bit true
3CA0F 0A BB030000 C903 0000map leaf, size 10: @3BB → @3C9
3D407 0E 00810000 B103 0000 CA030000map branch, size 14, depth 1, slots 8, 15: @3B1 → @3CA
3E24C 6E616D65txt "name"
3E73C 73646Btxt "sdk"
3EB0F 0A E2030000 E703 0000map leaf, size 10: @3E2 → @3E7
3F5BC 64657363726970 74696F6Etxt "description"
40114 5E 53444B206765 6E65726174696F6E 3A207075626C6973 6865732061207479 706564207061636B 616765206F662074 68652073746F7265 6420646566696E69 74696F6E73207768 696C652074686520 6461746162617365 206973206F70656Etxt "SDK generation: publishe…"
4610F 0A F5030000 0104 0000map leaf, size 10: @3F5 → @401
46B07 0E 88000000 EB03 0000 61040000map branch, size 14, depth 2, slots 3, 7: @3EB → @461
47907 0A 02000000 6B04 0000map branch, size 10, depth 1, slots 1: @46B
48307 0E 08800000 D403 0000 79040000map branch, size 14, depth 0 (root), slots 3, 15: @3D4 → @479
4910E 1D 00 1F00 050000 00 FE000000 F00100 00 C7020000 990300 00 83040000array leaf, size 29, shift 0, bitmap 001F, count 5 (root): @FE → @1F0 → @2C7 → @399 → @483
Offset (hex)Bytes (hex)Meaning

Open with explicit native options

python128 B
options = dict(page_size=0)
async with (await stardust.open(database_path, **options)):
    result = stardust.Options(**options)
TRON311 B
Offset (hex)Bytes (hex)Meaning
00054 52 4F 4Emagic TRON
0046C 637265617465txt "create"
00B09bit true
00C0F 0A 04000000 0B00 0000map leaf, size 10: @4 → @B
01614 11 696E69746961 6C5F6D61705F6279 746573txt "initial_map_bytes"
02902 00000000000000 00i64 0
0320F 0A 16000000 2900 0000map leaf, size 10: @16 → @29
03C7C 706C7567696E73txt "plugins"
04400nil
0450F 0A 3C000000 4400 0000map leaf, size 10: @3C → @44
04F14 13 6D656D6F7279 5F6275646765745F 6279746573txt "memory_budget_bytes"
06402 00000000000000 00i64 0
06D0F 0A 4F000000 6400 0000map leaf, size 10: @4F → @64
077CC 6C6F636B5F7469 6D656F7574txt "lock_timeout"
08402 00000000000000 00i64 0
08D0F 0A 77000000 8400 0000map leaf, size 10: @77 → @84
0975C 636C656172txt "clear"
09D01bit false
09E0F 0A 97000000 9D00 0000map leaf, size 10: @97 → @9D
0A8AC 70696E5F6D656D 6F7279txt "pin_memory"
0B301bit false
0B40F 0A A8000000 B300 0000map leaf, size 10: @A8 → @B3
0BE9C 706167655F7369 7A65txt "page_size"
0C802 00000000000000 00i64 0
0D10F 0A BE000000 C800 0000map leaf, size 10: @BE → @C8
0DBCC 636F6D6D69745F 6261746368txt "commit_batch"
0E802 00000000000000 00i64 0
0F10F 0A DB000000 E800 0000map leaf, size 10: @DB → @E8
0FB07 12 00430000 B400 0000 D1000000 F100 0000map branch, size 18, depth 1, slots 8, 9, 14: @B4 → @D1 → @F1
10D07 22 193A0000 0C00 0000 32000000 4500 0000 6D000000 8D00 0000 9E000000 FB00 0000map branch, size 34, depth 0 (root), slots 0, 3, 4, 9, 11, 12, 13: @C → @32 → @45 → @6D → @8D → @9E → @FB

Wait for the database lock without a limit

python169 B
options = dict(page_size=0, lock_timeout=timedelta(microseconds=-1))
async with (await stardust.open(database_path, **options)):
    result = stardust.Options(**options)
TRON303 B
Offset (hex)Bytes (hex)Meaning
00054 52 4F 4Emagic TRON
0046C 637265617465txt "create"
00B09bit true
00C0F 0A 04000000 0B00 0000map leaf, size 10: @4 → @B
01614 11 696E69746961 6C5F6D61705F6279 746573txt "initial_map_bytes"
02902 00000000000000 00i64 0
0320F 0A 16000000 2900 0000map leaf, size 10: @16 → @29
03C7C 706C7567696E73txt "plugins"
04400nil
0450F 0A 3C000000 4400 0000map leaf, size 10: @3C → @44
04F14 13 6D656D6F7279 5F6275646765745F 6279746573txt "memory_budget_bytes"
06402 00000000000000 00i64 0
06D0F 0A 4F000000 6400 0000map leaf, size 10: @4F → @64
077CC 6C6F636B5F7469 6D656F7574txt "lock_timeout"
08400nil
0850F 0A 77000000 8400 0000map leaf, size 10: @77 → @84
08F5C 636C656172txt "clear"
09501bit false
0960F 0A 8F000000 9500 0000map leaf, size 10: @8F → @95
0A0AC 70696E5F6D656D 6F7279txt "pin_memory"
0AB01bit false
0AC0F 0A A0000000 AB00 0000map leaf, size 10: @A0 → @AB
0B69C 706167655F7369 7A65txt "page_size"
0C002 00000000000000 00i64 0
0C90F 0A B6000000 C000 0000map leaf, size 10: @B6 → @C0
0D3CC 636F6D6D69745F 6261746368txt "commit_batch"
0E002 00000000000000 00i64 0
0E90F 0A D3000000 E000 0000map leaf, size 10: @D3 → @E0
0F307 12 00430000 AC00 0000 C9000000 E900 0000map branch, size 18, depth 1, slots 8, 9, 14: @AC → @C9 → @E9
10507 22 193A0000 0C00 0000 32000000 4500 0000 6D000000 8500 0000 96000000 F300 0000map branch, size 34, depth 0 (root), slots 0, 3, 4, 9, 11, 12, 13: @C → @32 → @45 → @6D → @85 → @96 → @F3

C exports: stardust_db_open, stardust_result_error, stardust_result_release

Database.close

python23 B
def close(self) -> None

Consumes the receiver handle.

Parameters

ParameterTypeOwnershipDefaultMeaning
selfDatabaseConsumed ownerRequiredThe database owner to release. Do not use it after this call.

Examples

Open a database and retain an independent native document

python98 B
async with (await stardust.open(database_path)) as opened:
    result = (await stardust.plugins())
TRON1.2 kB
Offset (hex)Bytes (hex)Meaning
00054 52 4F 4Emagic TRON
0047C 6261636B757073txt "backups"
00C0E 0D 00 0100 010000 00 04000000array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4
0197C 76657273696F6Etxt "version"
0211C 31txt "1"
0230F 0A 19000000 2100 0000map leaf, size 10: @19 → @21
02DDC 64617461626173 65486F6F6B73txt "databaseHooks"
03B09bit true
03C0F 0A 2D000000 3B00 0000map leaf, size 10: @2D → @3B
04607 0E 00810000 2300 0000 3C000000map branch, size 14, depth 1, slots 8, 15: @23 → @3C
054FC 77696C6C4E6F74 576F726B57697468txt "willNotWorkWith"
0640F 0A 54000000 0C00 0000map leaf, size 10: @54 → @C
06E4C 6E616D65txt "name"
0737C 686973746F7279txt "history"
07B0F 0A 6E000000 7300 0000map leaf, size 10: @6E → @73
085BC 64657363726970 74696F6Etxt "description"
09114 49 486973746F72 7920726574656E74 696F6E3A20707572 67657320656E7469 747920686973746F 7279206279206561 6368207374617264 7573742F68697374 6F72792073657474 696E67txt "History retention: purge…"
0DC0F 0A 85000000 9100 0000map leaf, size 10: @85 → @91
0E607 0E 88000000 7B00 0000 DC000000map branch, size 14, depth 2, slots 3, 7: @7B → @DC
0F407 0A 02000000 E600 0000map branch, size 10, depth 1, slots 1: @E6
0FE07 12 08C00000 4600 0000 64000000 F400 0000map branch, size 18, depth 0 (root), slots 3, 14, 15: @46 → @64 → @F4
1107C 76657273696F6Etxt "version"
1181C 31txt "1"
11A0F 0A 10010000 1801 0000map leaf, size 10: @110 → @118
124DC 64617461626173 65486F6F6B73txt "databaseHooks"
13209bit true
1330F 0A 24010000 3201 0000map leaf, size 10: @124 → @132
13D07 0E 00810000 1A01 0000 33010000map branch, size 14, depth 1, slots 8, 15: @11A → @133
14B4C 6E616D65txt "name"
15014 16 616461707469 76655F7175657279 5F706C616E6E6572txt "adaptive_query_planner"
1680F 0A 4B010000 5001 0000map leaf, size 10: @14B → @150
172BC 64657363726970 74696F6Etxt "description"
Show all 85 nodes
Offset (hex)Bytes (hex)Meaning
17E14 4E 416461707469 7665206A6F696E20 6F72646572733A20 6C6561726E732066 726F6D2072756E73 20616E642073746F 7265732074686520 706C616E73207468 61742070726F7665 6420626574746572txt "Adaptive join orders: le…"
1CE0F 0A 72010000 7E01 0000map leaf, size 10: @172 → @17E
1D807 0E 88000000 6801 0000 CE010000map branch, size 14, depth 2, slots 3, 7: @168 → @1CE
1E607 0A 02000000 D801 0000map branch, size 10, depth 1, slots 1: @1D8
1F007 0E 08800000 3D01 0000 E6010000map branch, size 14, depth 0 (root), slots 3, 15: @13D → @1E6
1FE7C 76657273696F6Etxt "version"
2061C 31txt "1"
2080F 0A FE010000 0602 0000map leaf, size 10: @1FE → @206
212DC 64617461626173 65486F6F6B73txt "databaseHooks"
22009bit true
2210F 0A 12020000 2002 0000map leaf, size 10: @212 → @220
22B07 0E 00810000 0802 0000 21020000map branch, size 14, depth 1, slots 8, 15: @208 → @221
2394C 6E616D65txt "name"
23E7C 6F626A65637473txt "objects"
2460F 0A 39020000 3E02 0000map leaf, size 10: @239 → @23E
250BC 64657363726970 74696F6Etxt "description"
25C14 47 4F626A656374 2073746F72653A20 636F6E74656E742D 6164647265737365 64207061796C6F61 647320696E206E61 6D65642066696C65 7320616E64206469 726563746F726965 73txt "Object store: content-ad…"
2A50F 0A 50020000 5C02 0000map leaf, size 10: @250 → @25C
2AF07 0E 88000000 4602 0000 A5020000map branch, size 14, depth 2, slots 3, 7: @246 → @2A5
2BD07 0A 02000000 AF02 0000map branch, size 10, depth 1, slots 1: @2AF
2C707 0E 08800000 2B02 0000 BD020000map branch, size 14, depth 0 (root), slots 3, 15: @22B → @2BD
2D57C 76657273696F6Etxt "version"
2DD1C 31txt "1"
2DF0F 0A D5020000 DD02 0000map leaf, size 10: @2D5 → @2DD
2E9DC 64617461626173 65486F6F6B73txt "databaseHooks"
2F709bit true
2F80F 0A E9020000 F702 0000map leaf, size 10: @2E9 → @2F7
30207 0E 00810000 DF02 0000 F8020000map branch, size 14, depth 1, slots 8, 15: @2DF → @2F8
3104C 6E616D65txt "name"
3158C 72656163746F72 73txt "reactors"
31E0F 0A 10030000 1503 0000map leaf, size 10: @310 → @315
328BC 64657363726970 74696F6Etxt "description"
33414 41 4C697665206D 75746174696F6E73 3A2073746F726564 206D75746174696F 6E73207769746820 6C6976653A207472 7565207265616374 20746F20636F6D6D 697473txt "Live mutations: stored m…"
3770F 0A 28030000 3403 0000map leaf, size 10: @328 → @334
38107 0E 88000000 1E03 0000 77030000map branch, size 14, depth 2, slots 3, 7: @31E → @377
38F07 0A 02000000 8103 0000map branch, size 10, depth 1, slots 1: @381
39907 0E 08800000 0203 0000 8F030000map branch, size 14, depth 0 (root), slots 3, 15: @302 → @38F
3A77C 76657273696F6Etxt "version"
3AF1C 31txt "1"
3B10F 0A A7030000 AF03 0000map leaf, size 10: @3A7 → @3AF
3BBDC 64617461626173 65486F6F6B73txt "databaseHooks"
3C909bit true
3CA0F 0A BB030000 C903 0000map leaf, size 10: @3BB → @3C9
3D407 0E 00810000 B103 0000 CA030000map branch, size 14, depth 1, slots 8, 15: @3B1 → @3CA
3E24C 6E616D65txt "name"
3E73C 73646Btxt "sdk"
3EB0F 0A E2030000 E703 0000map leaf, size 10: @3E2 → @3E7
3F5BC 64657363726970 74696F6Etxt "description"
40114 5E 53444B206765 6E65726174696F6E 3A207075626C6973 6865732061207479 706564207061636B 616765206F662074 68652073746F7265 6420646566696E69 74696F6E73207768 696C652074686520 6461746162617365 206973206F70656Etxt "SDK generation: publishe…"
4610F 0A F5030000 0104 0000map leaf, size 10: @3F5 → @401
46B07 0E 88000000 EB03 0000 61040000map branch, size 14, depth 2, slots 3, 7: @3EB → @461
47907 0A 02000000 6B04 0000map branch, size 10, depth 1, slots 1: @46B
48307 0E 08800000 D403 0000 79040000map branch, size 14, depth 0 (root), slots 3, 15: @3D4 → @479
4910E 1D 00 1F00 050000 00 FE000000 F00100 00 C7020000 990300 00 83040000array leaf, size 29, shift 0, bitmap 001F, count 5 (root): @FE → @1F0 → @2C7 → @399 → @483
Offset (hex)Bytes (hex)Meaning

C exports: stardust_db_close, stardust_db_retain, stardust_db_release

options

This record supplies options for open. The zero value selects every default.

create

Creates a missing file. false refuses it with not_found.

  • Type: bool
  • Default: true

clear

Discards all existing database contents after acquiring the exclusive file lock. Use true only to start an empty database.

  • Type: bool
  • Default: false

pin_memory

Locks the mapped database pages in RAM to prevent paging to disk. This also applies when the mapping grows. Opening or growing the mapping fails if the operating system refuses the memory lock.

  • Type: bool
  • Default: false

page_size

Storage page size in bytes for a new database file. 0 selects the operating system page size.

  • Type: int
  • Unit: Bytes

lock_timeout

Waits for the lock of another process. 0 fails at once. A positive wait rounds up to whole milliseconds.

  • Type: timedelta
  • Unit: Host duration (100 ns ticks at the ABI)
  • Range: Tick range
  • Default: 0
  • Absent: A negative timedelta

initial_map_bytes

Zero selects the library default.

  • Type: int
  • Unit: Bytes

commit_batch

Batch window for background commits nobody waits on. Write calls return once durable and never wait for it; concurrent writes share a sync regardless. Zero selects the library default and a negative duration causes invalid_argument.

  • Type: timedelta
  • Unit: Host duration (100 ns ticks at the ABI)
  • Range: Tick range

plugins

The plugins to enable, by name, each mapped to its load settings ({} for its defaults). Only named plugins are enabled.

  • Type: dict[str, dict] \| None
  • Absent: None

memory_budget_bytes

The most bytes of working memory the database's queries, caches and initial bulk build hold together. Zero selects an eighth of physical memory, at least 256 MiB. Query ordering, distinct and grouping use temporary sorted runs when records do not fit in memory. Collected aggregate inputs and windows read bounded runs. A minimum workspace, indivisible value or requested output document that cannot fit reports out_of_memory. Small pages let callers read large results. Returned documents use caller-owned memory after transfer. Pages that the caller keeps and binding-side all_pages collections are outside this budget. An initial bulk build reports out_of_memory if a patch or its minimum workspace cannot fit, and publishes nothing. Operating-system file cache and the process baseline are outside this budget. A negative value causes invalid_argument.

  • Type: int
  • Unit: Bytes