2017 © Pedro PelĆ”ez
 

library micro-dbal

A PHP lightweight DBAL client

image

hgraca/micro-dbal

A PHP lightweight DBAL client

  • Wednesday, December 21, 2016
  • by hgraca
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Hgraca\MicroDbal

Author Software License Latest Version Total Downloads, (*1)

Build Status Coverage Status Quality Score, (*2)

A PHP DBAL client, (*3)

TODO: A short description of what is the project. This should explain what the project is. TODO: A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists., (*4)

Usage

TODO: A short explanation of how to use the project. This should explain how the project is usable. After installing this in your project, as specified below, you can easily use the CRUD client, ie:, (*5)

$crudClient = new CrudClient(new PdoClient(new PDO($dsn)), new SqlQueryBuilder());

// public function create(string $table, array $data);
$crudClient->create('Employees', ['EmployeeID' => '1', 'Name' => 'Maria]);

// public function read(string $table, array $filter = [], array $orderBy = [], int $limit = 30, int $offset = 1): array;
$crudClient->read('Employees', ['EmployeeID' => '1']);
$crudClient->read('Employees', ['EmployeeID' => ['1', '2', '3']]);

// public function update(string $table, array $data, array $filter = []);
$crudClient->update('Employees', ['Name' => 'Josefina], ['EmployeeID' => '1']);

// public function delete(string $table, array $filter = []);
$crudClient->delete('Employees', ['EmployeeID' => '1']);

Or the raw client, ie:, (*6)

$rawClient = new PdoClient(new PDO($dsn);

$rawClient->executeQuery($sql, $bindingsList);
$rawClient->executeCommand($sql, $bindingsList);

Installation

To install the library, run the command below and you will get the latest version:, (*7)

composer require hgraca/micro-dbal

Tests

To run the tests run:, (*8)

make test

Or just one of the following:, (*9)

make test-acceptance
make test-functional
make test-integration
make test-unit
make test-humbug

To run the tests in debug mode run:, (*10)

make test-debug

Coverage

To generate the test coverage run:, (*11)

make coverage

Code standards

To fix the code standards run:, (*12)

make cs-fix

Todo

The Versions