Database abstraction layers and SQL query construction libraries for building data-driven applications in Go.
GORM is a developer-focused object-relational mapping library for Go that provides a comprehensive data persistence framework. It serves as a database access layer, allowing developers to map application structures to database tables and perform CRUD operations using a fluent, type-safe query builder instead of writing raw SQL. The library distinguishes itself through its association-aware persistence, which automatically tracks and synchronizes complex entity relationships during database operations. It utilizes a driver-agnostic interface to maintain consistent behavior across various stora
GORM is a comprehensive ORM and query builder for Go that provides all the requested features, including schema migrations, transaction management, and robust struct mapping for relational databases.
Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time. The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time cod
Ent is a powerful entity framework for Go that provides robust schema migration, type-safe query construction, and struct mapping through its code generation engine, making it a comprehensive solution for relational database interaction.
This project is a database driver and interface for the Go programming language, specifically designed for PostgreSQL. It provides a low-level library for executing SQL queries, managing transactions, and handling data persistence within Go applications. The driver distinguishes itself by implementing the native PostgreSQL binary wire protocol, which minimizes communication overhead and maximizes data transfer efficiency. It includes advanced connection pooling to maintain persistent database sessions and supports prepared statement caching to accelerate the execution of frequently repeated o
This library provides a robust PostgreSQL-specific interface that includes low-level query execution, transaction management, and struct mapping, though it is focused on a single database engine rather than being a generic multi-database ORM.
GF is a comprehensive Go application toolkit and web framework. It provides a set of libraries and tools for building scalable web applications, APIs, and enterprise-level software. The project features a driver-agnostic SQL database toolkit with a query builder and object mapper, alongside a dedicated framework for creating structured command line interfaces. It includes a project scaffolding tool to bootstrap application structures and automate development workflows. The toolkit covers several broader capability areas, including concurrent data management with thread-safe collections, cryp
This is a comprehensive web framework that includes a robust, driver-agnostic database toolkit capable of SQL query construction, struct mapping, and transaction management, though it is broader in scope than a standalone database library.
sqlboiler is a database-first ORM generator for Go that analyzes an existing database schema to produce strongly typed structures and query helpers. It functions as a schema-driven code generator, transforming database tables and relationships into executable Go source code. The project distinguishes itself through a type-safe query builder that uses chainable modifiers to construct SQL statements, eliminating the need for raw string concatenation. It utilizes customizable text templates to generate source code, allowing for the aliasing of schema entities and the creation of custom templates
This is a database-first ORM generator that provides type-safe query construction and struct mapping, though it differs from traditional runtime ORMs by generating code based on your existing database schema rather than defining it through Go structs.
This project is a command-line utility designed to manage database schema versioning and automate incremental schema updates. It functions as a version control system for database structures, ensuring consistency across environments by tracking applied migrations in a dedicated metadata table and executing scripts in a sequential, reliable manner. The tool distinguishes itself through a driver-based abstraction layer that supports a wide range of database engines, including various SQL and distributed cloud databases. It provides robust concurrency control through advisory locking, which prev
This tool is a specialized utility for managing database schema migrations rather than an ORM or query builder for interacting with data in your application code.