byjg/anydataset-db

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

Fund package maintenance!
byjg

5.0.2 2024-12-17 16:10 UTC

This package is auto-updated.

Last update: 2024-12-17 16:10:56 UTC


README

Build Status Opensource ByJG GitHub source GitHub license GitHub release

AnyDataset-DB provides a relational database abstraction layer. It is part of the Anydataset project, an agnostic data source abstraction layer for PHP.

Learn more about Anydataset here.

Features

  • Connection based on URI
  • Handles compatibility and code optimization across multiple databases (e.g., MySQL, PostgreSQL, MS SQL Server)
  • Built-in Query Cache support using a PSR-6 compliant interface
  • Enables connection routing based on regular expressions for queries (e.g., directing queries to different databases for specific tables)

Connection Based on URI

Database connections are defined using URL-based connection strings.

Supported drivers are listed below:

Example usage:

<?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