PHPackages                             vstaran/query-builder - 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. vstaran/query-builder

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

vstaran/query-builder
=====================

00PHP

Since Nov 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vstaran/php-query-builder)[ Packagist](https://packagist.org/packages/vstaran/query-builder)[ RSS](/packages/vstaran-query-builder/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

QueryBuilder
------------

[](#querybuilder)

[![License](https://camo.githubusercontent.com/fe140c4d6dab1a6ceb27cee71f1e88b4b6981af60bb9069856ce09e8f59eb83b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f617363686d656c79756e2f6c6172616d6574726963732e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/fe140c4d6dab1a6ceb27cee71f1e88b4b6981af60bb9069856ce09e8f59eb83b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f617363686d656c79756e2f6c6172616d6574726963732e7376673f7374796c653d666c61742d737175617265)

Implement builder pattern, use PDO.

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

[](#installation)

You can install the package via composer:

```
composer require vstaran/query-builder

```

Basic usage
-----------

[](#basic-usage)

```
$builder = new QueryBuilder();
$query = $builder->table('users')
    ->select(['first_name', 'age'])
    ->where(['status' => 'active'])
    ->order(['id' => 'ASC'])
    ->limit(20)
    ->offset(40)
    ->build();
```

Road map
--------

[](#road-map)

- Add methods `JOIN`, `GROUPBY`, `HAVING` etc...
- Create `INSERT`, `UPDATE` and `DETELE` statement

Dependencies
------------

[](#dependencies)

- require packagist `aigletter/interfaces`

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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/5046771?v=4)[Victor](/maintainers/vstaran)[@vstaran](https://github.com/vstaran)

---

Top Contributors

[![vstaran](https://avatars.githubusercontent.com/u/5046771?v=4)](https://github.com/vstaran "vstaran (4 commits)")

### Embed Badge

![Health badge](/badges/vstaran-query-builder/health.svg)

```
[![Health](https://phpackages.com/badges/vstaran-query-builder/health.svg)](https://phpackages.com/packages/vstaran-query-builder)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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