An async MySQL client for PHP, optimizing database interactions with efficient non-blocking capabilities. Perfect for responsive, high-performance applications.
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType>
have been replaced with ResolutionType
.
Mysql
to avoid collisions with similar names from other libraries.MysqlTransaction
now extends MysqlLink
instead of MysqlExecutor
to support nested transactions.MysqlDataType
is now an enum of MySQL data type codes and methods to decode data based on type.MysqlResult::getColumnDefinitions()
which returns an array of MysqlColumnDefinition
objects corresponding to the result set rows.MysqlStatement::bind()
now requires a string. Binding only makes sense with long strings anyway.MysqlConnection
is now an interface extending SqlConnection
, with SocketMysqlConnection
being the implementation.MysqlConnector
since the interface was replaced by template types on SqlConnector
, i.e. SqlConnector<MysqlConfig, MysqlConnection>
Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0-beta.8...v3.0.0-beta.9
amphp/[email protected]
.Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0-beta.7...v3.0.0-beta.8
Nested transactions have been refactored to be created simply with MysqlTransaction::beginTransaction()
instead of needing to wrap a MysqlTransaction
into a MysqlNestableTransaction
. If you did not use savepoints or nested transactions, you likely will be able to upgrade to this version without any code changes.
amphp/[email protected]
and amphp/[email protected]
. Removed MysqlNestableTransaction
.MysqlConnection
interface now extends the base interface Connection
from amphp/sql
.MysqlEncodedValue
, replacing MysqlDataType::encodeValue()
.SocketMysqlConnection::initialize()
to connect()
. The first parameter now accepts an instance of SocketConnector
instead of a Socket
.MysqlColumnDefinition
now defines a set of getter methods instead of using public properties.Full Changelog: https://github.com/amphp/mysql/compare/v3.0.0-beta.6...v3.0.0-beta.7
MysqlNestableTransaction
which may be optionally used to create a MysqlLink
from a MysqlTransaction
object. Nested transactions are implemented using savepoints.amphp/socket
Result::fetchRow()
added in amphp/[email protected]
BackedEnum
instances in statement parametersMysqlResult::getParameterDefintions()
which returns a list of MysqlColumnDefinition
objects with metadata about each result set column.Error
MysqlStatement::bind()
now requires a string. Binding only makes sense with long strings anyway.substr()
.MysqlConnector
since the interface was replaced by template types on SqlConnector
, i.e. SqlConnector<MysqlConfig, MysqlConnection>
DATETIME
, TIMESTAMP
, DATE
, and TIME
columns not being decoded correctly (#120)Initial release compatible with AMPHP v3.
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType>
have been replaced with ResolutionType
.
Mysql
as a prefix to interfaces and classesConnectionConfig
to MysqlConfig
MysqlDataType
(formerly DataType
) is now an enumResultSet
and CommandResult
into a single interface, MysqlResult
MysqlConnector
interface, renamed CancellableConnector
to SocketMysqlConnector
Result::getColumnDefinitions()
returns a list of MysqlColumnDefinition
objects instead of a list of associative arrays.TransactionError
, using the base class in amphp/sql
instead