Added
- Official support for PostgreSQL.
- It is now possible to bind and set binary column values in a prepared statement which is executed multiple times.
Changed
- Rewrote library using PDO instead of driver-specific connection objects.
Rather than instantiating aMysql
orSqlServer
subclass, simply construct
PeachySql
with the PDO object for your connection. - Moved to
DevTheorem
namespace.
Important
If using SQL Server, make sure your PDO connection has the PDO::SQLSRV_ATTR_FETCHES_NUMERIC_TYPE
option set to true
, so column values are returned with the same native types as before.
- When using MySQL, the
Statement
object no longer has agetInsertId()
method.
This does not affect shorthand insert methods, however, which provide the insert IDs just like before. - The
getAffected()
method on a select query result now returns the number of selected rows instead of-1
for MySQL. - PHP 8.1+ is now required.
Removed
- All previously deprecated methods.
- Unnecessary
$length
parameter frommakeBinaryParam()
. SqlException
no longer has properties for the failed query and params.