mirror of
https://gitee.com/johng/gf
synced 2026-07-03 11:51:04 +08:00
5d1712b4abff2e77129e1f10184b9831f275b5dd
## Summary - Fixed a bug where `Raw()` with `Where()` and `Count()`/`ScanAndCount()` was ignoring the Where conditions in Count queries - The issue was in `getFormattedSqlAndArgs()` which returned `nil` for `conditionArgs` without calling `formatCondition()` for Raw SQL in `SelectTypeCount` case ## Changes - Modified `database/gdb/gdb_model_select.go` to call `formatCondition()` for Raw SQL Count queries - Added comprehensive test cases for MySQL and PostgreSQL drivers - Fixed incorrect test expectation in `Test_Model_Raw` ## Test plan - [x] Added `Test_Issue4500` with 6 edge cases covering: - Raw SQL with WHERE + external Where condition - Raw SQL without WHERE + external Where condition - Raw + Where + ScanAndCount - Raw + multiple Where conditions - Raw SQL with no external Where (baseline) - Verify All() still works correctly - [x] All tests pass on PostgreSQL Closes #4500
refract(gerror): add ITextArgs interface and its implements, mainly for i18n that needs text and args separately (#4597)
fix(contrib/drivers): resolve field duplication issue when same table/column names exist across different MySQL/MariaDB databases (#4577)
English | 简体中文
A powerful framework for faster, easier, and more efficient project development.
Installation
go get -u github.com/gogf/gf/v2
Documentation
- Official Site: https://goframe.org
- Official Site(en): https://goframe.org/en
- 国内镜像: https://goframe.org.cn
- Mirror Site: Github Pages
- Mirror Site: Offline Docs
- GoDoc API: https://pkg.go.dev/github.com/gogf/gf/v2
- Doc Source: https://github.com/gogf/gf-site
Contributors
💖 Thanks to all the contributors who made GoFrame possible 💖
License
GoFrame is licensed under the MIT License, 100% free and open-source, forever.
Languages
GO
100%
