~wispem-wantex 1bc7f9111f
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
codegen: implement "without rowid" tables
2026-03-18 10:39:38 -07:00
2026-02-22 21:45:05 -08:00
2026-02-14 22:56:43 -08:00
2025-11-08 19:59:59 -08:00
2026-03-16 11:45:07 -07:00

GAS stack

Compiling

Requires a Go compiler (minimum 1.22.5) and a C compiler, due to use of CGo.

git clone https://git.offline-twitter.com/offline-labs/gas-stack.git
cd gas-stack
go build -o gas -tags fts5 ./cmd

# Installation (optional)
sudo mv gas /usr/local/bin # ...or anywhere on your $PATH
which gas                  # should print "/usr/local/bin/gas"

Using

The linter (gas sqlite_lint) is stable and useful.

The code generator is buggy, incomplete, and not remotely stable, but still quite useful. Don't expect it to produce perfectly working code, or even to compile correctly (e.g., you'll probably have to fix the imports). Copy-paste the parts that are useful, and delete the parts that aren't.

Linter

gas sqlite_lint <path/to/schema.sql>

Code generator

gas generate table_name        # Generates a model
gas generate --test table_name # Optional: generates tests

It prints to the console. You can copy-paste the result. Or you can use bash redirection:

gas generate users > pkg/db/user.go
gas generate --test users > pkg/db/user_test.go

Useful flags:

  • --schema: by default, gas generate assumes that the schema is at pkg/db/schema.sql. Use gas generate --schema <path/to/schema.sql> [...] to indicate otherwise
Description
No description provided
Readme 512 KiB
Languages
Go 93.6%
Shell 4.2%
Smarty 1.1%
Dockerfile 1.1%