awesome-repositories.com
المدونة
MCP
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
go-gorm avatar

go-gorm/gorm

0
View on GitHub↗
39,798 نجوم·4,154 تفرعات·Go·MIT·19 مشاهداتgorm.io↗

Gorm

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 storage engines and employs a reflection-based system to map programming language types to database schemas. Developers can further customize behavior using a callback-based hook system that executes logic at specific points in the operation lifecycle.

Beyond core mapping, the project provides robust support for transaction management, connection pooling, and automated schema migrations. It handles complex relational modeling, including one-to-one, one-to-many, and many-to-many associations, while offering advanced features like eager loading, soft deletes, and conflict resolution strategies for upsert operations.

The framework is designed for integration into Go applications, providing a unified interface for managing database connectivity and transactional integrity.

Features

  • Database Transactions - Provides a structured API for executing atomic database operations to ensure data consistency and integrity.
  • Object-Relational Mappers - // Get all recordsresult := db.Find(&users)// SELECT FROM users;result.RowsAffected // returns found records count, equals len(users)result.Error // returns error
  • Object-Relational Mapping - Manages complex object relationships by automatically tracking and synchronizing linked records during create, update, and delete operations.
  • Query Builders - A fluent interface for constructing complex SQL statements programmatically while maintaining type safety and preventing common injection vulnerabilities.
  • Database Abstraction Layers - Provides a unified abstraction over various database dialects to ensure consistent query execution across different underlying storage engines.
  • Database Transaction Management - GORM perform write (create/update/delete) operations run inside a transaction to ensure data consistency, you can disable it during initialization if it is not required, you will gain about 30%+ performance improvement a
  • Batch Data Processing - To efficiently insert large number of records, pass a slice to the Create method. GORM will generate a single SQL statement to insert all the data and backfill primary key values, hook methods will be invoked too. It w
  • Connection Managers - Database connection management establishes secure links to external storage systems by initializing drivers with connection strings and configuration settings for reliable communication.
  • Object-Relational Mapping Associations - GORM automates the saving of associations and their references when creating or updating records, using an upsert technique that primarily updates foreign key references for existing associations. ### Auto-Saving Associa
  • Persistence Frameworks - A structured environment for defining database schemas as code and automating the synchronization of application state with storage.
  • Query Condition Builders - String Conditions // Get first matched recorddb.Where("name = ?", "jinzhu").First(&user)// SELECT FROM users WHERE name = 'jinzhu' ORDER BY id LIMIT 1;// Get all matched recordsdb.Where("name <> ?", "jinzhu").Find(
  • Transaction Management - Wraps database operations within atomic units of work to maintain data integrity and ensure consistent state across multiple queries.
  • Transaction Managers - Ensuring data integrity by grouping multiple database operations into atomic units that either succeed or fail together.
  • Database Tools - Object-Relational Mapper for Go.
  • Databases and Storage - Developer-friendly ORM library.
  • Object Relational Mappers - Feature-rich and developer-friendly ORM.
  • Object Relational Mapping - Feature-rich and developer-friendly ORM.
  • Persistence Frameworks - Popular object-relational mapping library for Go.
  • Database Access Layers - A collection of tools that manage connections, transaction lifecycles, and query execution across various relational database management systems.
  • Eager Loading Strategies - GORM automates the saving of associations and their references when creating or updating records, using an upsert technique that primarily updates foreign key references for existing associations. ### Auto-Saving Associa
  • Schema Modelers - Database schema modeling allows defining application objects that map to database tables, supporting custom data types, null-value handling, and persistent storage structures.
  • Single Record Retrievers - GORM provides First, Take, Last methods to retrieve a single object from the database, it adds LIMIT 1 condition when querying the database, and it will return the error ErrRecordNotFound if no record is found.
  • Migration Tools - Synchronizing application data structures with database table schemas to ensure consistent and reliable storage across different environments.
  • Schema Mapping Tools - Uses runtime type inspection to automatically map programming language structures to database tables and manage field-level data persistence.
  • Soft Deletion Mechanisms - If your model includes a gorm.DeletedAt field (which is included in gorm.Model), it will get soft delete ability automatically! When calling Delete, the record WON’T be removed from the database, but GORM will set
  • Upsert Strategies - GORM provides compatible Upsert support for different databases import "gorm.io/gorm/clause"// Do nothing on conflictdb.Clauses(clause.OnConflict{DoNothing: true}).Create(&user)// Update columns to default value on id
  • Connection Pools - Managing a collection of reusable database connections to improve application performance and resource efficiency under high traffic loads.
  • Data Modeling Tools - Defining complex relationships between data entities such as one-to-one, one-to-many, and many-to-many associations within an application.
  • Database Deletion Utilities - When deleting a record, the deleted value needs to have primary key or it will trigger a Batch Delete, for example: ### Generics API ctx := context.Background()// Delete by IDerr := gorm.GEmail.Where("id = ?", 10).Delete
  • Database Lifecycle Hooks - GORM allows user defined hooks to be implemented for BeforeSave, BeforeCreate, AfterSave, AfterCreate. These hook method will be called when creating a record, refer Hooks for details on the lifecycle func (u *Us
  • Lifecycle Hooks - Executes user-defined logic at specific points in the database operation lifecycle to enable custom data validation and transformation.
  • Relational Join Mappers - Specify Joins conditions type result struct { Name string Email string}db.Model(&User{}).Select("users.name, emails.email").Joins("left join emails on emails.user_id = users.id").Scan(&result{})// SELECT users.name, emai

سجل النجوم

مخطط تاريخ النجوم لـ go-gorm/gormمخطط تاريخ النجوم لـ go-gorm/gorm

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Gorm

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Gorm.
  • sqlalchemy/sqlalchemyالصورة الرمزية لـ sqlalchemy

    sqlalchemy/sqlalchemy

    11,612عرض على GitHub↗

    SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a

    Pythonpythonsqlsqlalchemy
    عرض على GitHub↗11,612
  • sequelize/sequelizeالصورة الرمزية لـ sequelize

    sequelize/sequelize

    30,349عرض على GitHub↗

    Sequelize is an object-relational mapping library that provides a unified interface for managing relational data through code. By implementing the Active Record pattern, it maps database tables to application objects, allowing developers to perform standard create, read, update, and delete operations using high-level method calls. The library abstracts complex database interactions by translating these calls into optimized, engine-specific SQL statements, ensuring consistent behavior across different database systems. The project distinguishes itself through a comprehensive suite of tools for

    TypeScriptdb2-ibm-ifeature-richjavascript
    عرض على GitHub↗30,349
  • typeorm/typeormالصورة الرمزية لـ typeorm

    typeorm/typeorm

    36,540عرض على GitHub↗

    TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented application code and relational database tables. It provides a comprehensive data persistence layer that allows developers to define database entities using class decorators or configuration objects, enabling seamless interaction with data through object-oriented patterns. The project distinguishes itself through a flexible architecture that supports both the data mapper and repository patterns, alongside a fluent query builder that translates high-level method calls into platform

    TypeScriptactive-recordcockroachdbdata-mapper
    عرض على GitHub↗36,540
  • dotnet/efcoreالصورة الرمزية لـ dotnet

    dotnet/efcore

    14,587عرض على GitHub↗

    Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using strongly-typed code. It serves as a comprehensive data access framework, providing a unified interface for mapping application objects to relational and non-relational database schemas while managing the lifecycle of data operations through a central context. The project distinguishes itself through a provider-based architecture that decouples core data access logic from specific database engines, allowing for consistent interaction across diverse storage systems. It features a

    C#aspnet-productc-sharpdatabase
    عرض على GitHub↗14,587
عرض جميع البدائل الـ 30 لـ Gorm→

الأسئلة الشائعة

ما هي وظيفة go-gorm/gorm؟

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.

ما هي الميزات الرئيسية لـ go-gorm/gorm؟

الميزات الرئيسية لـ go-gorm/gorm هي: Database Transactions, Object-Relational Mappers, Object-Relational Mapping, Query Builders, Database Abstraction Layers, Database Transaction Management, Batch Data Processing, Connection Managers.

ما هي البدائل مفتوحة المصدر لـ go-gorm/gorm؟

تشمل البدائل مفتوحة المصدر لـ go-gorm/gorm: sqlalchemy/sqlalchemy — SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for… sequelize/sequelize — Sequelize is an object-relational mapping library that provides a unified interface for managing relational data… typeorm/typeorm — TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented… dotnet/efcore — Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using… hibernate/hibernate-orm — Hibernate ORM is a Java object-relational mapper and a full implementation of the Jakarta Persistence API. It serves… dapperlib/dapper — Dapper is a lightweight object-relational mapper for .NET that functions as a high-performance data access library. It…