atlas / pdo
Provides a PDO instance decorator with convenience methods, and a connection manager.
Installs: 134 178
Dependents: 8
Suggesters: 0
Security: 0
Stars: 14
Watchers: 2
Forks: 7
Open Issues: 0
Requires
- php: >=7.1
Requires (Dev)
- pds/skeleton: ~1.0
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2021-03-01 00:22:05 UTC
README
This package provides a Connection that decorates any PDO instance to provide the following:
-
A
perform()
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.
-
The Connection always sets the PDO connection to
ERRMODE_EXCEPTION
mode for error reporting.
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.