Releases: rkrx/php-mysql-query-builder
Releases · rkrx/php-mysql-query-builder
Fixed an issue with references caused a row to be duplicated in some cases
- Fixed an issue with references caused a row to be duplicated in some cases
0.1.42
- Allowing OFFSET without LIMIT. When a OFFSET is set without a LIMIT being given, the LIMIT is set to the highest possible Number according to https://dev.mysql.com/doc/refman/5.5/en/select.html
Polyfill for the fetchRowsLazy yield/iterator
- Polyfill for the fetchRowsLazy yield/iterator
Changed the behavior of `RunnableSelect::fetchRowsLazy`, `RunnableSelect::fetchRows`, added parameter `$callback` to `RunnableSelect::fetchRow`
Pre-release
- Changed the behavior of
RunnableSelect::fetchRowsLazy
: If a$callback
-Closure returnsNULL
will not cause a row to be omitted anymore; Row-by-reference is now possible; If aDBIgnoreRow
is returned in a closure, the corresponding Row will be omitted now - Changed the behavior of
RunnableSelect::fetchRows
: If a$callback
-Closure returnsNULL
will not cause a row to be omitted anymore; Row-by-reference is now possible; If aDBIgnoreRow
is returned in a closure, the corresponding Row will be omitted now - Added parameter
$callback
toRunnableSelect::fetchRow
0.1.41.1
Various changes
- Renamed
OptionalDBFilterMap
toDBExprFilter
- Added new
OptionalDBFilterMap
- Added new
RequiredDBFilterMap
that throws aKir\MySQL\Builder\Exception\RequiredValueNotFoundException
if a value is not present - Added an example that shows an example of a simple repository
- Some fixed reported by scrutinizer
0.1.40.2
- Added
OptionalDBFilterMap
$filter = [
'name' => 'Peter',
'date' => [
'start' => '2016-05-01',
'end' => '2016-05-31',
],
];
$query = $db
->from('t', 'test')
->where(new OptionalDBFilterMap('t.name=?', $filter, 'name'))
->where(new OptionalDBFilterMap('t.date >= ?', $filter, 'date.start')) // Key in dot-notation
->where(new OptionalDBFilterMap('t.date <= ?', $filter, ['date', 'end'])) // Array-Key
setPreserveTypes will not retain NULL-Values
- If a
SELECT
-Statement was invoked with "preserve types" (select->setPreserveTypes
) set to true, thanINT
andDECIMAL
-Values will retainNULL
-Values
Allow true nested transactions via SAVEPOINTs
- Allow true nested transactions via SAVEPOINTs
Added Exception when attempting to execute a dry-run in a already opened transaction
Pre-release
- Added Exception when attempting to execute a dry-run in a already opened transaction, since it's not possible to nest transactions.