Releases: micheleangioni/phalcon-repositories
Releases · micheleangioni/phalcon-repositories
v0.5.0
v0.4.3
Fixes:
- Fixed a notice in AbstractCollectionRepository
count()
andcountBy
methods when aggregation result is empty
v0.4.2
Fixes:
- Fixed sort ordering clause in AbstractCollectionRepository methods
v0.4.1
Improvements:
- The count() and countBy() methods of the AbstractCollectionRepository now use MongoDB aggregation queries and are then much more efficient
v0.4.0
New features:
- implemented
truncate()
method inAbstractRepository
Improvements:
- Added missing documentation for
getAggregate()
method forAbstractCollectionRepository
v0.3.1
Fixes and updates:
- Removed PHP 7.0 from Travis build
- The MongoFix trait is not anymore used
v0.3
New requirements:
- PHP 7.1+
- Phalcon 3.2+
- Phalcon Incubator 3.2+
New features and changes:
-
Added brand new
AbstractCollectionRepository
supporting MongoDB. Method list:all()
find($id)
findOrFail($id)
first()
firstOrFail()
firstBy(array $where = [])
firstOrFailBy(array $where = [])
getBy(array $where = [])
getByLimit(int $limit, array $where = [])
getByOrder(string $orderBy, array $where = [], string $order = 'desc', int $limit = 0)
getIn(string $whereInKey, array $whereIn = [], string $orderBy = null, string $order = 'desc', int $limit = 0)
getNotIn(string $whereNotInKey, array $whereNotIn = [], string $orderBy = null, string $order = 'desc', int $limit = 0)
getInAndWhereByPage(int $page = 1, int $limit = 10, string $whereInKey = null, array $whereIn = [], $where = [], $orderBy = null, string $order = 'desc')
getByPage(int $page = 1, int $limit = 10, array $where = [], string $orderBy = null, string $order = 'desc')
create(array $inputs = [])
updateById($id, array $inputs)
destroy($id)
destroyFirstBy(array $where)
count()
countBy(array $where = [])
v0.2.1
The create(), update() and delete() method calls in the AbstractRepository are not anymore inside a try/catch block.
v0.2
New requirements:
- PHP 7.0+
- Phalcon 3.0+
New features and changes:
-
Added new
getInAndWhereByPage()
method -
The
$where
array parameter now allows for more complex queries.
The following formats are now supported:'key' => 'value'
Examples:
$where = ['username' => 'Richard']
'key' => ['value', 'operator']
Examples:
$where = ['age' => [30, '=']] $where = ['age' => [30, '<']] $where = ['age' => [30, '>']] $where = ['username' => ['%Fey%', 'LIKE']]
['key1%OR%key2'] => ['value', 'operator']
Examples:
`$where = ['username%OR%description' => ['%Feynman%', 'LIKE']]`
-
Method parameters are now type hinted
v0.1
First package release.