jesse.tang
be440e7512
fix possible nil panic in tests ( #5720 )
...
* fix maybe nil panic
* reset code
2022-09-30 11:14:34 +08:00
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
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
Cr
5ed7b1a65e
fix: same embedded filed name ( #5705 )
2022-09-22 11:25:03 +08:00
Jiepeng Cao
b3eb1c8c51
simplified regexp ( #5677 )
2022-09-05 15:39:19 +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
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
Cr
06e174e24d
fix: embedded default value ( #5540 )
2022-07-25 14:10:30 +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
Jinzhu
4d40e34734
Update select tests
2022-07-14 14:55:54 +08:00
Jinzhu
62fdc2bb3b
Fix serializer with empty string
2022-07-11 11:51:05 +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
Cr
c74bc57add
fix: association many2many duplicate elem ( #5473 )
...
* fix: association many2many duplicate elem
* chore: gofumpt style
2022-07-01 15:12:15 +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
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
Cr
7d1a92d60e
test: test for skip prepared when auto migrate ( #5350 )
2022-05-22 16:12:28 +08:00
Cr
7496c3a56e
fix: trx in hooks clone stmt ( #5338 )
...
* fix: trx in hooks
* chore: format by gofumpt
2022-05-17 14:13:41 +08:00
black-06
f5e77aab2f
fix: quote index when creating table ( #5331 )
2022-05-17 10:59:53 +08:00
Cr
373bcf7aca
fix: many2many auto migrate ( #5322 )
...
* fix: many2many auto migrate
* fix: uuid ossp
2022-05-09 10:07:18 +08:00
Cr
19b8d37ae8
fix: preload with skip hooks ( #5310 )
2022-05-04 18:57:53 +08:00
Cr
b0104943ed
fix: callbcak sort when using multiple plugin ( #5304 )
2022-04-30 09:57:16 +08:00
Heliner
d3488ae6bc
fix: add judge result of auto_migrate ( #5306 )
...
Co-authored-by: fredhan <fredhan@futunn.com>
2022-04-30 09:50:53 +08:00
Cr
bd7e42ec65
fix: AutoMigrate with special table name ( #5301 )
...
* fix: AutoMigrate with special table name
* test: migrate with special table name
2022-04-27 21:13:48 +08:00
Jinzhu
6a6dfdae72
Refactor FirstOrCreate, FirstOrInit
2022-04-26 17:16:48 +08:00
Cr
a0cc631272
test: test for postgrs serial column ( #5234 )
...
* test: test for postgrs sercial column
* test: only for postgres
* chore: spelling mistake
* test: for drop sequence
2022-04-24 12:13:27 +08:00
Cr
9b80fe9e96
fix: stmt.Changed zero value filed behavior ( #5281 )
...
* fix: stmt.Changed zero value filed behavior
* chore: rename var
2022-04-24 09:08:52 +08:00
Jinzhu
88c26b62ee
Support Scopes in group conditions
2022-04-20 17:21:38 +08:00
Cr
b49ae84780
fix: FindInBatches with offset limit ( #5255 )
...
* fix: FindInBatches with offset limit
* fix: break first
* fix: FindInBatches Limit zero
2022-04-17 09:58:33 +08:00
Jinzhu
d421c67ef5
Remove ErrRecordNotFound error from log when using Save
2022-04-14 10:51:39 +08:00
Cr
a65912c588
fix: FirstOrCreate RowsAffected ( #5250 )
2022-04-13 15:52:07 +08:00
Filippo Del Moro
6aa6d37fc4
Fix scanIntoStruct ( #5241 )
...
* Reproduces error case
* Fix scanIntoStruct
Co-authored-by: Filippo Del Moro <filippo.delmoro@facile.it>
2022-04-13 15:47:04 +08:00
Jinzhu
74e07b049c
Serializer unixtime support ptr of int
2022-04-11 22:07:56 +08:00
Jinzhu
41bef26f13
Remove shared sync pool for Scanner compatibility
2022-04-11 21:37:44 +08:00
Hasan
81c4024232
Offset issue resolved for scanning results back into struct ( #5227 )
2022-04-07 23:56:41 +08:00
Jinzhu
9144969c83
Allow to use tag to disable auto create/update time
2022-04-02 17:17:47 +08:00
Cr
3d7019a7c2
fix: throw err if association model miss primary key ( #5187 )
2022-03-24 09:34:06 +08:00
Jin
9a4d10be64
style: fix coding typo ( #5184 )
2022-03-24 09:31:58 +08:00
Jinzhu
f92e6747cb
Handle field set value error
2022-03-23 17:24:25 +08:00
Jinzhu
0097b39a77
Should ignore error when parsing default value for time, close #5176
2022-03-20 08:55:08 +08:00