PHPackages                             deemru/triples - 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. deemru/triples

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

deemru/triples
==============

Simple SQLite layer

1.0.10(1y ago)01891MITPHPPHP &gt;=5.4

Since Mar 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/deemru/Triples)[ Packagist](https://packagist.org/packages/deemru/triples)[ Docs](https://github.com/deemru/Triples)[ RSS](/packages/deemru-triples/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)DependenciesVersions (12)Used By (1)

Triples
=======

[](#triples)

[![packagist](https://camo.githubusercontent.com/1503ff9a3d13e056a6d38e2f21b6ffac200db4a3cae28d1e3e92f574e1b8c18a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465656d72752f747269706c65732e737667)](https://packagist.org/packages/deemru/triples) [![php-v](https://camo.githubusercontent.com/3bcc625877a947e24018444efaddee3a8c343a27855d50bc9b57f14e0d82e9db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465656d72752f747269706c65732e737667)](https://packagist.org/packages/deemru/triples) [![GitHub](https://camo.githubusercontent.com/9decbab0faf790b80cb4c03bfc6953b9bcd8668339f43d7d979f0de8fd50c058/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465656d72752f547269706c65732f7068702e796d6c3f6c6162656c3d676974687562253230616374696f6e73)](https://github.com/deemru/Triples/actions/workflows/php.yml) [![codacy](https://camo.githubusercontent.com/f4b7c40e07763580e48aa01a2b8533901dd53a4a3c3c2af2e99f520940cf0c67/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f39343536326263356666616234343761396138663030343535303263323461362e7376673f6c6162656c3d636f64616379)](https://app.codacy.com/gh/deemru/Triples/files) [![license](https://camo.githubusercontent.com/843d5268ac378bb0d9e837ff34015e445c19efd6abf12e859a2e172ba333d917/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465656d72752f747269706c65732e737667)](https://packagist.org/packages/deemru/triples)

[Triples](https://github.com/deemru/Triples) implements a simple flexible layer for [SQLite](https://en.wikipedia.org/wiki/SQLite) storage.

- Speed
- Merge through cache
- Custom queries

Usage
-----

[](#usage)

```
$dbpath = __DIR__ . '/triples.sqlite';
$triples = new Triples( $dbpath, 'triples', true, [ 'INTEGER PRIMARY KEY', 'TEXT UNIQUE', 'INTEGER' ], [ 0, 0, 1 ] );

$r0 = 1;
$r1 = 'Hello, World!';
$r2 = crc32( $r1 );
$rec = [ $r0, $r1, $r2 ];
$recs = [ $rec ];
$triples->merge( $recs );

if( $triples->getUno( 2, $r2 )[0] != $r0 ||
    $triples->getUno( 1, $r1 )[2] != $r2 ||
    $triples->getUno( 0, $r0 )[1] !== $r1 )
    exit( 1 );
```

Requirements
------------

[](#requirements)

- [PHP](http://php.net) &gt;= 5.4
- [SQLite (PDO)](http://php.net/manual/en/ref.pdo-sqlite.php)

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

[](#installation)

Require through Composer:

```
{
    "require": {
        "deemru/triples": "1.0.*"
    }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~159 days

Recently: every ~225 days

Total

11

Last Release

658d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10706633?v=4)[Dmitrii Pichulin](/maintainers/deemru)[@deemru](https://github.com/deemru)

---

Top Contributors

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

---

Tags

databasesqlitemerge

### Embed Badge

![Health badge](/badges/deemru-triples/health.svg)

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

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[catfan/medoo

The lightweight PHP database framework to accelerate development

4.9k1.5M194](/packages/catfan-medoo)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[nette/database

💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.

5656.7M234](/packages/nette-database)[usmanhalalit/pixie

A lightweight, expressive, framework agnostic query builder for PHP.

6872.2M15](/packages/usmanhalalit-pixie)[dibi/dibi

Dibi is Database Abstraction Library for PHP

5013.8M120](/packages/dibi-dibi)

PHPackages © 2026

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