Add cancellation to connect()

This commit is contained in:
Aaron Piotrowski 2022-04-11 22:56:21 -05:00
parent dcbe6ff712
commit 52a30eeded
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -2,11 +2,13 @@
namespace Amp\Sql;
use Amp\Cancellation;
interface SqlConnector
{
/**
* Returns a new database connection based on the given configuration.
* Implementations may provide further parameters, such as a Cancellation.
*/
public function connect(SqlConfig $config): Link;
public function connect(SqlConfig $config, ?Cancellation $cancellation = null): Link;
}