Skip to content

Refactoring query builder, bug fixes.

Pre-release
Pre-release
Compare
Choose a tag to compare
@coryrose1 coryrose1 released this 19 Nov 15:25
· 3 commits to master since this 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 the orderBy portion
      • Added generateQueryFields() which prepares the $fields array for join / search statements.
    • Only fields specified in $fields are selected with the query
    • Removed whereLike macro for search, instead loop over supplied searchable fields and build where and orWhere queries
      • [Bug fix]: whereLike macro was failing when sort was on related column and search was performed. Now resolved.