Add model generator based on AST
All checks were successful
CI / build-docker (push) Successful in 13s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Successful in 40s

This commit is contained in:
2025-11-09 16:34:46 -08:00
parent 2146e1de77
commit 208c1eb26c
8 changed files with 634 additions and 3 deletions

View File

@@ -26,6 +26,23 @@ mydb.db
prog
EOF
cd $test_project
# Create a new table in the schema
cat >> pkg/db/schema.sql <<EOF
create table items (
rowid integer primary key,
description text not null default ''
);
EOF
# Generate an item model and test file
$gas generate items > pkg/db/item.go
$gas generate items --test > pkg/db/item_test.go
go mod tidy
# Run the tests
go test ./...
# Notify success in green
echo -e "\033[32mAll tests passed. Finished successfully.\033[0m"