Leo Sjöberg
7f75b12bb2
Generate unique savepoint names for nested transactions ( #7174 )
...
* Generate unique savepoint names
* Add a test for deeply nested wrapped transactions
2024-09-14 20:58:29 +08:00
abhijeet45
0daaf1747c
fix: AfterQuery using safer right trim while clearing from clause's join added as part of https://github.com/go-gorm/gorm/pull/7027 ( #7153 )
...
Co-authored-by: Abhijeet Bhowmik <abhijeet.bhowmik@cambiumnetworks.com>
2024-08-22 19:03:42 +08:00
ivila
0dbfda5d7e
fix memory leaks in PrepareStatementDB ( #7142 )
...
* fix memory leaks in PrepareStatementDB
* Fix CR:
1) Fix potential Segmentation Fault in Reset function
2) Setting db.Stmts to nil map when Close to avoid further using
* Add Test:
1) TestPreparedStmtConcurrentReset
2) TestPreparedStmtConcurrentClose
* Fix test, create new connection to keep away from other tests
---------
Co-authored-by: Zehui Chen <zehui@ssc-hn.com>
2024-08-22 19:02:05 +08:00
enomotodev
4a50b36f63
ci: Add PostgreSQL 14 and 15 to GitHub Actions matrix ( #7081 )
...
* ci: Add PostgreSQL 14 and 15 to GitHub Actions matrix
* ci: Remove older PostgreSQL versions from test matrix
2024-06-25 10:36:06 +08:00
molon
11c4331058
feat: add MapColumns method ( #6901 )
...
* add MapColumns method
* fix MapColumns desc
* add TestMapColumns
2024-06-24 17:42:59 +08:00
Jinzhu
8a0af58cc5
fix map fields with clickhouse driver
2024-06-20 20:19:31 +08:00
Jinzhu
4f6291154b
Allow to support other field types
2024-06-20 16:45:38 +08:00
Sérgio Prata Almeida
109f239fae
add DB level propagation for the Unscoped flag ( #7007 )
...
* adds PropagateUnscoped to db Config
* adds PropagateUnscoped test
* adds PropagateUnscoped to Session and sets it accordingly
2024-06-17 11:59:06 +08:00
Jinzhu
79bf7f92ed
fix CI for sqlserver
2024-06-17 11:58:13 +08:00
Jinzhu
3d09f7947f
only listen local port
2024-06-13 18:45:02 +08:00
Waleed Masoom
73a988ceb2
fix(scan): update Scan function to reset structs to zero values for each scan ( #7061 )
...
Co-authored-by: waleed.masoom <waleed.masoom@wheniwork.com>
2024-06-12 18:57:36 +08:00
Emilien
05167fd591
fix: use reflect.Append when preloading nested associations ( #7014 )
...
Co-authored-by: Emilien Kofman <emilien.kofman@miimosa.com>
2024-06-12 18:52:33 +08:00
Sergei Sadov
78c6dfd712
Fix association replace non-addressable panic ( #7012 )
...
* Fix association replace non-addressable panic
* Fix tests
* Add has one panic test
---------
Co-authored-by: sgsv <->
2024-06-12 18:49:45 +08:00
Nico Schäfer
3fe7fcf356
fix: `unsupported data` on nested joins with preloads ( #6957 )
...
* fix: `unsupported data` on nested joins with preloads
* Add test case for pointer join with nested prelaods
* Fix tests
2024-06-12 18:00:47 +08:00
贾一饼
9c4070ed19
fix: AfterQuery should clear FROM Clause's Joins rather than the Statement ( #7027 )
2024-06-12 17:51:44 +08:00
supergem3000
49d524aaea
feat: chainable order support clause.OrderBy ( #7054 )
...
* feat: chainable order support clause.OrderBy
* indent
2024-06-12 17:47:34 +08:00
Jinzhu
49d94c173c
upgrade github action tests template
2024-06-12 17:24:34 +08:00
Ryuji Kokubu
0f105ec163
fix: strings.Title -> cases.Title bcs strings.Title library is deprecated ( #6999 )
...
* add: add cases library
* fix: strings.Title -> cases.Title
* run goimports to solve the error
2024-06-12 11:46:59 +08:00
hakusai22
5e599a07ec
fix: typo ( #7003 )
...
* fix: typo
* fix: covered
2024-05-08 12:07:58 +08:00
Wenli Looi
9d370bcb3e
Fix handling of unknown column types ( #6540 )
2024-04-26 17:53:11 +08:00
PiexlMax(奇淼
78920199f0
Fix panic bug in migrator due to lack of nil check for stmt.Schema ( #6932 )
2024-04-26 15:15:49 +08:00
Anıl Şenay
ac59252327
Add new error for "Violation Check Constraint" ( #6992 )
2024-04-26 10:53:17 +08:00
Cr
207f1ac68f
fix: not clause with or condition ( #6984 )
2024-04-25 20:22:53 +08:00
Cr
85299bfca7
perf: merge nested preload query when using join ( #6990 )
...
* pref: merge nest preload query
* fix: preload test
2024-04-25 20:21:03 +08:00
Jinzhu
5553ff3dcb
downgrade mssql driver
2024-04-25 20:12:15 +08:00
kkocdko
bc49365de2
Faster utils.FileWithLineNum ( #6981 )
...
* faster FileWithLineNum
* tweak caller skip count
2024-04-22 14:43:02 +08:00
Ivan Chavez
d0b4ceb726
Added comment describing Unscoped() method ( #6969 )
2024-04-17 11:38:55 +08:00
yetone
9a61ef2af8
fix: duplicated preload ( #6948 )
2024-04-15 11:20:20 +08:00
Jinzhu
1e13fd7543
Fix duplicated columns in INSERT SQL for some fields with default value
2024-04-08 11:29:55 +08:00
hjwblog.com
1b48aa072d
feat: prepare_stmt support ping ( #6924 )
...
* feat: prepare_stmt support ping
* feat: prepare_stmt tx support ping
2024-03-28 16:47:39 +08:00
snackmgmg
26195e6d16
fix: remove `callback` from `callbacks` if `Remove()` called ( #6916 )
...
* fix: remove callback from callbacks if Remove() called
* reduce number of loops
* remove unnecessary blank line
2024-03-26 11:33:36 +08:00
givemeafish
956f7ce843
fix: 'type XXXX int' will print wrong sql to terminal ( #6917 )
...
Co-authored-by: 王泽平 <zeping.wang@yo-star.com>
2024-03-21 16:00:02 +08:00
Jinzhu
0d6c5345f3
Don't close prepared stmt for normal db error
2024-03-21 15:55:43 +08:00
Jinzhu
57603882ea
Only close bad conn prepared stmt
2024-03-20 19:47:20 +08:00
Jinzhu
81536f823c
Fix insert id into map results, fix #6812
2024-03-19 11:50:28 +08:00
Jinzhu
1b0aa802df
Fix AutoMigrate for bool fields with default value
2024-03-18 19:24:16 +08:00
Jinzhu
e0c3be03fb
Fix tests in local
2024-03-18 16:28:46 +08:00
jessetang
303de6e7c8
chore: optimize `regEnLetterAndMidline` regular ( #6908 )
...
* chore: optimize regular
* fix
2024-03-18 15:33:54 +08:00
Jinghao Lu
f7ebf049da
fix(create): fix insert column order ( #6855 )
...
* fix(create): fix insert column order
* chore: add ConvertToCreateValues ut for Slice case
* fix: remvoe testify dependency
---------
Co-authored-by: lujinghao <lujinghao@bytedance.com>
2024-03-18 13:48:42 +08:00
jessetang
ab89d54d87
chore: UnixNano convert to UnixMilli ( #6907 )
2024-03-18 13:44:55 +08:00
Jinzhu
281f3e369a
Fix constraint name regexp
2024-03-18 11:32:30 +08:00
jessetang
7b1fb0bd73
fix(scan): array element is set to a zero value ( #6890 )
...
* fix(scan): array element is set to a zero value
* add test
* fix test
* optimization
2024-03-15 14:14:48 +08:00
black-06
e4e23d26d2
fix: nested preload with join panic when find ( #6877 )
2024-03-09 21:27:19 +08:00
jessetang
c4c9aa45e3
fix(scan.go): reflect.MakeSlice passes in the reflect.Array type ( #6880 )
2024-03-09 17:39:01 +08:00
Cr
9efae659cb
test: namer identifier lenght ( #6872 )
2024-03-09 17:31:28 +08:00
hishope
f17a75242e
Signed-off-by: hishope <csqiye@126.com>
...
fix some typos in tests
Signed-off-by: hishope <csqiye@126.com>
2024-03-07 16:19:17 +08:00
tsuba3
3e2c4fc446
Fix regression in db.Not introduced in v1.25.6. ( #6844 )
...
* Fix regression in db.Not introduced in 940358e
.
* Fix
2024-03-05 10:23:51 +08:00
Chef
f118e55db5
Add unittest test helper function ConvertSliceOfMapToValuesForCreate ( #6854 )
2024-03-05 10:22:57 +08:00
Chef
52404cddbb
CHORE add unittest test function ConvertMapToValueForCreate ( #6846 )
...
* CHORE add unittest test function ConvertMapToValueForCreate
* CHORE move the test cases located in the files convert_map_test.go and visit_map_test.go into the file helper_test.go.
2024-02-27 10:48:04 +08:00
M Dmitry
d81ae6f701
Fixed: panic on nullable value with multiple foreign key usage ( #6839 )
...
See: https://github.com/go-gorm/playground/pull/537
2024-02-19 11:42:25 +08:00