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
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
heige
4c8810a848
Refactor if logic ( #4683 )
...
* adjust code for preload
* adjust code for Create
2021-11-04 13:45:44 +08:00
Jinzhu
52b72d7ef2
Add error explanations when preloading assocations w/o foreign fields, close #4356
2021-07-13 21:00:13 +08:00
Jinzhu
b13732c450
Fix invalid preload SQL when no data found, close #4443
2021-07-13 20:23:05 +08:00
Jinzhu
d483ffa45c
Fix Preload with nil pointer
2021-04-15 10:37:05 +08:00
Sivchari
adf85d5b82
change the method of initializing slice ( #4097 )
...
* change the method of initializing slice and fixed the length to be specified as 0
* keep the association.go code in the var group
* keep the association.go code in the var group
* change to initializing in var group
2021-03-04 19:44:15 +08:00
Jinzhu
7f198ead0e
Refactor nested preloading associations, close #3970
2021-01-26 16:33:19 +08:00
Jinzhu
59fa07953c
Preload with settings, close #3945
2021-01-15 17:15:59 +08:00
Jinzhu
7ebb320f3e
Allow customize join table's table in callback
2021-01-10 14:58:54 +08:00
Jinzhu
6186a4daa7
allow SkipHooks when preload & save associations
2020-11-20 16:56:52 +08:00
Jinzhu
e3b4e0418f
Inherit SkipHooks option when preloading associations, close #3772
2020-11-20 15:11:47 +08:00
Jinzhu
26504f5cae
Use NewDB to replace WithConditions for Session
2020-11-17 16:28:37 +08:00
Jinzhu
1e241aa645
Reduce GC alloc
2020-11-10 21:23:20 +08:00
Jinzhu
d8ddccf147
Don't marshal to null for associations after preloading, close #3395
2020-09-04 19:09:51 +08:00
Jinzhu
308d22b166
Clean up associations before Preload, close #3345
2020-09-01 13:48:37 +08:00
Jinzhu
3195ae1207
Allow override alias table in preload conditions
2020-08-25 18:59:19 +08:00
Jinzhu
2ae0653af2
Fix ambiguous column when using same column name in join table, close #3120
2020-07-09 09:03:48 +08:00
Jinzhu
e986371a42
Rename package name
2020-06-02 09:18:01 +08:00
Jinzhu
b71171dd92
Add more preload tests
2020-06-02 01:34:00 +08:00
Jinzhu
76b8e78dcb
Add multi primary keys test
2020-06-01 08:13:16 +08:00
Jinzhu
aa959ec383
Test NamedPolymorphic
2020-05-31 14:41:45 +08:00
Jinzhu
6f4602af11
Fix mysql tests
2020-05-29 23:38:03 +08:00
Jinzhu
e60a8d54ff
Test Nested Preload
2020-05-24 00:52:25 +08:00
Jinzhu
5ec4fee797
Don't preload if foreign keys zero
2020-05-23 21:09:03 +08:00
Jinzhu
59365b776b
Refacotr Preload
2020-05-18 13:07:11 +08:00
Jinzhu
f999240e10
Define association API, add conds to when preloading
2020-05-14 20:54:50 +08:00
Jinzhu
42aae57240
Test Preload for BelongsTo/HasOne/HasMany
2020-05-14 14:41:33 +08:00
Jinzhu
b549f9bb9a
Implement preload support
2020-05-14 12:19:12 +08:00
Jinzhu
41697d58d3
Handle preload
2020-05-07 10:03:48 +08:00