diff --git a/src/Connection.php b/src/Connection.php deleted file mode 100644 index cc7b9da..0000000 --- a/src/Connection.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ - 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; -} diff --git a/src/ConnectionConfig.php b/src/ConnectionConfig.php index da3810c..58d7db6 100644 --- a/src/ConnectionConfig.php +++ b/src/ConnectionConfig.php @@ -2,6 +2,7 @@ namespace Amp\Sql; -interface ConnectionConfig { +interface ConnectionConfig +{ public function connectionString(): string; } diff --git a/src/Executor.php b/src/Executor.php index 074a7de..07c7844 100644 --- a/src/Executor.php +++ b/src/Executor.php @@ -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. */