Extending sqlc: augmented generation of repositories in Go
- Track: Go
- Room: UB5.132
- Day: Sunday
- Start: 13:00
- End: 13:30
- Video only: ub5132
- Chat: Join the conversation!
This talk explores how to bridge sqlc’s type-safe database layer with a clean, domain-driven service architecture using Crush/OpenCode — an open source code generator written in Go.
Sqlc generates strongly typed database access, but using its structs directly can couple business logic to schema details. Crush/OpenCode automates the creation of repository layers that work with domain entities instead, orchestrating transactions while preserving compile-time safety.
Built entirely in Go, Crush/OpenCode uses Ollama and the gpt-oss model for “augmented generation,” guided by reference implementations to keep the produced code consistent and idiomatic. It also generates tests first, using testify/suite, Testcontainers-Go, gofakeit, and go-cmp, then refines repositories until tests pass.
The result is a practical Go-based workflow that reduces boilerplate, ensures consistency across repositories, and demonstrates how open source LLM tooling can enhance real-world Go development — without sacrificing simplicity or type safety.
Speakers
| Nikolay Kuznetsov |