MCPcopy
hub / github.com/go-gorm/gorm

github.com/go-gorm/gorm @v1.31.2 sqlite

repository ↗ · DeepWiki ↗ · release v1.31.2 ↗
1,937 symbols 9,965 edges 162 files 449 documented · 23%
README

GORM

The fantastic ORM library for Golang, aims to be developer friendly.

go report card test status MIT license Go.Dev reference

Overview

  • Full-Featured ORM
  • Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance)
  • Hooks (Before/After Create/Save/Update/Delete/Find)
  • Eager loading with Preload, Joins
  • Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point
  • Context, Prepared Statement Mode, DryRun Mode
  • Batch Insert, FindInBatches, Find To Map
  • SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr
  • Composite Primary Key
  • Auto Migrations
  • Logger
  • Extendable, flexible plugin API: Database Resolver (Multiple Databases, Read/Write Splitting) / Prometheus…
  • Every feature comes with tests
  • Developer Friendly

Getting Started

Contributing

You can help to deliver a better GORM, check out things you can do

Contributors

Thank you for contributing to the GORM framework!

License

© Jinzhu, 2013~time.Now

Released under the MIT License

Extension points exported contracts — how you extend this code

Expression (Interface)
Expression expression interface [32 implementers]
clause/expression.go
SerializerInterface (Interface)
SerializerInterface serializer interface [11 implementers]
schema/serializer.go
StatementModifier (Interface)
StatementModifier statement modifier interface [5 implementers]
statement.go
Tabler (Interface)
(no doc) [6 implementers]
schema/schema.go
Replacer (Interface)
Replacer replacer interface like strings.Replacer [4 implementers]
schema/naming.go
BeforeUpdateInterface (Interface)
(no doc) [5 implementers]
callbacks/interfaces.go
ConstraintInterface (Interface)
ConstraintInterface database constraint interface [3 implementers]
schema/interfaces.go
Dialector (Interface)
Dialector GORM database dialector [2 implementers]
interfaces.go

Core symbols most depended-on inside this repo

Where
called by 484
generics.go
Model
called by 468
chainable_api.go
Find
called by 371
generics.go
Create
called by 369
generics.go
First
called by 339
generics.go
Migrator
called by 271
interfaces.go
Association
called by 269
association.go
Preload
called by 248
generics.go

Shape

Method 763
Function 686
Struct 366
Interface 62
TypeAlias 57
FuncType 3

Languages

Go100%

Modules by API surface

generics.go156 symbols
tests/migrate_test.go105 symbols
schema/relationship_test.go57 symbols
migrator.go57 symbols
tests/query_test.go51 symbols
migrator/migrator.go45 symbols
interfaces.go44 symbols
tests/preload_suits_test.go40 symbols
internal/lru/lru.go37 symbols
clause/expression.go35 symbols
tests/hooks_test.go34 symbols
tests/scanner_valuer_test.go32 symbols

Dependencies from manifests, versioned

filippo.io/edwards25519v1.1.0 · 1×
github.com/HuaweiCloudDeveloper/gaussdb-gov1.0.0-rc1 · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/golang-sql/civilv0.0.0-2022022313231 · 1×
github.com/golang-sql/sqlexpv0.1.0 · 1×
github.com/jackc/pgpassfilev1.0.0 · 1×
github.com/jackc/pgservicefilev0.0.0-2024060612052 · 1×
github.com/jackc/puddle/v2v2.2.2 · 1×
github.com/jinzhu/inflectionv1.0.0 · 1×

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add gorm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact