You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(database): add query builder between conditions
Add whereBetween(), orWhereBetween(), whereNotBetween(), and
orWhereNotBetween() to Query Builder.
- Bind lower and upper range values through the existing bind system
- Protect identifiers at compile time for alias and prefix correctness
- Add Model method annotations, user guide docs, and changelog entry
- Cover normal, OR, NOT, grouped, unescaped, aliased, prefixed, and invalid input cases
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
* refactor(database): polish whereBetween helper internals
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
---------
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
$expectedSQL = 'SELECT * FROM "jobs" WHERE ( "created_at" BETWEEN \'2026-01-01\' AND \'2026-01-31\' OR "updated_at" NOT BETWEEN \'2026-02-01\' AND \'2026-02-28\' ) AND "active" = 1';
Copy file name to clipboardExpand all lines: user_guide_src/source/changelogs/v4.8.0.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,7 @@ Database
217
217
Query Builder
218
218
-------------
219
219
220
+
- Added ``whereBetween()``, ``orWhereBetween()``, ``whereNotBetween()``, and ``orWhereNotBetween()`` to Query Builder. See :ref:`query-builder-where-between`.
220
221
- Added ``whereColumn()`` and ``orWhereColumn()`` to compare one column to another column while protecting identifiers by default. See :ref:`query-builder-where-column`.
221
222
- Added ``whereExists()``, ``orWhereExists()``, ``whereNotExists()``, and ``orWhereNotExists()`` to add ``EXISTS`` and ``NOT EXISTS`` subquery conditions. See :ref:`query-builder-where-exists`.
222
223
- Added new ``incrementMany()`` and ``decrementMany()`` methods to ``CodeIgniter\Database\BaseBuilder`` for performing bulk increment/decrement operations.
0 commit comments