code wiki / _hdl_build / nx_builder_authors_sqlite_read.nx
nx_builder_authors_sqlite_read.nx source
↩ module page · 15 lines · 918 B
1// nx_builder_authors_sqlite_read.nx -- the BUILDER authors ELDERMIG E1 rung 1 (sovereign read-only
2// SQLite reader: header + table-btree walk + sqlite_master decode + per-table row counts).
3// Claude tutored the file format (btree page types 0x05/0x0D, varints, serial types); the Builder
4// authors; gate = byte-exact vs the python3-sqlite3 oracle on real Elder DBs. license_tier: ORIGINAL
5import "nx_module_author_data.nx"
6import "nx_syscalls.nx"
7func _bsq(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
8func main() -> i64 {
9 _bsq("BUILDER authors ELDERMIG E1 rung-1 sqlite reader (btree walk + master decode)\n" as *u8)
10 let fd: i64 = sys_openat_wr("runtime/_hdl_build/_sqlite_read_authored.nx" as *u8, 0x1a4)
11 ma_emit_sqlite_read(fd)
12 sys_close(fd)
13 _bsq(" -> _sqlite_read_authored.nx authored; Engineer gates next\n" as *u8)
14 sys_exit(0); return 0
15}