Skip to content

2.0.0

Compare
Choose a tag to compare
@trowski trowski released this 10 Mar 15:16
· 2 commits to 2.x since this release
v2.0.0
4cf80b4

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 and CommandResult into a single interface, SqlResult.
  • SqlTransaction now extends SqlLink instead of SqlExecutor to support nested transactions.
  • Added onCommit() and onRollback() methods to SqlTransaction. These methods attach callbacks after the transaction is either committed or rolled back, respectively.
  • Removed the methods createSavepoint(), rollbackTo(), and releaseSavepont() from SqlTransaction. Use nested transactions through SqlTransaction::beginTransaction() instead.
  • SqlPool now extends SqlConnection instead of SqlLink. SqlPool::extractConnection() returns an instance of SqlConnection instead of SqlLink.
  • 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 extends Amp\Closable.
  • Added SqlTransactionIsolation and an enum-based implementation, SqlTransactionIsolationLevel.
  • Renamed ConnectionConfig to SqlConfig.
  • Renamed FailureException to SqlException.