Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. igor

igor

Apache-2.0Go

A PostgreSQL abstraction layer for Go with GORM-like syntax, focusing on security and performance.

GitHubGitHub
128 stars5 forks0 contributors

What is igor?

Igor is a Go library that serves as an abstraction layer for PostgreSQL, providing a GORM-like syntax for database operations. It enables developers to perform CRUD operations in a secure, fast, and intuitive manner, leveraging PostgreSQL's advanced features like JSONB support and prepared statements. The library focuses on simplifying data access while maintaining high performance and security standards.

Target Audience

Go developers working with PostgreSQL who need a lightweight, secure abstraction layer for database operations without the complexity of a full ORM. It is ideal for projects where performance and SQL injection prevention are critical.

Value Proposition

Developers choose Igor for its balance of GORM compatibility and PostgreSQL-specific optimizations, offering prepared statements by default for security, native support for PostgreSQL types, and efficient CRUD operations without the overhead of associations or DDL management.

Overview

igor is an abstraction layer for PostgreSQL with a gorm like syntax.

Use Cases

Best For

  • Building Go applications that require secure database access with prepared statements
  • Migrating from GORM to a PostgreSQL-specific abstraction layer
  • Implementing event-driven architectures using PostgreSQL LISTEN/NOTIFY
  • Working with PostgreSQL JSONB and array types in Go
  • Performing CRUD operations with automatic handling of default values
  • Developing high-performance database layers without full ORM features

Not Ideal For

  • Applications requiring complex data relationships with associations between tables
  • Teams that depend on ORM features like soft delete or automatic callbacks
  • Projects needing built-in database schema migration tools
  • Developers who prefer flexible method chaining order as in GORM

Pros & Cons

Pros

Built-in Security

Uses prepared statements by default for all queries, preventing SQL injection and improving performance, as emphasized in the README's security focus.

PostgreSQL Native Features

Supports PostgreSQL-specific types like JSONB and arrays natively, and integrates LISTEN/NOTIFY for event-driven workflows, leveraging database optimizations.

GORM-Like Syntax

Maintains syntax compatibility with GORM, easing migration for existing projects, though with noted differences in method order and model requirements.

Efficient Value Handling

Exploits PostgreSQL's RETURNING clause to automatically update model fields with database-generated values, ensuring data consistency after inserts and updates.

Cons

Missing ORM Features

Lacks support for associations, callbacks, and soft delete, which are standard in full ORMs and necessary for complex data modeling, as admitted in the README.

Rigid Method Order

Requires calling Model before Select, unlike GORM, which can cause errors if not followed and complicates code refactoring, as highlighted in the Differences section.

Error Handling via Panic

Some methods, such as Where without conditions or Delete with empty models, panic instead of returning errors, making error management less robust in production.

PostgreSQL Lock-in

Designed exclusively for PostgreSQL, so it cannot be used with other databases, limiting flexibility for projects that might need multi-database support.

Frequently Asked Questions

Quick Stats

Stars128
Forks5
Contributors0
Open Issues0
Last commit2 years ago
CreatedSince 2016

Tags

#prepared-statements#listen-notify#dbms#database-abstraction#postgresql#abstraction#gorm#crud-operations#golang#go#sql-injection-prevention

Built With

G
Go
P
PostgreSQL

Included in

Go169.1k
Auto-fetched 8 hours ago

Related Projects

sqlcsqlc

Generate type-safe code from SQL

Stars18,259
Forks1,085
Last commit9 hours ago
SquirrelSquirrel

Fluent SQL generation for golang

Stars7,987
Forks512
Last commit2 years ago
xoxo

Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server

Stars3,895
Forks337
Last commit11 hours ago
jetjet

Type safe SQL builder with code generation and automatic query result data mapping

Stars3,791
Forks192
Last commit8 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub