PHPackages                             levkopo/dbpp - 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. levkopo/dbpp

Abandoned → [ppeco/dbpp](/?search=ppeco%2Fdbpp)ArchivedLibrary[Database &amp; ORM](/categories/database)

levkopo/dbpp
============

The library makes working with database easier and simpler

0.1.1(5y ago)114MITPHPPHP &gt;=8.0

Since May 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/levkopo/dbpp)[ Packagist](https://packagist.org/packages/levkopo/dbpp)[ RSS](/packages/levkopo-dbpp/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

dbpp
====

[](#dbpp)

dbpp is a library that simplifies database queries by collecting them into one class.

**WARNING! Repository migrated to **
===================================================================

[](#warning-repository-migrated-to-httpsgithubcomppecodbpp)

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

[](#installation)

dbpp requires composer and php 8.0 or higher.

For installation run this command in composer:

```
composer require levkopo/dbpp

```

Usage
-----

[](#usage)

The main class for dbpp is Database. Create a class extended from Database from dbpp.

```
class SimpleDatabase extends Database {

}
```

Create a class that will contain all the queries for a specific table. The class should be extended from the Dao class from dbpp.

```
class TableDao extends Dao {

}
```

Create functions with query annotations from dbpp. They can be Query and Insert. Functions should call a function from parent (IDE may throw an error, but don't worry).

```
class TableDao extends Dao {
    #[Query("SELECT * FROM `table`")
    public function getAll(): array|false {
        parent::getAll();
    }

    #[Query("SELECT * FROM `table` WHERE `id` = :id")
    public function getById(int $id){
        parent::getAll($id);
    }

    #[Insert("table")
    public function insert(Value $value): bool{
        parent::insert($value);
    }
}
```

Link your Dao to Database via class properties.

```
class SimpleDatabase extends Database {
   public TableDao $table;
}
```

Well, the final steps. Create PDO object and call static method from DBPP: init

```
$pdo = new PDO(*data*);
$database = new SimpleDatabase();
DBPP::init($database, $pdo);
```

Now you can call methods from the Database class

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1841d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6473733ff076c742881f59f82ffcbc817ed25ec0bc40a72d49630498f1fec03b?d=identicon)[levkopo](/maintainers/levkopo)

---

Top Contributors

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

---

Tags

composerdatabaseormpdopdo-phpphp-pdophp8sql-injection

### Embed Badge

![Health badge](/badges/levkopo-dbpp/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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