Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sql Laravel Package

amphp/sql

Async SQL library for PHP built on Amp. Provides non-blocking database connections, query execution, and result handling with a consistent API, enabling high-concurrency apps without blocking I/O. Supports common drivers and integrates cleanly with event-loop workflows.

View on GitHub
Deep Wiki
Context7
v2.1.1

What's Changed

  • Fix acceptance of escaped spaces in connection strings

Full Changelog: https://github.com/amphp/sql/compare/v2.1.0...v2.1.1

v2.1.0

What's Changed

  • Added support for quoted strings within connection strings, e.g. "host=localhost port=5432 options='--client_encoding=UTF8'"

Full Changelog: https://github.com/amphp/sql/compare/v2.0.1...v2.1.0

v2.0.1

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/sql/compare/v2.0.0...v2.0.1

v2.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 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.
v2.0.0-beta.6

What's Changed

  • The Transaction interface now extends Link, adding nested transaction functionality through beginTransaction() on a transaction object.
  • Added Connection interface with methods to retrieve the config and get/set the current transaction isolation.
  • The TransactionIsolation argument of Link::beginTransaction() has been removed. Transaction isolation is now set on the connection in the new Connection interface.
  • Pool now extends Connection instead of Link. Pool::extractConnection() returns an instance of Connection instead of Link.
  • SqlConnector::connect() returns an instance of Connection instead of Link.
  • Renamed Transaction::getIsolationLevel() to getIsolation().
  • Removed the methods createSavepoint(), rollbackTo(), and releaseSavepont() from Transaction. Use nested transactions through beginTransaction() instead.
  • Added onCommit() and onRollback() methods to Transaction. These methods attach callbacks when the transaction is either committed or rolled back, respectively.

Full Changelog: https://github.com/amphp/sql/compare/v2.0.0-beta.5...v2.0.0-beta.6

v2.0.0-beta.5
v2.0.0-beta.4
  • Removed PoolError
  • Updated several docblock types to be non-empty-string instead of string
v2.0.0-beta.3
  • Added Result::fetchRow(), which will return a single row (associative array) from the result set on each call until no further rows remain in the result.
// Iterate over result rows with a simple while loop
while ($row = $result->fetchRow()) {
    // ...
}

// Also useful if you know your result will contain only a single row
$id = $result->fetchRow()['id'] ?? throw new Exception('Item not found');
v1.0.2
  • Fix a deprecation notice on PHP 8.1 if a configuration key does not have a value.
v2.0.0-beta.2
  • Fix template type restriction in Amp\Sql\Pool.
v2.0.0-beta.1

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.

  • Added template types to interfaces for better type expression on implementations and extensions.
  • TransientResource now extends Amp\Closable
  • Added TransactionIsolation and an enum-based implementation, TransactionIsolationLevel
  • Combined ResultSet and CommandResult into a single interface, Result
  • Renamed ConnectionConfig to SqlConfig
  • Renamed Connector to SqlConnector
  • Renamed FailureException to SqlException
v1.0.1
  • ConnectionConfig::parseConnectionString() will now parse the port from the host, i.e.: host=localhost:3306 will return the array ['host' => 'localhost', 'port' => '3306'].
v1.0.0

Initial release.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme