Parable Query 0.2.0
Pre-release0.2.0
Changes
-
Query::orderBy()now takes anOrderobject, rather than string values. Example:->orderBy(Order::asc('id', 'username')), which will parse toORDER BY id ASC, username ASC. Use::descfor descending. You can call it multiple times, so you can do one keyASC, one keyDESC, and then anotherASCif you want.NOTE: Adding a key more than once is possible, but not if they are of different directions.
-
Most places where single-type values were being passed into a method as an array, it now expects the values to be passed as multiple parameters. These methods expect multiple parameters rather than an array:
Order::asc(...$keys)Order::desc(...$keys)Query::setColumns(...$columns)Query::groupBy(...$keys)
-
Translators are now type-hinted as
TranslatorInterfaceand all methods onAbstractTranslatorhave been made protected. This makes it easier to see what functionality is necessary to expose to the outside. -
Queryhas gained some quality of life methods:hasWhereConditions(): bool,hasGroupBy(): bool,hasOrderBy(): boolandcountValueSets(): int. -
Query::createCleanClone()has been added, which will return a copy of the query you called it on, with no further configuration whatsoever being retained.