Skip to content

Releases: ClanCats/Hydrahon

Hydrahon v1.1.4

19 Aug 14:03
Compare
Choose a tag to compare

This patch fixes the issue where the query builders orderBy method ignores raw expressions.

$cars->orderBy(new Expression('brand <> bmw', 'desc');

Hydrahon v1.1.3

15 Jun 09:44
Compare
Choose a tag to compare

Features

Limit, Offset and Where Reset

There are now resetter methods available for limit, offset and where statements.

// reset the limit to null
$query->resetLimit();

// reset the offset to null
$query->resetOffset();

// reset the where conditions
$query->resetWheres();

Changes

Result Grouping Bug

This quick release also fixes a bug where an exception is thrown when hydrahon tries to group an empty result.

Hydrahon v1.1.2

09 Jun 11:45
Compare
Choose a tag to compare

Features

Added result grouping

The method groupResults has been added allowing the direct grouping of associated array results.

$people
    ->select()
    ->groupResults('age')
    ->get();

Will transform:

[
    {"name": "John", "age": 18},
    {"name": "Jeff", "age": 32},
    {"name": "Jenny", "age": 18}
]

Into:

{
    "18": [
        {"name": "John", "age": 18},
        {"name": "Jenny", "age": 18}
    ],
    "32": [
        {"name": "Jeff", "age": 32}
    ]
}

Key forwarding

Will use an items value as array key.

$people
    ->select()
    ->forwardKey('name')
    ->get();

Will transform:

[
    {"name": "John", "age": 18},
    {"name": "Johnna", "age": 22}
]

Into:

{
    "John": {"name": "John", "age": 18},
    "Johnna": {"name": "Johnna", "age": 22}
}

Changes

Execute select query

The execute a select query we were using the run method which comes from CCF. I changed it to get, inspired from laravels eloquent. I just feels much better.

So:

$persons->select()->run(); 

Becomes:

$persons->select()->get(); 

v1.1.1 Table alias in delete fix.

03 Jun 14:57
Compare
Choose a tag to compare
Merge branch 'developer'

Hydrahon v1.1.0

03 Jun 14:41
Compare
Choose a tag to compare

These release brings some heavy changes on the Hydrahon query structure to allow other query builder like arango to be implemented.

New features are:

  • Subqueries in select from.
  • Nested join conditions.

Hydrahon v1.0

19 Jul 20:04
Compare
Choose a tag to compare
Readme update