-
-
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
37 changed files
with
602 additions
and
470 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
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,49 @@ | ||
<?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\Common\NestableTransactionExecutor; | ||
|
||
/** | ||
* @internal | ||
* @extends NestableTransactionExecutor<PostgresResult, PostgresStatement> | ||
*/ | ||
interface PostgresHandle extends PostgresQuoter, NestableTransactionExecutor | ||
{ | ||
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.