Refactoring query builder, bug fixes.
Pre-release
Pre-release
- Added
querySql()
method which returns raw SQL generated by query builder - Refactored much of the query building in
LivewireModelTable
- Separated the “join” logic out of the sorting method. Related tables are joined / eager loaded via the
joinRelated()
method- As a result
sortByRelatedField()
is now only responsible for theorderBy
portion - Added
generateQueryFields()
which prepares the $fields array for join / search statements.
- As a result
- Only fields specified in
$fields
are selected with the query - Removed
whereLike
macro for search, instead loop over supplied searchable fields and buildwhere
andorWhere
queries- [Bug fix]:
whereLike
macro was failing when sort was on related column and search was performed. Now resolved.
- [Bug fix]:
- Separated the “join” logic out of the sorting method. Related tables are joined / eager loaded via the