2.0.0
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
.
- Added template types to interfaces for better type expression on implementations and extensions.
- All classes now start with
Sql
as a prefix to avoid name collisions with other libraries. - Combined
ResultSet
andCommandResult
into a single interface,SqlResult
. SqlTransaction
now extendsSqlLink
instead ofSqlExecutor
to support nested transactions.- Added
onCommit()
andonRollback()
methods toSqlTransaction
. These methods attach callbacks after the transaction is either committed or rolled back, respectively. - Removed the methods
createSavepoint()
,rollbackTo()
, andreleaseSavepont()
fromSqlTransaction
. Use nested transactions throughSqlTransaction::beginTransaction()
instead. SqlPool
now extendsSqlConnection
instead ofSqlLink
.SqlPool::extractConnection()
returns an instance ofSqlConnection
instead ofSqlLink
.- Added
SqlResult::fetchRow()
, which will return a single row (associative array) from the result set on each call until no further rows remain in the result. SqlTransientResource
and now extendsAmp\Closable
.- Added
SqlTransactionIsolation
and an enum-based implementation,SqlTransactionIsolationLevel
. - Renamed
ConnectionConfig
toSqlConfig
. - Renamed
FailureException
toSqlException
.