2017 © Pedro Peláez
 

library dbal

DataBase Abstraction Layer

image

artoodetoo/dbal

DataBase Abstraction Layer

  • Sunday, February 22, 2015
  • by artoodetoo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DBAL

DataBase Abstraction Layer., (*1)

Installation

The package can be installed via Composer by requiring the "artoodetoo/dbal" package in your project's composer.json., (*2)

{
    "require": {
        "artoodetoo/dbal": "dev-master"
    }
}

Usage

require 'vendor/autoload.php';

use R2\DBAL\PDOMySQL;

$db = new PDOMySQL([
    'username' => 'john',
    'password' => 'tiger',
    'dbname'   => 'testdb'
]);
$list = $db
    ->query("SELECT id FROM test")
    ->fetchAssocAll();

Feature list

Every DBALInterface descendant do: * named placeholders without ":" sign, so you can do, (*3)

    $db->query($sql, compact('name', 'city', 'ids'))
  • array substitution for IN(:ids)
  • auto NULL substitution for nulls or empty arrays
  • method chaining like
    $db
        ->beginTransaction
            ->query($insertSql1)
            ->query($insertSql2)
            ->query($insertSql3)
        ->commit();

License

The DBAL is open-source software, licensed under the MIT license, (*4)

The Versions

22/02 2015

dev-master

9999999-dev

DataBase Abstraction Layer

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Avatar artoodetoo

database dbal db package connection