Back to directory

GORM Gen

A code generator for GORM that creates type-safe Go data-access code and query methods from a database schema or interface-based SQL templates.

GORM Gen

GORM Gen generates a data-access layer for Go projects that use GORM. Pointed at a database schema, or at Go interfaces written with SQL templates, it produces idiomatic DAO code and a type-safe query DSL for fields, conditions and assignments, including a generics mode.

Generated code follows GORM conventions for tags such as nullable, default, unsigned, index and type, and works with the GORM plugins and dialectors a project already uses. A single generator entry point controls what gets generated and how the query API looks, through mode flags such as WithDefaultQuery, WithQueryInterface and WithGeneric.

It is written in Go and installed as a library with go get, then run from a small generator command a project defines itself.

More in Databases

See all 294
  • SQLBraid

    clickin.github.io

    A SQL-first data-access toolkit for TypeScript that keeps ordinary SQL visible in tagged template literals, binds interpolated values safely by default, supports readable conditional SQL directives, and lets a schema validate the returned rows.

  • A SQL-style query language and toolchain for the Qdrant vector database, covering dense, sparse and hybrid search, filtering and multitenancy, with the same grammar running from a CLI, Python, Node.js, Rust, WebAssembly and an in-process edge engine.

  • Fast Knowledge

    github.com

    A self-hosted, Java-based knowledge base for small and mid-sized organizations, turning internal documents into a searchable, question-answerable and audit-exportable knowledge asset with hybrid retrieval and Docker deployment.