Nguyen Huu Tuan
328f301982
add some test case which related the logic ( #5477 )
2022-09-22 18:35:21 +08:00
kinggo
12237454ed
fix: use preparestmt in trasaction will use new conn, close #5508
2022-09-22 16:47:43 +08:00
Cr
73bc53f061
feat: migrator support type aliases ( #5627 )
...
* feat: migrator support type aliases
* perf: check type
2022-09-22 15:56:32 +08:00
Cr
101a7c789f
fix: scan array ( #5624 )
...
Co-authored-by: Jinzhu <wosmvp@gmail.com>
2022-09-22 15:51:47 +08:00
Jinzhu
3a72ba102e
Allow shared foreign key for many2many jointable
2022-09-22 15:03:41 +08:00
jesse.tang
1f634c3937
support scan assign slice cap ( #5634 )
...
* support scan assign slice cap
* fix
2022-09-22 14:50:35 +08:00
Cr
5ed7b1a65e
fix: same embedded filed name ( #5705 )
2022-09-22 11:25:03 +08:00
qqxhb
490625981a
fix: update omit ( #5699 )
2022-09-16 15:02:44 +08:00
Googol Lee
edb00c10ad
AutoMigrate() should always migrate checks, even there is no relationship constraints. ( #5644 )
...
* fix: remove uuid autoincrement
* AutoMigrate() should always migrate checks, even there is no relationship constranits.
Co-authored-by: a631807682 <631807682@qq.com>
2022-09-14 10:26:51 +08:00
Bruce MacKenzie
f29afdd329
Rewrite of finisher_api Godocs ( #5618 )
2022-09-09 11:16:41 +08:00
Jiepeng Cao
b3eb1c8c51
simplified regexp ( #5677 )
2022-09-05 15:39:19 +08:00
jesse.tang
f78f635fae
Optimize: code logic db.scanIntoStruct() ( #5633 )
2022-09-05 15:34:33 +08:00
Cr
d71caef7d9
fix: remove uuid autoincrement ( #5620 )
2022-09-03 20:00:21 +08:00
Shunsuke Otani
8c3018b96a
Replace `ioutil.Discard` with `io.Discard` ( #5603 )
2022-08-15 10:50:06 +08:00
Shunsuke Otani
3f92b9b0df
Refactor: redundant type from composite literal ( #5604 )
2022-08-15 10:47:26 +08:00
Aoang
ba227e8939
Add Go 1.19 Support ( #5608 )
2022-08-15 10:46:57 +08:00
enwawerueli
573b9fa536
fix: correct grammar
2022-08-15 10:28:36 +08:00
Bruce MacKenzie
a35883590b
update Delete Godoc to describe soft delete behaviour ( #5554 )
2022-08-11 11:38:04 +08:00
Cr
f223279384
chore: fix gorm tag ( #5577 )
2022-08-10 11:03:42 +08:00
hjwblog.com
6e03b97e26
fix: empty serilizer err #5524 ( #5525 )
...
* fix: empty serilizer err #5524
* feat: fix UnixSecondSerializer return nil
* feat: split type case
Co-authored-by: huanjiawei <huanjiawei@bytedance.com>
2022-07-27 13:59:47 +08:00
MJrocker
3c6eb14c92
Fixed some typos in the code comment
2022-07-27 10:22:49 +08:00
Cr
06e174e24d
fix: embedded default value ( #5540 )
2022-07-25 14:10:30 +08:00
Xudong Zhang
bab3cd1724
fix bad logging performance of bulk create ( #5520 ) ( #5521 )
2022-07-18 20:47:00 +08:00
Jinzhu
75720099b5
Create a new db in FindInBatches
2022-07-18 18:07:05 +08:00
Goxiaoy
2ba599e8b7
fix empty QueryClauses in association ( #5502 ) ( #5503 )
...
* fix empty QueryClauses in association (#5502 )
* test: empty QueryClauses in association (#5502 )
* style: empty QueryClauses in association (#5502 )
* style: empty QueryClauses in association (#5502 )
2022-07-15 11:15:18 +08:00
alingse
099813bf11
Adjust ToStringKey use unpack params, fix pass []any as any in variadic function ( #5500 )
...
* fix pass []any as any in variadic function
* add .vscode to gitignore
2022-07-14 20:05:22 +08:00
Jinzhu
4d40e34734
Update select tests
2022-07-14 14:55:54 +08:00
Jinzhu
3262daf8d4
Fix select with association column
2022-07-13 18:26:35 +08:00
Jinzhu
cae30e9a50
Fix select with association column
2022-07-13 18:02:11 +08:00
Jinzhu
a7063848ef
Fix select with uppercase column name
2022-07-13 17:44:14 +08:00
Jinzhu
08f6d06e47
Fix select with quoted column name
2022-07-13 17:21:19 +08:00
Jinzhu
62fdc2bb3b
Fix serializer with empty string
2022-07-11 11:51:05 +08:00
Jinzhu
b13d1757fa
Refactor Model with slice data
2022-07-07 15:39:29 +08:00
Jinzhu
9fd73ae4f1
Revert "use callback to handle transaction"
...
This reverts commit 93f28bc116
.
2022-07-07 15:06:48 +08:00
Jinzhu
fe01e1b9f4
Fix Model with slice data
2022-07-07 14:43:33 +08:00
Cr
46bce170ca
test: pg array type ( #5480 )
2022-07-04 16:42:27 +08:00
Jason Lee
5c4016d9a3
Merge pull request #5455 from longbridgeapp/feat-support-transaction-calllback
2022-07-01 23:34:26 +08:00
Cr
c74bc57add
fix: association many2many duplicate elem ( #5473 )
...
* fix: association many2many duplicate elem
* chore: gofumpt style
2022-07-01 15:12:15 +08:00
Joe
2cb4088456
ignore AddError return error
2022-07-01 14:37:38 +08:00
Cr
235c093bb9
fix(MigrateColumn):declared different type without length ( #5465 )
2022-06-29 10:07:42 +08:00
wws
3e6ab99043
fix:serializer contain field panic ( #5461 )
2022-06-25 16:32:47 +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
Jinzhu
a70af2a4c0
Fix Select with digits in column name
2022-06-20 15:35:40 +08:00
qqxhb
1305f637f8
feat: add method GetIndexes ( #5436 )
...
* feat: add method GetIndexes
* feat: add default impl for Index interface
* feat: fmt
2022-06-17 11:00:57 +08:00
Cr
8d45714628
fix: reset null value in slice ( #5417 )
...
* fix: reset null value in slice
* fix: can not set field in-place in join
2022-06-14 13:48:50 +08:00
Bexanderthebex
d01de7232b
enhancement: Avoid calling reflect.New() when passing in slice of values to `Scan()` ( #5388 )
...
* fix: reduce allocations when slice of values
* chore[test]: Add benchmark for scan
* chore[test]: add bench for scan slice
* chore[test]: add bench for slice pointer and improve tests
* chore[test]: make sure database is empty when doing slice tests
* fix[test]: correct sql delete statement
* enhancement: skip new if rows affected = 0
2022-06-01 11:50:57 +08:00
dependabot[bot]
f4e9904b02
chore(deps): bump gorm.io/driver/mysql from 1.3.3 to 1.3.4 in /tests ( #5385 )
...
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql ) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/go-gorm/mysql/releases )
- [Commits](https://github.com/go-gorm/mysql/compare/v1.3.3...v1.3.4 )
---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 10:26:09 +08:00
Cr
93986de8e4
fix: migrate column default value ( #5359 )
...
Co-authored-by: Jinzhu <wosmvp@gmail.com>
2022-05-28 23:09:13 +08:00
t-inagaki@hum_op
dc1ae394f3
fixed FirstOrCreate not handled error when table is not exists ( #5367 )
...
* fixed FirstOrCreate not handled error when table is not exists
* delete useless part
2022-05-28 22:18:43 +08:00
Cr
7e13b03bd4
fix: duplicate column scan ( #5369 )
...
* fix: duplicate column scan
* fix: dup filed in inconsistent schema and database
* chore[ci skip]: gofumpt style
* chore[ci skip]: fix typo
2022-05-28 22:18:07 +08:00