PHPackages                             adhuham/hydro - 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. adhuham/hydro

ActiveLibrary

adhuham/hydro
=============

Fast and lightweight Query Builder

064PHP

Since Aug 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/adhuham/hydro)[ Packagist](https://packagist.org/packages/adhuham/hydro)[ RSS](/packages/adhuham-hydro/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Hydro
=====

[](#hydro)

**PACKAGE IS NOT READY FOR PRODUCTION. WORK STILL IN PROGRESS**

---

**[Installation](https://github.com/adhuham/hydro/wiki/01.-Installation)** — **[Setup](https://github.com/adhuham/hydro/wiki/02.-Setup)** — **[Usage](https://github.com/adhuham/hydro/wiki/03.-Usage)** — **[Performance](https://github.com/adhuham/hydro/wiki/10.-Performance)** — **[Credits](https://github.com/adhuham/hydro/wiki/11.-Credits)**

---

Hydro is a fast and lightweight Query Builder. It is incredibly easy to use with its natural and intuitive syntax.

Hydro is designed with speed and memory efficiency in mind. As a result, it has extremely low footprint (consist of only just few classes) and is completely dependency-free, which takes up less of your memory.

The cost of speed and performance gain is kept minimal. With Hydro, you don't have to trade the ease-of-use for better performance.

Installation &amp; Setup
------------------------

[](#installation--setup)

Use Composer.

```
composer require adhuham/hydro

```

```
use Hydro\Hydro;

$pdo = PDOConnection(...);
$hydro = new Hydro($pdo);
```

Basic Usage
-----------

[](#basic-usage)

```
// multiple
$hydro->table('post')->select('id', 'title', 'content')->get();

// single
$hydro->table('post')->select('id', 'title', 'content')->one();

// where
$hydro->table('post')->select('id', 'title', 'content')->where('id', 1)->get();

// joins
$hydro->table('post')
  ->select('id', 'title', 'content')
  ->leftJoin('tag', 'post.tag_id', '=', 'tag.id')
  ->get();
```

### See [Documentation](https://github.com/adhuham/hydro/wiki)

[](#see-documentation)

TODO
----

[](#todo)

- Writing Tests
- Proper exception and error handling
- Completing the documentation

Performance
-----------

[](#performance)

Memory usage comparison between Eloquent, Laravel's Query Builder, Hydro and raw PDO. (Lower is better)

```
Eloquent
==============================================================================  7,542,904

Laravel Query Builder
=============== 1,455,720

Hydro
== 219,008

Hydro (using raw statements)
== 219,112

PDO
= 138,688

```

### See [Performance](https://github.com/adhuham/hydro/wiki/09.-Performance)

[](#see-performance)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32795085?v=4)[adhham](/maintainers/adhuham)[@adhuham](https://github.com/adhuham)

### Embed Badge

![Health badge](/badges/adhuham-hydro/health.svg)

```
[![Health](https://phpackages.com/badges/adhuham-hydro/health.svg)](https://phpackages.com/packages/adhuham-hydro)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
