atlas / pdo
Provides a PDO instance decorator with convenience methods, and a connection manager.
Installs: 225 401
Dependents: 9
Suggesters: 0
Security: 0
Stars: 18
Watchers: 4
Forks: 5
Open Issues: 0
Requires
- php: ^8.0
Requires (Dev)
- pds/skeleton: ^1.0
- phpstan/phpstan: ^0.12.82
- phpunit/phpunit: ^9.0
README
This package provides a Connection that decorates any [PDO] (http://php.net/PDO) instance to provide the following:
-
A
perform()
that method acts just likequery()
, but binds values to a prepared statement as part of the call. -
Several
fetch*()
methods to return results in commonly-occurring situations. -
Several
yield*()
methods asfetch*()
equivalents to yield results instead of returning them. -
Query logging, including backtraces to find where queries were issued.
This package also provides a ConnectionLocator to register, instantiate, and retain named Connection objects for default, read (slave), and write (master) databases.
Read the documentation here.