From a36a41ab062d9da765872475768e2987c7e64005 Mon Sep 17 00:00:00 2001 From: prolic Date: Fri, 29 Jun 2018 17:22:16 +0800 Subject: [PATCH] update interfaces --- src/Connection.php | 21 --------------------- src/ConnectionConfig.php | 3 ++- src/Executor.php | 5 +++++ 3 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 src/Connection.php 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. */