The fantastic ORM library for Golang, aims to be developer friendly
Go to file
Jonathan A. Sternberg 222427c474
Release the connection when discovering the column types in the migrator
When the migrator is used to discover the column types, such as when
used with `AutoMigrate()`, it does not close the query result. This
changes the migrator to close the query result and it also changes the
query to use `LIMIT 1` to prevent additional work against the database
when only discovering the schema.

Fixes #3432.
2020-09-08 18:12:14 -05:00
.github Update missing playground template 2020-09-03 11:48:44 +08:00
callbacks Don't marshal to null for associations after preloading, close #3395 2020-09-04 19:09:51 +08:00
clause Fix combine conditions when using string conditions, close #3358 2020-09-02 20:09:51 +08:00
logger Refactor format SQL for driver.Valuer 2020-09-08 19:11:29 +08:00
migrator Release the connection when discovering the column types in the migrator 2020-09-08 18:12:14 -05:00
schema Fix many2many join table name rule 2020-09-06 10:51:21 +08:00
tests Refactor format SQL for driver.Valuer 2020-09-08 19:11:29 +08:00
utils fmt.Sprint() to strconv.Format (#3354) 2020-09-01 21:03:37 +08:00
.gitignore Add clause, DB API, model definition 2020-01-29 19:22:44 +08:00
License Add MIT License file 2015-01-05 08:59:18 +08:00
README.md Add GormValuer interface support 2020-08-27 15:03:57 +08:00
association.go Fix V2 Save compatibility, close #3332 2020-08-30 10:21:11 +08:00
callbacks.go Fix Scan struct with primary key, close #3357 2020-09-02 16:14:26 +08:00
chainable_api.go fix order case (#3350) 2020-09-01 15:50:53 +08:00
errors.go returns ErrEmptySlice when creating with zero length slice 2020-09-03 11:32:30 +08:00
finisher_api.go Fix Save with specified table, close #3396 2020-09-06 12:22:08 +08:00
go.mod Refactor tests files 2020-06-02 10:50:38 +08:00
go.sum Add go.sum 2020-06-06 14:28:59 +08:00
gorm.go Set field size from primary fields to foreign fields 2020-09-03 16:11:15 +08:00
interfaces.go Add GormValuer interface support 2020-08-27 15:03:57 +08:00
migrator.go Fix Scan struct with primary key, close #3357 2020-09-02 16:14:26 +08:00
model.go Fix typo 2020-06-09 12:00:43 +08:00
prepare_stmt.go Fix transaction on closed conn when using prepared statement, close #3380 2020-09-03 19:16:55 +08:00
scan.go Better support for scan into map, fix unfriendly data type for interface, close #3351 2020-09-01 17:45:14 +08:00
soft_delete.go Fix duplicated soft delete clause 2020-09-01 18:05:26 +08:00
statement.go Fix query with specified table and conditions, close #3382 2020-09-03 18:42:32 +08:00
statement_test.go Spelling fix for "condtion" -> "condition" (#3042) 2020-06-08 11:38:51 +08:00

README.md

GORM

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

go report card test status Join the chat at https://gitter.im/jinzhu/gorm Open Collective Backer Open Collective Sponsor 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 Statment 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

License

© Jinzhu, 2013~time.Now

Released under the MIT License