Releases: rkrx/php-mysql-query-builder
Releases · rkrx/php-mysql-query-builder
Added RunnableSelect::fetchObjects, ...::fetchObjectsLazy, ...::fetchObject
- Added
RunnableSelect::fetchObjects,RunnableSelect::fetchObjectsLazy,RunnableSelect::fetchObject
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 returnsNULLwill not cause a row to be omitted anymore; Row-by-reference is now possible; If aDBIgnoreRowis returned in a closure, the corresponding Row will be omitted now - Changed the behavior of
RunnableSelect::fetchRows: If a$callback-Closure returnsNULLwill not cause a row to be omitted anymore; Row-by-reference is now possible; If aDBIgnoreRowis returned in a closure, the corresponding Row will be omitted now - Added parameter
$callbacktoRunnableSelect::fetchRow
0.1.41.1
Various changes
- Renamed
OptionalDBFilterMaptoDBExprFilter - Added new
OptionalDBFilterMap - Added new
RequiredDBFilterMapthat throws aKir\MySQL\Builder\Exception\RequiredValueNotFoundExceptionif 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-KeysetPreserveTypes will not retain NULL-Values
- If a
SELECT-Statement was invoked with "preserve types" (select->setPreserveTypes) set to true, thanINTandDECIMAL-Values will retainNULL-Values
Allow true nested transactions via SAVEPOINTs
- Allow true nested transactions via SAVEPOINTs