An async MySQL client for PHP, optimizing database interactions with efficient non-blocking capabilities. Perfect for responsive, high-performance applications.
mysql_native_password
authentication with MySQL 8.x (#105)caching_sha2_password
.amphp/[email protected]
.amphp/file
optional.This release provides compatibility with amphp/socket
v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.
SELECT * FROM test WHERE classId > :id AND nodeId < :id
will only require one value set for id
instead of an array of values: $statement->execute(['id' => 10])
. This behavior mirrors amphp/postgres
and the PDO extension. (#90)ConnectionConfig
constructor now takes a ConnectContext
as the second argument instead of ClientTlsContext
. TLS (and other connection) options can be specified using the ConnectContext
object.ConnectionConfig::getTlsContext()
and ConnectionConfig::withTlsContext()
have been replaced with ConnectionConfig::getConnectContext()
and ConnectionConfig::withConnectContext()
.CancellableConnector
that allows a CancellationToken
to be used to cancel the connection request.TimeoutConnector
removed. Specify a connection timeout using ConnectContext::withTimeout()
as part of ConnectionConfig
or with a TimeoutCancellationToken
with CancellableConnector
.Statement::bindParam()
now declares void
as a return type.v2.0.0-RC1
:ConnectionConfig::getConnectionString()
(#93)This release provides compatibility with amphp/socket
v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.
SELECT * FROM test WHERE classId > :id AND nodeId < :id
will only require one value set for id
instead of an array of values: $statement->execute(['id' => 10])
. This behavior mirrors amphp/postgres
and the PDO extension. (#90)ConnectionConfig
constructor now takes a ConnectContext
as the second argument instead of ClientTlsContext
. TLS (and other connection) options can be specified using the ConnectContext
object.ConnectionConfig::getTlsContext()
and ConnectionConfig::withTlsContext()
have been replaced with ConnectionConfig::getConnectContext()
and ConnectionConfig::withConnectContext()
.CancellableConnector
that allows a CancellationToken
to be used to cancel the connection request.TimeoutConnector
removed. Specify a connection timeout using ConnectContext::withTimeout()
as part of ConnectionConfig
or with a TimeoutCancellationToken
with CancellableConnector
.Statement::bindParam()
now declares void
as a return type.LOCAL DATA INFILE
(#86)ClientConnectContext
parameter to Connection::connect()
.amphp/postgres
that caused the same Connector
object to be returned by the connector()
function in both libraries.The interface structure of this library changed significantly, however most consumers of this library should be able to upgrade from v0.3.x
by only updating the code initializing a connection or pool to use an instance of ConnectionConfig
instead of a connection string. Using a connection or pool to perform queries has remained unchanged since v0.3.x
, with the exception that transactions are now started with Link::beginTransaction()
instead of Link::transaction()
.
ResultSet::getCurrent()
. All rows are always returned as associate arrays.Statement
and Pool
that are shared with amphp/postgres
are now in a separate library, amphp/sql
.ConnectionConfig
is now built with a list of parameters instead of a connection string. Use ConnectionConfig::fromString()
to use a connection string.Operation
interface has been dropped in favor of decorators. This interface was internally used to automatically free resources on destruction.Please review the interfaces in amphp/sql
to ensure no other interface changes or method renames may affect your code.