-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
356 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Amp\Postgres\Internal; | ||
|
||
use Amp\Postgres\PostgresConfig; | ||
use Amp\Postgres\PostgresListener; | ||
use Amp\Postgres\PostgresQuoter; | ||
use Amp\Postgres\PostgresResult; | ||
use Amp\Postgres\PostgresStatement; | ||
use Amp\Sql\TransientResource; | ||
|
||
/** @internal */ | ||
interface PostgresHandle extends PostgresQuoter, TransientResource | ||
{ | ||
public const STATEMENT_NAME_PREFIX = "amp_"; | ||
|
||
public function getConfig(): PostgresConfig; | ||
|
||
public function query(string $sql): PostgresResult; | ||
|
||
public function execute(string $sql, array $params = []): PostgresResult; | ||
|
||
public function prepare(string $sql): PostgresStatement; | ||
|
||
/** | ||
* @param non-empty-string $channel | ||
*/ | ||
public function notify(string $channel, string $payload = ""): PostgresResult; | ||
|
||
/** | ||
* @param non-empty-string $channel | ||
*/ | ||
public function listen(string $channel): PostgresListener; | ||
|
||
/** | ||
* Execute the statement with the given name and parameters. | ||
* | ||
* @param list<mixed> $params List of statement parameters, indexed starting at 0. | ||
*/ | ||
public function statementExecute(string $name, array $params): PostgresResult; | ||
|
||
/** | ||
* Deallocate the statement with the given name. | ||
*/ | ||
public function statementDeallocate(string $name): void; | ||
} |
Oops, something went wrong.