Home

Awesome

Database v0.15.3 Build Status

The Titon Database package provides a lightweight and low-level interface for interacting with database engines (known as drivers). The DB package comes bundled with a robust database abstraction layer (DBAL), an object oriented query builder, a powerful SQL dialect formatter, a data type caster, custom finder classes, behaviors, mappers, schemas, and many more.

$db = Titon\Db\Database::registry();
$db->addDriver('default', new Titon\Db\Mysql\MysqlDriver([
    'user' => 'root',
    'pass' => 'pass'
]));

$users = new Titon\Db\Repository(['table' => 'users']);
$entities = $users->select()->where('status', 1)->orderBy('created_at', 'desc')->all();

Supported database engines are packaged as individual driver packages, which are listed below.

Drivers

Features

Dependencies

Requirements