Skip to content

Releases: parable-php/query

Parable Query 1.0.1

12 Mar 14:35
Compare
Choose a tag to compare

Changes

  • Small static analysis fix.

Parable Query 1.0.0

12 Mar 08:44
Compare
Choose a tag to compare

It's time! Finally a 1.0.0 release, locking the interface in place for at least a while.

Changes

  • Namespace Translator has been renamed to Translators for consistency.
  • Namespace Condition has been renamed to Conditions for consistency.

Parable Query 0.5.0

11 Mar 13:42
ed98053
Compare
Choose a tag to compare
Parable Query 0.5.0 Pre-release
Pre-release

0.5.0

  • Added static analysis through psalm.
  • Renamed Exception to QueryException for clarity.
  • General php8 code style upgrades.

Parable Query 0.4.0

20 Jan 19:37
Compare
Choose a tag to compare
Parable Query 0.4.0 Pre-release
Pre-release

0.4.0

Changes

  • Dropped support for php7, php8 only from now on.

Parable Query 0.3.3

26 May 19:05
Compare
Choose a tag to compare
Parable Query 0.3.3 Pre-release
Pre-release

0.3.2 & 0.3.3

  • Removed unnecessary check whether an update query had an alias.
  • Fixed bug where values that implemented __toString() were not correctly identified as such, and would remain unquoted.
  • Fixed test assert value to be more specific.

Parable Query 0.3.1

10 Mar 09:40
Compare
Choose a tag to compare
Parable Query 0.3.1 Pre-release
Pre-release

0.3.1

Bugfixes

  • buildInsertValues() used the wrong glue to implode value sets.

Parable Query 0.3.0

10 Mar 09:26
Compare
Choose a tag to compare
Parable Query 0.3.0 Pre-release
Pre-release

0.3.0

Changes

  • The SupportsForceIndexTrait trait Query::forceIndex(string $key) and Query::getForceIndex(): ?string have been added, allowing you to force a specific index. Use PRIMARY_KEY_INDEX_VALUE in place of the actual primary key to force the primary key as an index.
  • Query::delete() and Query::update() no longer accept aliases since they caused issues.
  • AbstractCondition::VALUE_TYPE_VALUE and AbstractCondition::VALUE_TYPE_KEY have been removed.
  • Query::ORDER_ASC and Query::ORDER_DESC have been removed.
  • Query::VALID_TYPES has been removed, as it was unused.
  • All string values of AND and OR have been replaced with AbstractCondition::TYPE_AND and AbstractCondition::TYPE_OR.
  • ORDER_ASC and ORDER_DESC have been changed from int values to their corresponding string values ASC and DESC.
  • OrderBy::getDirectionAsString() has turned into OrderBy::getDirection().
  • The BuilderTest now also attempts to run the queries. Adding this step made some issues clear, which are now all fixed.

Parable Query 0.2.1

04 May 11:32
Compare
Choose a tag to compare
Parable Query 0.2.1 Pre-release
Pre-release

0.2.1

Changes

  • hasValueSets() was removed but proves useful enough to put back in.
  • Order renamed to OrderBy, can no longer be created without keys being passed.

Parable Query 0.2.0

04 May 11:14
Compare
Choose a tag to compare
Parable Query 0.2.0 Pre-release
Pre-release

0.2.0

Changes

  • Query::orderBy() now takes an Order object, rather than string values. Example: ->orderBy(Order::asc('id', 'username')), which will parse to ORDER BY id ASC, username ASC. Use ::desc for descending. You can call it multiple times, so you can do one key ASC, one key DESC, and then another ASC if 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 TranslatorInterface and all methods on AbstractTranslator have been made protected. This makes it easier to see what functionality is necessary to expose to the outside.

  • Query has gained some quality of life methods: hasWhereConditions(): bool, hasGroupBy(): bool, hasOrderBy(): bool and countValueSets(): 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.

Parable Query 0.1.4

17 Apr 07:16
Compare
Choose a tag to compare
Parable Query 0.1.4 Pre-release
Pre-release

0.1.4

Bugfixes

  • Make sure we never try to quote() a non-string value by string-casting before we hand it over to PDO.