Commit Graph

59 Commits

Author SHA1 Message Date
qqxhb 490625981a
fix: update omit (#5699) 2022-09-16 15:02:44 +08:00
Jinzhu b13d1757fa Refactor Model with slice data 2022-07-07 15:39:29 +08:00
Jinzhu fe01e1b9f4 Fix Model with slice data 2022-07-07 14:43:33 +08:00
Jinzhu f92e6747cb Handle field set value error 2022-03-23 17:24:25 +08:00
Jinzhu a7b3b5956f Fix hooks order, close https://github.com/go-gorm/gorm.io/pull/519 2022-03-22 22:42:36 +08:00
Jinzhu 6a18a15c93 Refactor check missing where condition 2022-02-25 10:48:23 +08:00
Jinzhu b1201fce4e Fix update with customized time type, close #5101 2022-02-23 17:48:26 +08:00
Jinzhu 39d84cba5f Add serializer support (#5078)
* Update context

* Update GormFieldValuer

* Add Serializer

* Add Serializer Interface

* Refactor gorm field

* Refactor setter, valuer

* Add sync.Pool

* Fix test

* Add pool manager

* Fix pool manager

* Add poolInitializer

* Add Serializer Scan support

* Add Serializer Value method

* Add serializer test

* Finish Serializer

* Fix JSONSerializer for postgres

* Fix JSONSerializer for sqlserver

* Test serializer tag

* Add unixtime serializer

* Update go.mod
2022-02-19 17:02:53 +08:00
kinggo b47cf57f5e
ci: add gofumpt check in reviewdog (#4973) 2022-01-06 15:02:53 +08:00
kinggo e5bdd610c3
fix: save not use soft_delete (#4897)
* fix: Save not use soft_delete

* fix: save not use soft_delete

* fix: save not use soft_delete

* fix: save not use soft_delete

Co-authored-by: kinggo <>
2021-12-08 13:58:06 +08:00
Jinzhu 300a23fc31 Check rows.Close error, close #4891 2021-12-02 10:39:24 +08:00
heige 9d5f315b6d
feat: go code style adjust and optimize code for callbacks package (#4861)
* feat: go code style adjust and optimize code for callbacks package

* Update scan.go
2021-11-29 09:33:20 +08:00
riverchu 33bc56cbb5 feat(update): update when has SET clause 2021-11-09 19:55:47 +08:00
Jinzhu e953880d19 Add returning tests 2021-10-28 09:17:33 +08:00
Jinzhu 835d7bde59 Add returning support to delete 2021-10-28 07:56:55 +08:00
Jinzhu af3fbdc2fc Improve returning support 2021-10-26 22:40:14 +08:00
kinggo b46e2afc4a
fix : update miss where's condition when primary key use "<-:create" tag (#4738)
* fix:update miss where condition

* fix:rename test case
2021-10-08 13:47:01 +08:00
Jinzhu ba16b2368f
Refactor update record (#4679) 2021-09-07 20:04:54 +08:00
riverchu eaa63d15e7 feat: copy dest fields to model struct 2021-09-06 20:13:20 +08:00
riverchu 1d9e563023 style: prepose error judgement 2021-09-06 20:13:20 +08:00
Jinzhu 6951be0284 Allow customize clauses 2021-04-28 17:19:30 +08:00
Jinzhu 0f00493c50 Continue to update tracking fields even not selected with Select, but skip them if omited with Omit, fix #3856 2020-12-15 11:18:29 +08:00
Jinzhu 9df9f7688b Change UpdatingColumn to SkipHooks 2020-11-17 17:49:43 +08:00
Jinzhu dacbaa5f02 Fix update attrs order 2020-08-27 19:52:01 +08:00
Jinzhu ce8853e7a6 Add GormValuer interface support 2020-08-27 15:03:57 +08:00
Jinzhu ebdb4edda8 Add AllowGlobalUpdate mode 2020-08-23 20:08:23 +08:00
Jinzhu 50826742fd Add error gorm.ErrInvalidData 2020-08-18 18:00:36 +08:00
Jinzhu ecc946be6e Test update from sub query 2020-08-13 16:05:06 +08:00
lninl 7bb883b665
Auto creating/updating time with unix (milli) second (#3213)
* Auto creating/updating time with unix (milli) second

* add test for 'Auto creating/updating time with unix (milli) second'
2020-07-30 17:39:57 +08:00
Jinzhu 69d8111893 Fix panic when using invalid data, close #3193 2020-07-24 08:32:50 +08:00
Jinzhu ef002fd7ac Add GORMDataType to Field, close #3171 2020-07-20 19:00:03 +08:00
Jinzhu b5725940e9 Test Select with Update Struct 2020-07-06 11:20:43 +08:00
Jinzhu f5566288de Add SetColumn, Changed method 2020-06-30 16:53:54 +08:00
Jinzhu 4f19e2a7b3 Test ForeignKeyConstraints 2020-06-20 01:20:18 +08:00
Jinzhu 9f19378304 Grow SQL capacity to reduce allocation 2020-06-08 20:23:47 +08:00
Jinzhu aaf0725771 Refactor for performance 2020-06-08 17:21:26 +08:00
Jinzhu d11c424334 Fix typo 2020-06-07 15:26:43 +08:00
Jinzhu 1490a062db Refactor codebase and add benchmark test 2020-06-05 23:26:56 +08:00
Jinzhu 163200d05f Test Hooks 2020-06-05 20:24:15 +08:00
Jinzhu d50879cc28 Add field permission test 2020-06-05 19:18:22 +08:00
Jinzhu e986371a42 Rename package name 2020-06-02 09:18:01 +08:00
Jinzhu 4e147e1256 Test SubQuery 2020-06-01 21:26:23 +08:00
Jinzhu 1559fe24e5 Add more updates test 2020-06-01 19:41:33 +08:00
Jinzhu befef0c9a9 Improve Hooks 2020-06-01 00:12:20 +08:00
Jinzhu e26abb84b3 Test block global update/delete 2020-05-31 20:42:07 +08:00
Jinzhu 58bc0f51c1 Fix mssql rename index, has column 2020-05-31 07:57:13 +08:00
Jinzhu 9dd516a7e8 Test UpdateColumn 2020-05-30 17:34:22 +08:00
Jinzhu 028c9d6e17 Test Updates 2020-05-30 17:01:28 +08:00
Jinzhu abae7f71c5 Test non std primary key and default value 2020-05-30 16:03:27 +08:00
Jinzhu 55074213bc Add SoftDelete support 2020-05-29 07:35:45 +08:00