mirror of
https://github.com/danog/sql.git
synced 2024-11-30 04:29:18 +01:00
update interfaces
This commit is contained in:
parent
57d72761cb
commit
a36a41ab06
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Amp\Sql;
|
||||
|
||||
use Amp\CancellationToken;
|
||||
use Amp\Promise;
|
||||
|
||||
interface Connection extends Link {
|
||||
/**
|
||||
* @param ConnectionConfig $config
|
||||
* @param CancellationToken|null $token
|
||||
*
|
||||
* @return Promise<Connection>
|
||||
*/
|
||||
public static function connect(ConnectionConfig $config, CancellationToken $token = null): Promise;
|
||||
|
||||
/**
|
||||
* @return int Timestamp of the last time this connection was used.
|
||||
*/
|
||||
public function lastUsedAt(): int;
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Amp\Sql;
|
||||
|
||||
interface ConnectionConfig {
|
||||
interface ConnectionConfig
|
||||
{
|
||||
public function connectionString(): string;
|
||||
}
|
||||
|
@ -46,6 +46,11 @@ interface Executor {
|
||||
*/
|
||||
public function isAlive(): bool;
|
||||
|
||||
/**
|
||||
* @return int Timestamp of the last time this connection was used.
|
||||
*/
|
||||
public function lastUsedAt(): int;
|
||||
|
||||
/**
|
||||
* Closes the executor. No further queries may be performed.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user