PHPackages                             rds/hydrogen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. rds/hydrogen

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

rds/hydrogen
============

More faster and convenient Doctrine ORM abstraction layer

0.3.5(6y ago)832022MITPHPPHP &gt;=7.1

Since Sep 3Pushed 6y ago7 watchersCompare

[ Source](https://github.com/rambler-digital-solutions/hydrogen)[ Packagist](https://packagist.org/packages/rds/hydrogen)[ RSS](/packages/rds-hydrogen/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

 [![Hydrogen](./resources/logo.png)](./resources/logo.png)

 [![Travis CI](https://camo.githubusercontent.com/c5ca206b85138e0638a4882e5aa60179e11a60cc4a1cac2d27c928c3d419244d/68747470733a2f2f7472617669732d63692e6f72672f72616d626c65722d6469676974616c2d736f6c7574696f6e732f687964726f67656e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rambler-digital-solutions/hydrogen) [![Code coverage](https://camo.githubusercontent.com/d77d07f2aa7b4aedbdca485290261ec9c9b0da9190004fcade636859517d89aa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72616d626c65722d6469676974616c2d736f6c7574696f6e732f687964726f67656e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rambler-digital-solutions/hydrogen/?branch=master) [![Scrutinizer CI](https://camo.githubusercontent.com/f9e62d37ee8f8a60fc53b34e25cc46767df7f4a9ca538384fde3ff27cdf7e23d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72616d626c65722d6469676974616c2d736f6c7574696f6e732f687964726f67656e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rambler-digital-solutions/hydrogen/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/bd8995971d8e8b4ba4c9e6c53b9735b2bc70d56c65e15f5d284a4ff7dfd9f3e9/68747470733a2f2f706f7365722e707567782e6f72672f7264732f687964726f67656e2f76657273696f6e)](https://packagist.org/packages/rds/hydrogen) [![Latest Unstable Version](https://camo.githubusercontent.com/0a231dda9890ce8f0d87bbfb93ae549b41c61dafd86da38db4006f452ce29ba3/68747470733a2f2f706f7365722e707567782e6f72672f7264732f687964726f67656e2f762f756e737461626c65)](https://packagist.org/packages/rds/hydrogen) [![License MIT](https://camo.githubusercontent.com/52b3b19e1f8647ad6a20f1bc4b85dd09d97508872057e99606e495b029576c4a/68747470733a2f2f706f7365722e707567782e6f72672f7264732f687964726f67656e2f6c6963656e7365)](https://raw.githubusercontent.com/rambler-digital-solutions/hydrogen/master/LICENSE.md)

- [Introduction](#introduction)
- [Installation](#installation)
    - [Server Requirements](#server-requirements)
    - [Installing Hydrogen](#installing-hydrogen)
- [Usage](#usage)
- [Retrieving Results](#retrieving-results)
    - [Retrieving All Entities](#retrieving-all-entities)
    - [Retrieving A Single Entity](#retrieving-a-single-entity)
    - [Retrieving A List Of Field Values](#retrieving-a-list-of-field-values)
    - [Aggregates And Scalar Results](#aggregates-and-scalar-results)
- [Selects](#selects)
    - [Additional fields](#additional-fields)
- [Where Clauses](#where-clauses)
    - [Simple Where Clauses](#simple-where-clauses)
    - [Or Statements](#or-statements)
    - [Additional Where Clauses](#additional-where-clauses)
    - [Parameter Grouping](#parameter-grouping)
- [Ordering](#ordering)
- [Grouping](#grouping)
- [Limit And Offset](#limit-and-offset)
- [Embeddables](#embeddables)
- [Relations](#relations)
    - [Joins](#joins)
    - [Joins Subqueries](#joins-subqueries)
    - [Nested Relationships](#nested-relationships)
- [Query Scopes](#query-scopes)
- [Collections](#collections)
    - [Higher Order Messaging](#higher-order-messaging)
    - [Destructuring](#destructuring)

Introduction
------------

[](#introduction)

Hydrogen provides a beautiful, convenient and simple implementation for working with Doctrine queries. It does not affect the existing code in any way and can be used even in pre-built production applications.

Installation
------------

[](#installation)

### Server Requirements

[](#server-requirements)

The Hydrogen library has several system requirements. You need to make sure that your server meets the following requirements:

- PHP &gt;= 7.1.3
- PDO PHP Extension
- Mbstring PHP Extension
- JSON PHP Extension
- [doctrine/orm &gt;= 2.5](https://packagist.org/packages/doctrine/orm)
- [illuminate/support &gt;= 5.5](https://packagist.org/packages/illuminate/support)

### Installing Hydrogen

[](#installing-hydrogen)

Hydrogen utilizes [Composer](https://getcomposer.org/) to manage its dependencies. So, before using Hydrogen, make sure you have Composer installed on your machine.

**Stable**

```
composer require rds/hydrogen
```

**Dev**

```
composer require rds/hydrogen dev-master@dev
```

Usage
-----

[](#usage)

Hydrogen interacts with the repositories of the Doctrine. In order to take advantage of additional features - you need to add the main trait to an existing implementation of the repository.

```
