black-06
4b0da0e97a
fix cond in scopes ( #6152 )
...
* fix cond in scopes
* replace quote
* fix execute scopes
2023-04-11 12:01:23 +08:00
Jinzhu
4d6b70ec88
Allow modify statement from dest
2023-02-02 17:15:08 +08:00
Jinzhu
ddd3cc2502
Add ParameterizedQueries option support for logger, close #5288
2022-12-25 11:37:23 +08:00
Jinzhu
9fd73ae4f1
Revert "use callback to handle transaction"
...
This reverts commit 93f28bc116
.
2022-07-07 15:06:48 +08:00
Joe
2cb4088456
ignore AddError return error
2022-07-01 14:37:38 +08:00
Joe
93f28bc116
use callback to handle transaction
...
- make transaction have before and after hooks, so plugin can have hack before
or after transaction
2022-06-24 10:33:39 +08:00
Cr
b0104943ed
fix: callbcak sort when using multiple plugin ( #5304 )
2022-04-30 09:57:16 +08:00
Jinzhu
b23c3b290e
Don't query with primary key when using Save
2021-11-08 18:49:59 +08:00
Jinzhu
f21e35f7c5
Fix table not supported error when using unexpected table name
2021-08-26 13:14:16 +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
92c3ba9dcc
Fix create new db sessions in scopes
2021-05-17 15:36:07 +08:00
Jinzhu
6951be0284
Allow customize clauses
2021-04-28 17:19:30 +08:00
Jinzhu
82cb4ebfe2
Fix overwrite Statement in scopes
2021-04-22 13:12:20 +08:00
Jinzhu
d483ffa45c
Fix Preload with nil pointer
2021-04-15 10:37:05 +08:00
Jinzhu
704e53a774
Call scopes before parse model value, close #4209
2021-03-24 16:35:39 +08:00
Jinzhu
e85b73e5a5
Fix nested Scopes, close #4196
2021-03-19 13:44:25 +08:00
Jinzhu
14b9bd163c
Don't panic when using nil pointer, close #4168
2021-03-10 19:32:56 +08:00
Jinzhu
675de6fc16
Clear scopes before invoke scopes methods
2021-03-08 19:21:09 +08:00
heige
495ec4bd87
invalid db error and value and invalid value length error ( #4151 )
2021-03-07 10:56:32 +08:00
Jinzhu
828e6b646b
Lazy call registered scopes
2021-02-25 18:49:01 +08:00
rorschach
ba59065024
retrieving gorm object support pointer
2021-01-27 11:48:47 +08:00
Jinzhu
dbc6b34dce
Add detailed error information when missing table name
2020-09-29 15:43:31 +08:00
Jinzhu
9eec6ae066
Fix affected rows for Scan, change affected rows count for row/rows to '-', close #3532
2020-09-27 12:25:38 +08:00
Jinzhu
53caa85cf4
Use db's Logger for callbacks logs, close #3448 , #3447
2020-09-10 19:20:47 +08:00
Jinzhu
dbaa6b0ec3
Fix Scan struct with primary key, close #3357
2020-09-02 16:14:26 +08:00
Jinzhu
c11c939b95
callbacks support sort with wildcard
2020-08-03 21:48:36 +08:00
Jinzhu
bba569af2b
Add NamedArg support
2020-07-10 12:28:24 +08:00
Jinzhu
4555796b62
Refactor Execute callbacks
2020-06-08 22:32:35 +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
e959a67f87
Fix callbacks with Match
2020-06-02 12:46:55 +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
135d9f8b03
Test HasMany Association for Slice
2020-05-25 11:57:58 +08:00
Jinzhu
cbc4a81140
Add Count tests
2020-05-24 11:35:19 +08:00
Jinzhu
72460df1bd
Fix associations find
2020-05-23 11:57:28 +08:00
Jinzhu
8def7be583
Add context to logger
2020-05-05 21:28:38 +08:00
Jinzhu
af080e6773
Fix primary key tag
2020-03-12 08:39:42 +08:00
Jinzhu
9e8a4db36b
Use *gorm.DB to replace gorm.DB
2020-03-10 08:39:33 +08:00
Jinzhu
3aa1891068
Add sync pool
2020-03-09 15:32:55 +08:00
Jinzhu
a145d7e019
Refactor structure
2020-03-09 14:25:50 +08:00
Jinzhu
04adbaf7f6
Fix parse stmt ReflectValue
2020-02-24 08:51:35 +08:00
Jinzhu
fa22807e12
Make inesrt into db works
2020-02-23 19:41:29 +08:00
Jinzhu
27cb613871
Refactor logger
2020-02-23 15:07:47 +08:00
Jinzhu
bc5ceff82f
Explain SQL for dialects
2020-02-23 12:41:13 +08:00
Jinzhu
62dcd7896a
Add Migrator
2020-02-20 23:04:03 +08:00
Jinzhu
46b1c85f88
Add more clauses
2020-02-04 08:56:15 +08:00
Jinzhu
728c0d4470
Add callbacks
2020-02-02 20:05:10 +08:00
Jinzhu
d833efe8b9
Work on clauses
2020-02-02 19:11:17 +08:00
Jinzhu
5959c81be6
Refactor callbacks
2020-01-31 08:44:45 +08:00