Help us shape the future of Go! Take the 2026 Go Developer Survey

jetgen

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Command jetgen writes Jet table builders and models for a schema file. It creates a scratch database on the server, runs the file there, generates from it and drops it again, so no migrated database has to exist.

go run ./scripts/jetgen -schema schema.sql -dest internal/db/jet
go run ./scripts/jetgen -schema example/db/schema.sql -dest example/db/jet -db-tags

Without -db-tags the models are Jet's defaults (no db tags, string for jsonb), which is what the admin's own tables use and so what the tests of a default model run against. With it every field carries a `db:"column"` tag and jsonb is json.RawMessage, as in a generator tuned for pgx.

It drives Jet's generator as a library rather than through the jet command, which links the cgo SQLite driver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL