PHPackages                             peteraba/foo-pdo - 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. peteraba/foo-pdo

AbandonedArchivedLibrary

peteraba/foo-pdo
================

Pdo statement preprocessors (e.g. easy IN () where clauses)

04PHP

Since Apr 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/peteraba/FooPdo)[ Packagist](https://packagist.org/packages/peteraba/foo-pdo)[ RSS](/packages/peteraba-foo-pdo/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

FooPdo
======

[](#foopdo)

Pdo statement preprocessors (e.g. easy IN () where clauses)

[![Build Status](https://camo.githubusercontent.com/3f35c2eaf4f3f271c91678a29425b8015efafdc9459b2b630e55a0f10727a1c4/68747470733a2f2f7472617669732d63692e6f72672f70657465726162612f466f6f50646f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/peteraba/FooPdo)[![License](https://camo.githubusercontent.com/979702fc2a3db8789f7b895a9eab36f9cea4cf220a850b251dd85e3f23247c67/68747470733a2f2f706f7365722e707567782e6f72672f70657465726162612f666f6f2d70646f2f6c6963656e7365)](https://packagist.org/packages/peteraba/foo-pdo)[![composer.lock](https://camo.githubusercontent.com/302cb986eca20dbb071500d4b24b7488aa839b78d19dbf4e5cf5910862d74032/68747470733a2f2f706f7365722e707567782e6f72672f70657465726162612f666f6f2d70646f2f636f6d706f7365726c6f636b)](https://packagist.org/packages/peteraba/foo-pdo)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7a9577a703da272253f9edde90428889f127342ec8436f8a30e091c2b4131b01/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70657465726162612f466f6f50646f2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/peteraba/FooPdo/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/459fb197332ee4105339177c7be69dca399f1e8a7b39eb2bc8957c1d3d04a903/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70657465726162612f466f6f50646f2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/peteraba/FooPdo/?branch=master)[![Build Status](https://camo.githubusercontent.com/a133defd8db31a3dedf082febe07f8353db95fe6d16488ed52ae764111155c83/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70657465726162612f466f6f50646f2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/peteraba/FooPdo/build-status/master)

Setup
-----

[](#setup)

Install the library via composer:

```
composer install peteraba/foo-pdo

```

Usage
-----

[](#usage)

Usage by unnamed parameters:

```
$sql           = 'SELECT name, age, salary FROM employee WHERE age > ? AND department_id IN (?)';
$departmentIds = [3, 4, 6];
$minAge        = 40;
$parameters    = [$minAge, $departmentIds];

$preprocessor = (new \Foo\Pdo\Statement\Preprocessor\Factory())->getPreprocessor();

$preprocessor->process($sql, $parameters);
// $sql = 'SELECT name, age, salary FROM employee WHERE age > ? department_id IN (?, ?, ?)'
// $departmentIds = [40, 3, 4, 6];
```

Usage with named parameters:

```
$sql           = 'SELECT name, age, salary FROM employee WHERE age > :age AND department_id IN (:departmentIds)';
$departmentIds = [3, 4, 6];
$minAge        = 40;
$parameters    = [$minAge, $departmentIds];

$preprocessor = (new \Foo\Pdo\Statement\Preprocessor\Factory())->getPreprocessor();

$preprocessor->process($sql, $parameters);
// $sql = 'SELECT name, age, salary FROM employee WHERE age > :age department_id IN (:departmentIds__expanded0, :departmentIds__expanded1, :departmentIds__expanded2)'
// $departmentIds = [
    'age' => 40,
    'departmentIds__expanded0' => 3,
    'departmentIds__expanded1' => 4,
    'departmentIds__expanded2' => 6,
];
```

**Note:** The current implementation is able to handle a mixed set of named and unnamed parameters, but there is no guarantee for this to be the case in the future so you should avoid using this unsupported feature.

###  Health Score

19

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/790e07c00547c3f488d989ba1c00016cb20fac90ed94b44ed7411f74fa7432e1?d=identicon)[peteraba](/maintainers/peteraba)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/peteraba-foo-pdo/health.svg)

```
[![Health](https://phpackages.com/badges/peteraba-foo-pdo/health.svg)](https://phpackages.com/packages/peteraba-foo-pdo)
```

PHPackages © 2026

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