Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.28 KB

File metadata and controls

45 lines (27 loc) · 1.28 KB

CommonPHP Database

CommonPHP Database provides driver-based database connection and query support for CommonPHP applications. It defines database managers, connection handling, result behavior, and the contracts needed for database-specific drivers such as MySQL or Microsoft SQL Server.

The package is intended to support named connections and lazy driver creation so applications can define multiple database connections without opening them until needed.

Requirements

  • PHP ^8.5
  • comphp/runtime:^0.3

Installation

Once this package is available through your Composer repositories, install it with:

composer require comphp/database

Usage

<?php

// TODO: Write usage

Package Notes

This package should provide database managers, named connections, lazy connection drivers, transactions, and result abstractions. Concrete database engines such as MySQL, SQL Server, SQLite, and PostgreSQL should live in driver packages.

Error Handling

Connection failures, query failures, transaction failures, invalid connection names, and driver errors should throw CommonPHP database exceptions.

Documentation

License

MIT. See LICENSE.md.