Releases: ClanCats/Hydrahon
Hydrahon v1.1.4
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
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
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.
Merge branch 'developer'
Hydrahon v1.1.0
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
Readme update