PHPackages                             mrmadclown/mnemosyne - 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. mrmadclown/mnemosyne

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

mrmadclown/mnemosyne
====================

Mnemosyne a PDO Database Layer

v1.3(3y ago)019[5 PRs](https://github.com/MrMadClown/mnemosyne/pulls)MITPHPPHP ^8.1

Since Aug 27Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (13)Used By (0)

Mnemosyne - a PDO Database Layer
================================

[](#mnemosyne---a-pdo-database-layer)

[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Latest Stable Version](https://camo.githubusercontent.com/a3fa5eb45ae3f4b539f0f42886789401daf8ff1c17e0f4c8d8385f3fe29755e4/68747470733a2f2f706f7365722e707567782e6f72672f6d726d6164636c6f776e2f6d6e656d6f73796e652f762f737461626c652e737667)](https://packagist.org/packages/mrmadclown/mnemosyne)[![Total Downloads](https://camo.githubusercontent.com/da192a20d0bd4682b1a76280d0e9a5af5a77593de11d613ccfe59b1a3dbb6636/68747470733a2f2f706f7365722e707567782e6f72672f6d726d6164636c6f776e2f6d6e656d6f73796e652f646f776e6c6f616473)](https://packagist.org/packages/mrmadclown/mnemosyne)[![example workflow](https://github.com/mrmadclown/mnemosyne/actions/workflows/tests.yml/badge.svg?event=push)](https://github.com/mrmadclown/mnemosyne/actions/workflows/tests.yml/badge.svg?event=push)[![example workflow](https://github.com/mrmadclown/mnemosyne/actions/workflows/static%20code%20analysis.yml/badge.svg?event=push)](https://github.com/mrmadclown/mnemosyne/actions/workflows/static%20code%20analysis.yml/badge.svg?event=push)

This is a simple PDO based mysql Query Builder

### Installation

[](#installation)

```
composer require mrmadclown/mnemosyne
```

### Usage

[](#usage)

The Builder gets constructed by passing an instance of the `PDO::class` to the `\MrMadClown\Mnemosyne\Builder::class`

```
use \PDO;

$pdo = new \PDO();
$builder = new \MrMadClown\Mnemosyne\Builder($pdo);
```

With the Builder Object a mysql query can be build similar to how a query would be written:

```
...

$builder->select('*')->from('users')->where('id', 1);
```

### Important

[](#important)

By default, the PDO Fetch Mode is set to `PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE;` which means you have to have a class which represents your table

```
#User.php
class User {
    public int $id;
    public string $name;
}

$builder->setClassName(User::class)->fetchAll(); // returns an array of Users
```

you can use the magic `__set` method to map your database columns into your model. If you don`t want a different FetchMode you can call `$builder->setFetchMode(\PDO::FETCH_ASSOC)`to change the fetch mode of the Builder instance.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance60

Regular maintenance activity

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 63.6% 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 ~38 days

Total

5

Last Release

1201d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/105f6dda4f290a91deac282c0954e6d50082616f050dae4dc4bbf42087587cbb?d=identicon)[MrMadClown](/maintainers/MrMadClown)

---

Top Contributors

[![MrMadClown](https://avatars.githubusercontent.com/u/12624410?v=4)](https://github.com/MrMadClown "MrMadClown (35 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrmadclown-mnemosyne/health.svg)

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

###  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)
