codegen: implement "without rowid" tables
Some checks failed
CI / build-docker (push) Successful in 6s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Failing after 16s

This commit is contained in:
2026-02-14 18:33:41 -08:00
parent c1150954e5
commit 1bc7f9111f
4 changed files with 255 additions and 168 deletions

View File

@@ -46,11 +46,19 @@ create table items (
created_at integer not null,
updated_at integer not null
) strict;
create table item_to_item (
item1_id integer references items(rowid),
item2_id integer references items(rowid),
primary key (item1_id, item2_id)
) strict, without rowid;
EOF
# Generate an item model and test file
$gas generate items > pkg/db/item.go
$gas generate items --test > pkg/db/item_test.go
$gas generate item_to_item > pkg/db/item_to_item.go
go mod tidy
# Run the tests