go/sqlgen
2024-11-18 17:04:37 +01:00
..
cmd/sqlgen Cleanup 2024-11-11 09:22:50 +01:00
test-files/TestParse wip 2024-11-11 06:36:55 +01:00
main.go wip 2024-11-11 06:36:55 +01:00
parse_test.go wip 2024-11-11 06:36:55 +01:00
parse.go wip 2024-11-11 06:36:55 +01:00
README.md Cleanup 2024-11-11 09:22:50 +01:00
schema.go wip 2024-11-11 06:36:55 +01:00
sqlite.go.tmpl wip 2024-11-18 17:04:37 +01:00
template.go wip 2024-11-11 06:36:55 +01:00

sqlgen

Installing

go install git.crumpington.com/lib/go/sqlgen/cmd/sqlgen@latest

Usage

sqlgen [driver] [defs-path] [output-path]

File Format

TABLE [sql-name] OF [go-type] <NoInsert> <NoUpdate> <NoDelete> (
    [sql-column] [go-type] <AS go-name> <PK> <NoInsert> <NoUpdate>,
    ...
);