heige
4c8810a848
Refactor if logic ( #4683 )
...
* adjust code for preload
* adjust code for Create
2021-11-04 13:45:44 +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
Jinzhu
b27095e8a1
Refactor Convert SQL null values to zero values for model fields which are not pointers #4710
2021-10-13 21:01:36 +08:00
Jim
19cf645dbd
feat: Convert SQL nulls to zero values (ConvertNullToZeroValues)
...
Makes it the default behavior to convert SQL null values to zero
values for model fields which are not pointers.
2021-10-13 08:11:22 -04:00
Jinzhu
da16a8aac6
Update updated_at when upserting with Create OnConflict
2021-09-17 15:29:49 +08:00
Jinzhu
d4f3c109d6
Fix OnConflict with one column, close #4370
2021-07-13 21:29:31 +08:00
Jinzhu
2ec7043818
Respect update permission for OnConflict Create
2021-07-13 18:04:42 +08:00
Jinzhu
8e67a08774
Fix Scopes with Row, close #4465
2021-06-18 15:38:20 +08:00
heige
50e85e14d4
Code optimize ( #4415 )
...
* optimize gormSourceDir replace
* fmt.Errorf adjust and Optimize for-break
* strings trim
* feat: avoid using the same name field and if..else optimization adjustment
* optimization callbacks/create.go Create func if...else logic
* fix: callbacks/create.go Create func
* fix FileWithLineNum func and add gormSourceDir unit test
* remove debug print and utils_filenum_test.go
2021-06-10 10:21:28 +08:00
Jinzhu
6951be0284
Allow customize clauses
2021-04-28 17:19:30 +08:00
Jinzhu
27bb9137d3
Refactor OnConflict.UpdateALl
2021-03-18 11:44:20 +08:00
Jinzhu
eb9a704fda
Fix update UpdatedAt when full saving associations, close #4115
2021-02-26 17:11:25 +08:00
Jinzhu
de850edb4f
Fix Change UpdatedAt to current time when doing OnConflict UpdateAll
2021-01-11 19:16:47 +08:00
Jinzhu
d888c799d7
Change UpdatedAt to current time when doing OnConflict UpdateAll
2021-01-08 19:20:42 +08:00
Jinzhu
60b769c2c8
OnConflict UpdateAll includes fields that specified default values via tag
2021-01-04 15:13:56 +08:00
Jinzhu
79864af9ff
Allow customize auto increment increment
2020-12-30 11:16:40 +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
f6e1786ca2
Add skip hooks support
2020-11-17 15:19:58 +08:00
Jinzhu
f5c2126c29
Fix FindInBatches tests
2020-11-17 13:14:34 +08:00
Jinzhu
62be27d3ca
Add OnConflict UpdateAll support
2020-11-16 20:22:08 +08:00
Jinzhu
1e241aa645
Reduce GC alloc
2020-11-10 21:23:20 +08:00
Jinzhu
c0de3c5051
Support FullSaveAssociations Mode, close #3487 , #3506
2020-09-24 19:29:15 +08:00
Jinzhu
28121d4455
Fix panic when batch creating from slice contains invalid data, close #3385
2020-09-03 20:59:41 +08:00
Jinzhu
48b395b760
returns ErrEmptySlice when creating with zero length slice
2020-09-03 11:32:30 +08:00
Jinzhu
b4166d9515
Fix V2 Save compatibility, close #3332
2020-08-30 10:21:11 +08:00
Jinzhu
7a90496701
Test create from sql expr with map
2020-08-27 16:27:59 +08:00
Jinzhu
ce8853e7a6
Add GormValuer interface support
2020-08-27 15:03:57 +08:00
Jinzhu
50826742fd
Add error gorm.ErrInvalidData
2020-08-18 18:00:36 +08:00
Jinzhu
9fcc337bd1
Fix create from map
2020-08-17 17:41:36 +08:00
Jinzhu
3df249c127
Use table expr when inserting table, close #3239
2020-08-06 17:12:31 +08:00
Jinzhu
69d8111893
Fix panic when using invalid data, close #3193
2020-07-24 08:32:50 +08:00
Jinzhu
c3f52cee8b
Don't scan last insert id 0
2020-07-23 23:56:13 +08:00
Jinzhu
6ed697dd02
TestFirstOrCreateWithPrimaryKey, close #3192
2020-07-23 23:41:56 +08:00
Jinzhu
0546b59743
Fix save many2many associations with UUID primary key, close #3182
2020-07-22 11:28:00 +08:00
Jinzhu
f5566288de
Add SetColumn, Changed method
2020-06-30 16:53:54 +08:00
Jinzhu
a1e35bdc94
Support merge batch data some having primary values
2020-06-20 16:52:15 +08:00
Jinzhu
0d58d5a3a7
Upsert selected columns
2020-06-10 10:48:48 +08:00
Jinzhu
f3424c6864
Support save slice of data
2020-06-10 00:02:14 +08:00
Jinzhu
05e6a65ee1
Fix typo
2020-06-09 12:00:43 +08:00
Jinzhu
c4872cddfd
Refactor callbacks
2020-06-09 10:17:24 +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
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
e986371a42
Rename package name
2020-06-02 09:18:01 +08:00
Jinzhu
e490e09db5
Add SetupJoinTable support
2020-06-01 23:58:22 +08:00
Jinzhu
4e147e1256
Test SubQuery
2020-06-01 21:26:23 +08:00
Jinzhu
befef0c9a9
Improve Hooks
2020-06-01 00:12:20 +08:00