Skip to content

evie404/cutie

Repository files navigation

cutie

cutie is an opinionated go code generator for database models born out of a zealous drive to enforce separation and types for maintainability and testability. It is still a work in progress.

It's core design can be found in DESIGN.md.

Present capabilities

cutie currently supports the generation of the database models from PostgresSQL schemas with sqlc along with mocks with gomock. At present, cutie expects users to supply their own application and API models. The future plan of cutie is to also generate protobuf messages for API and integrate with the models from the other layers.

Components

pg_dump

pg_dump produces the SQL schema required for sqlc to generate model code. The lack of migration engine means cutie can work with existing databases created by any migration engines, and continue to be agnostic of related tools.

sqlc

sqlc generates type-safe go model and query code from raw SQL. This might be preferred over ORM as it ensures not only the models but also the query parameters are type-checked.

gomock

gomock creates mock implementations of the query interfaces generated by sqlc.

About

Cutie is a boilerplate go code generator for database models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published