Commit Graph

55 Commits

Author SHA1 Message Date
Cr 342310fba4
fix(FindInBatches): throw err if pk not exists (#5868) 2022-11-21 10:49:27 +08:00
Cr 101a7c789f
fix: scan array (#5624)
Co-authored-by: Jinzhu <wosmvp@gmail.com>
2022-09-22 15:51:47 +08:00
Jinzhu 75720099b5 Create a new db in FindInBatches 2022-07-18 18:07:05 +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
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
Cr d402765f69
test: fix utils.AssertEqual (#5172) 2022-03-18 20:11:23 +08:00
chenrui 397b583b8e fix: query scanner in single column 2022-02-25 22:38:48 +08:00
Jinzhu 416c4d0653 Test query with Or and soft delete 2022-02-08 16:31:24 +08:00
kinggo b47cf57f5e
ci: add gofumpt check in reviewdog (#4973) 2022-01-06 15:02:53 +08:00
Sec Cake 093694fbf2
Fix extra 'AND' when len(values) == 0 ON IN.NegationBuild() (#4618) 2021-08-20 18:06:48 +08:00
Walter Scheper a870486c4f
Do not emit ORDER BY for empty values (#4592)
This restores the behavior from gorm v1, where calling `DB.Order` with
an empty string, nil, or any unexpected type is a no-op.
2021-08-09 13:14:23 +08:00
Jinzhu 26e0c6fb69 skip test sqlserver due to it will raise data race for invalid sql 2021-03-24 17:12:30 +08:00
Genta Kamitani 26dd4c980a
Fix: FindInBatches ignores errors (#4203) 2021-03-22 14:11:07 +08:00
Ratan Phayade a3abb5fedf
support named params in Select API (#4142)
* adds support for named arguments in select

* changes clause identifies and adds test
2021-03-07 10:59:00 +08:00
Jinzhu 84ea3ec0cc Fix sub query argument order with multiple raw SQL 2021-02-09 19:56:45 +08:00
Jinzhu df24821896 Fix SubQuery for raw sql 2021-02-09 17:05:50 +08:00
Jinzhu 35ebfe6874 Support group conditions with single OR condition 2021-01-20 18:24:05 +08:00
Jinzhu 1b8cb07cf2 Allow Where select fields when searching with struct 2020-12-30 18:13:52 +08:00
Jinzhu ade0bd6d60 Fix SELECT with sql expression in some cases, close #3889 2020-12-28 10:40:30 +08:00
Jinzhu 1ef1f0bfe4 Fix Count with complicated Select, close #3826 2020-12-06 14:30:42 +08:00
Luis Guillermo Gómez 47ffd0bef4
Select all fields in SQL queries avoiding the SELECT * FROM (#3731)
* Select all fields in SQL queries avoiding the SELECT * FROM

* Select table name with fields in SQL queries

* Use QueryFields to execute the SQL query with all fields of the table
2020-11-20 15:38:25 +08:00
Jinzhu f5c2126c29 Fix FindInBatches tests 2020-11-17 13:14:34 +08:00
Jinzhu 320f33061c Fix FindInBatches to modify the query conditions, close #3734 2020-11-17 11:19:04 +08:00
Jinzhu c915471169 Support Expression for OrderBy clause 2020-11-03 10:30:05 +08:00
Jinzhu 7faf1ca80f Fix Select with AS, close #3581, #3567 2020-10-09 11:52:12 +08:00
Jinzhu ba253982bf Fix Pluck with Time and Scanner 2020-09-24 20:08:24 +08:00
Jinzhu 5228735915 Don't build IN condition if value implemented Valuer interface, #3517 2020-09-24 15:00:13 +08:00
Jinzhu e583dfa196 Allow negative number for limit 2020-09-11 11:54:21 +08:00
Jinzhu b8a74a80d7 Fix embedded struct with default value, close #3451 2020-09-11 11:18:54 +08:00
Jinzhu 2242ac6c0e Fix tests & refactor for PR #3429 2020-09-09 10:31:48 +08:00
caelansar aceb3dad3b correct generated sql 2020-09-08 21:28:04 +08:00
Jinzhu 3cd81ff646 Fix query with specified table and conditions, close #3382 2020-09-03 18:42:32 +08:00
Jinzhu e73147fa8e Better support for scan into map, fix unfriendly data type for interface, close #3351 2020-09-01 17:45:14 +08:00
Jinzhu b5de8aeb42 Fix overrite SELECT clause 2020-08-18 18:58:53 +08:00
Jinzhu 2faff25dfb Fix FirstOr(Init/Create) when assigning with association 2020-08-13 18:38:39 +08:00
Jinzhu 2c4e857125 Should ignore association conditions when querying with struct 2020-08-13 18:09:04 +08:00
Jinzhu a0477f94dd Allow Omit with Query, close #3165 2020-07-19 21:48:58 +08:00
Jinzhu 58e3241544 Fix Select with specific symbol, close #3158 2020-07-17 11:06:20 +08:00
Jinzhu a8655f7947 Fix auto select with smaller struct for slices 2020-07-09 12:15:35 +08:00
Jinzhu 9a4941ba70 Test Order/GroupBy 2020-07-06 09:47:14 +08:00
Jinzhu 4e066c9590 Test Or 2020-07-05 12:23:45 +08:00
Jinzhu 1a2fabb34d Test Not 2020-07-05 11:56:12 +08:00
SmallTianTian 3c03b6e527
fix no limit no offset. (#3101)
* fix no limit no offset.

* add test for playground.
2020-07-02 18:14:33 +08:00
Jinzhu 9075b33620 Query with smaller struct 2020-07-01 08:56:21 +08:00
Jinzhu 45cb6b49bf Add FindInBatches support 2020-06-10 15:36:34 +08:00
Jinzhu d50879cc28 Add field permission test 2020-06-05 19:18:22 +08:00
Jinzhu 94685d1024 Fix can't scan null value into normal data types 2020-06-02 23:30:26 +08:00
Jinzhu 8bb05a5a69 Refactor tests files 2020-06-02 10:50:38 +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