628 Commits

Author SHA1 Message Date
Jinzhu
4db3fde9c5 Add default transaction timeout support 2025-05-23 18:06:34 +08:00
Jinzhu
4ee59e1d87 remove ExampleLRU test 2025-05-22 23:03:21 +08:00
Jinzhu
8ced5498df test reuse generics db conditions 2025-05-22 22:31:40 +08:00
Jinzhu
ddaee81548 Add WithResult support for generics API 2025-05-22 20:19:23 +08:00
Jinzhu
774d957089 test for nested generic version Join/Preload 2025-05-22 19:45:34 +08:00
Jinzhu
304baabb12 fix tests for mysql 5.7 2025-05-21 22:07:20 +08:00
Jinzhu
6307f69f18 Add LimitPerRecord for generic version Preload 2025-05-21 18:04:20 +08:00
Jinzhu
91eb9477f2
Merge branch 'master' into generics 2025-05-20 23:03:35 +08:00
Jinzhu
9b1ce2b763 fix tests 2025-05-20 23:02:40 +08:00
Jinzhu
e330694e26 handle error of generics Joins/Preload 2025-05-20 22:54:07 +08:00
Jinzhu
4694673526 finish generic version Preload 2025-05-20 22:46:24 +08:00
Jinzhu
ba94e4eb2f allow configuring select/omit columns for joins via subqueries 2025-05-20 20:02:04 +08:00
Jinzhu
d073805c86 improve generics version Joins support 2025-05-20 19:44:57 +08:00
Jinzhu
05925b2fc0 Complete the design and implementation of generic version Join 2025-05-09 17:16:10 +08:00
Jinzhu
e5b867e785 remove unnecessary session-level configuration for prepared statements 2025-05-07 14:56:49 +08:00
Zhaodong Xie
a827495be1
Preparestmt use LRU Map instead default map (#7435)
* 支持lru淘汰preparestmt cache

* 支持lru淘汰preparestmt cache

* 支持lru淘汰preparestmt cache

* 只使用lru

* 只使用lru

* 只使用lru

* 只使用lru

* 只使用lru

* 只使用lru

* 只使用lru

* 只使用lru

* 只使用lru

* change const export

* Add stmt_store

* refact prepare stmt store

* Rename lru store

* change const export

* ADD UT

* format code and add session level prepare stmt config

* code format according to golinter ci

* ADD UT

---------

Co-authored-by: xiezhaodong <xiezhaodong@bytedance.com>
Co-authored-by: Jinzhu <wosmvp@gmail.com>
2025-04-25 16:22:26 +08:00
Jinzhu
4fcd909f2e Add clause.JoinTable helper method 2025-04-20 20:08:07 +08:00
Jinzhu
797a557cc8 Support SubQuery for Generics 2025-04-20 10:47:00 +08:00
Jinzhu
3de6d0b2f9 fix generics tests for mysql 2025-04-18 20:28:21 +08:00
Jinzhu
2d6d7f9485 use delayed‑ops pipeline for generics API 2025-04-18 18:18:56 +08:00
Jinzhu
ba27874dcd Add more tests and Take method 2025-04-17 22:15:10 +08:00
Jinzhu
0fbe4f6dc4 Add more generics tests 2025-04-17 20:16:51 +08:00
Jinzhu
f3ff534c54 Implement Generics API 2025-04-17 09:44:59 +08:00
a631807682
a9d27293de test: mssql ci 2025-03-11 15:56:46 +08:00
Jinzhu
6bfccf8afa Refactor all tests script 2024-11-21 17:03:31 +08:00
홍성욱
b0d70a26d1
[#6372] Fixed nullable constraint bug for columns during auto migration (#7269)
* [#6372] Fixed nullable constraint bug for columns during auto migration

* [#6372] fix comment

* [#6372] Add test code

* [#6372] Add test code

* [#6372] Fix failed test case

* [#6372] Fix failed test case

* [#6372] wip

* [#6372] wip

* [#6372] wip

* [#6372] wip
2024-11-14 17:40:18 +08:00
Omkar P
c6ac54812a
Use official SQL Server docker image for tests (#7205)
* Use official SQL Server docker image for tests

* Try with tag 2019-latest instead of latest

* Use platform ubuntu-20.04 for SQL Server

* Switch to 2019-CU18-ubuntu-20.04

* Check with 2022-latest image tag and ubuntu-latest platform

* Update health-cmd

* Try sqlcmd without -N -C

* Re-include -N -C, try with ubuntu-20.04

* Try ubuntu-20.04 without -N -C (last trial)

* Finalize working config

* Remove unused env variables
2024-09-30 11:21:19 +08:00
Jinzhu
68434b76eb fix test script with latest docker release 2024-09-18 20:03:35 +08:00
Kazuki Isogai
c2515ce260
feat: remove version top-level element and rename. (#7086) 2024-09-18 19:42:52 +08:00
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
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
molon
11c4331058
feat: add MapColumns method (#6901)
* add MapColumns method

* fix MapColumns desc

* add TestMapColumns
2024-06-24 17:42:59 +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
Jinzhu
49d94c173c upgrade github action tests template 2024-06-12 17:24:34 +08:00
hakusai22
5e599a07ec
fix: typo (#7003)
* fix: typo

* fix: covered
2024-05-08 12:07:58 +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
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
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
Jinzhu
0d6c5345f3 Don't close prepared stmt for normal db error 2024-03-21 15:55:43 +08:00
Jinzhu
81536f823c Fix insert id into map results, fix #6812 2024-03-19 11:50:28 +08:00