Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/byjg/php-anydataset-db
Anydataset Database Relational abstraction. Anydataset is an agnostic data source abstraction layer in PHP.
https://github.com/byjg/php-anydataset-db
anydataset byjg database microsoft-sql-server mysql postgressql relational-databases sqlite3
Last synced: 2 months ago
JSON representation
Anydataset Database Relational abstraction. Anydataset is an agnostic data source abstraction layer in PHP.
- Host: GitHub
- URL: https://github.com/byjg/php-anydataset-db
- Owner: byjg
- License: mit
- Created: 2018-11-17T21:49:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T21:04:27.000Z (3 months ago)
- Last Synced: 2024-09-29T14:40:59.005Z (3 months ago)
- Topics: anydataset, byjg, database, microsoft-sql-server, mysql, postgressql, relational-databases, sqlite3
- Language: PHP
- Size: 234 KB
- Stars: 5
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AnyDataset-DB
[![Build Status](https://github.com/byjg/php-anydataset-db/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-anydataset-db/actions/workflows/phpunit.yml)
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/php-anydataset-db/)
[![GitHub license](https://img.shields.io/github/license/byjg/php-anydataset-db.svg)](https://opensource.byjg.com/opensource/licensing.html)
[![GitHub release](https://img.shields.io/github/release/byjg/php-anydataset-db.svg)](https://github.com/byjg/php-anydataset-db/releases/)Anydataset Database Relational abstraction. Anydataset is an agnostic data source abstraction layer in PHP.
See more about Anydataset [here](https://opensource.byjg.com/anydataset).
## 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:
| Database | Connection String | Factory |
|---------------------|---------------------------------------------------|---------------------------|
| Sqlite | sqlite:///path/to/file | getDbRelationalInstance() |
| MySql/MariaDb | mysql://username:password@hostname:port/database | getDbRelationalInstance() |
| Postgres | psql://username:password@hostname:port/database | getDbRelationalInstance() |
| Sql Server (DbLib) | dblib://username:password@hostname:port/database | getDbRelationalInstance() |
| Sql Server (Sqlsrv) | sqlsrv://username:password@hostname:port/database | getDbRelationalInstance() |
| Oracle (OCI8) | oci8://username:password@hostname:port/database | getDbRelationalInstance() |
| Generic PDO | pdo://username:password@pdo_driver?PDO_PARAMETERS | getDbRelationalInstance() |```php
byjg/anydataset-array
byjg/anydataset-db --> ext-pdo
byjg/anydataset-db --> byjg/uri
byjg/anydataset-db --> psr/cache
byjg/anydataset-db --> psr/log
```----
[Open source ByJG](http://opensource.byjg.com)