byjg/anydataset-db

Anydataset Database Relational abstraction. Anydataset is an agnostic data source abstraction layer in PHP.

Fund package maintenance!
byjg

5.0.0 2024-10-29 19:48 UTC

This package is auto-updated.

Last update: 2024-11-07 23:53:31 UTC


README

Build Status Opensource ByJG GitHub source GitHub license GitHub release

Anydataset Database Relational abstraction. Anydataset is an agnostic data source abstraction layer in PHP.

See more about Anydataset here.

Features

  • Connection based on URI
  • Support and fix code tricks with several databases (MySQL, PostgresSql, MS SQL Server, etc)
  • Natively supports Query Cache by implementing a PSR-6 interface
  • Supports Connection Routes based on regular expression against the queries, that's mean a select in a table should be executed in a database and in another table should be executed in another (even if in different DB)

Connection Based on URI

The connection string for databases is based on URL.

See below the current implemented drivers:

<?php
$conn = \ByJG\AnyDataset\Db\Factory::getDbInstance("mysql://root:password@10.0.1.10/myschema");

Examples

Advanced Topics

Database Specifics

Install

Just type:

composer require "byjg/anydataset"

Dependencies

Open source ByJG