Go Runtime Guide
The Go target generates entity packages, typed Request builders, Q and E facades, relation
metadata, loaded-state expressions and graph persistence code. Generated public names use Go casing
while preserving Java Request semantics.
Runtime shape
Queries execute with one *runtime.UserContext. Providers and trusted request metadata are installed
in that context; callers do not pass a second service or connection argument.
orders, err := lib.Q.CustomerOrders().
Comment("Find orders awaiting review").
Purpose("Prepare the authorized review queue").
ExecuteForList(ctx)
The generated Purpose transition exposes execution only after a non-empty comment has already
been supplied. Filters, selections, ordering and pagination may appear between comment and purpose.
Mutations require explicit audit intent:
err := order.AuditAs("Approve reviewed order").Save(ctx)
Verified providers
| Database | Driver observed in acceptance | Feature status |
|---|---|---|
| PostgreSQL | github.com/lib/pq 1.10.9 | PASS |
| MySQL | github.com/go-sql-driver/mysql 1.7.1 | PASS |
| SQLite | github.com/mattn/go-sqlite3 1.14.16 | PASS |
The Feature tests include root/parent/child filters, inclusive ranges, stable pagination, native COUNT/SUM/GROUP BY, relation hydration, exact per-parent Top-N, optimistic locking and both runtime audit paths.
Generation review checklist
After changing a model, inspect the generated q.go, entity request.go, entity.go and e.go.
Never construct a plural method name yourself. Confirm the actual generated method before writing
application code, then run go test ./... against the selected provider.