The fantastic ORM library for Golang, aims to be developer friendly
Switch branches/tags
Nothing to show
Clone or download
nanjj and jinzhu Check valuer interface before scan value (#2155)
Scan interface only accept int64, float64, bool, []byte, string,
time.Time or nil. When do scan, it's better to check whether the type
support valuer interface and do convert.
Latest commit 472c70c Nov 3, 2018
Permalink
Failed to load latest commit information.
.github Simplify GitHub templates Feb 10, 2018
dialects lock TagSettings structure when modified (#1796) Sep 9, 2018
.codeclimate.yml Add codeclimate Aug 22, 2015
.gitignore Update README Feb 29, 2016
License Add MIT License file Jan 5, 2015
README.md Update README Feb 16, 2018
association.go add comment (#2163) Nov 3, 2018
association_test.go Add tag association_autoupdate, association_autocreate, association_s… Feb 10, 2018
callback.go Use log.PrintX instead of fmt.PrintX (#1634) Oct 10, 2017
callback_create.go Don't save ignored fields into database Sep 9, 2018
callback_delete.go Fix customize DeletedAt's column name Feb 1, 2017
callback_query.go Support only preloading (#1926) Sep 9, 2018
callback_query_preload.go lock TagSettings structure when modified (#1796) Sep 9, 2018
callback_row_query.go Query Row, Rows inside RowQuery callbacks Jan 15, 2017
callback_save.go lock TagSettings structure when modified (#1796) Sep 9, 2018
callback_system_test.go Rename test files Mar 8, 2016
callback_update.go Fix issue updating models with foreign key constraints (#1988) Sep 9, 2018
callbacks_test.go update tests Aug 28, 2014
create_test.go Fix insert with default value for mysql Feb 12, 2018
customize_column_test.go Add more tests for self-referencing many2many relationship Feb 10, 2018
delete_test.go Fix customize DeletedAt's column name Feb 1, 2017
dialect.go lock TagSettings structure when modified (#1796) Sep 9, 2018
dialect_common.go lock TagSettings structure when modified (#1796) Sep 9, 2018
dialect_mysql.go lock TagSettings structure when modified (#1796) Sep 9, 2018
dialect_postgres.go lock TagSettings structure when modified (#1796) Sep 9, 2018
dialect_sqlite3.go lock TagSettings structure when modified (#1796) Sep 9, 2018
docker-compose.yml Setup test env Feb 10, 2018
embedded_struct_test.go Fix support embedded pointer type struct, close #1450 Feb 13, 2018
errors.go doc: document ErrRecordNotFound error more clear (#2015) Aug 18, 2018
errors_test.go Make gorm.Errors available for use outside gorm Oct 25, 2016
field.go Check valuer interface before scan value (#2155) Nov 3, 2018
field_test.go Check valuer interface before scan value (#2155) Nov 3, 2018
interface.go Replace all use of *sql.DB with sqlCommon Mar 14, 2017
join_table_handler.go Call DefaultTableNameHandler for JoinTableHandler's table Feb 12, 2018
join_table_test.go mysql only accept offset with limit together Jul 3, 2017
logger.go Print affected rows (#1541) Jul 23, 2017
main.go lock TagSettings structure when modified (#1796) Sep 9, 2018
main_test.go save_associations:true should store related item (#2067) Sep 9, 2018
migration_test.go save_associations:true should store related item (#2067) Sep 9, 2018
model.go Rename test files Mar 8, 2016
model_struct.go Second part of the defaultTableName field race fix (#2060) Sep 22, 2018
multi_primary_keys_test.go Fix tests with mssql Mar 22, 2017
naming.go added naming strategy option for db, table and column names (#2040) Sep 9, 2018
naming_test.go added naming strategy option for db, table and column names (#2040) Sep 9, 2018
pointer_test.go Fix some go vet/lint reports Jan 15, 2016
polymorphic_test.go Refactor named value support for PolymorphicType Oct 6, 2016
preload_test.go Setting gorm:auto_preload to false now prevents preloading (#2031) Aug 18, 2018
query_test.go Fix typo in query_test (#1977) Jul 26, 2018
scaner_test.go Fix tests with mssql Mar 22, 2017
scope.go simplify cases of strings.Index with strings.Contains (#2162) Nov 3, 2018
scope_test.go Refactor fix valuer Feb 11, 2018
search.go Do not ignore order on distinct query (#1570) Sep 4, 2017
search_test.go Add SelectAttrs, OmitAttrs Mar 12, 2015
test_all.sh Set AutoIncrement to false with tag Feb 10, 2018
update_test.go Fixing 4 typos in comments and gofmt -s in all files Feb 10, 2017
utils.go getValueFromFields doesn't panic on nil pointers (#2021) Sep 9, 2018
wercker.yml Remove mysql8 from CI Feb 27, 2018

README.md

GORM

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

go report card wercker status Join the chat at https://gitter.im/jinzhu/gorm Open Collective Backer Open Collective Sponsor MIT license GoDoc

Overview

  • Full-Featured ORM (almost)
  • Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism)
  • Hooks (Before/After Create/Save/Update/Delete/Find)
  • Preloading (eager loading)
  • Transactions
  • Composite Primary Key
  • SQL Builder
  • Auto Migrations
  • Logger
  • Extendable, write Plugins based on GORM callbacks
  • 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