Skip to content

Commit

Permalink
Remove PostgresQuoter
Browse files Browse the repository at this point in the history
Merged into PostgresExecutor.
  • Loading branch information
trowski committed Dec 7, 2023
1 parent 6edd4e7 commit f15097a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 35 deletions.
30 changes: 29 additions & 1 deletion src/PostgresExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @extends Executor<PostgresResult, PostgresStatement>
*/
interface PostgresExecutor extends PostgresQuoter, Executor
interface PostgresExecutor extends Executor
{
/**
* @return PostgresResult Result object specific to this library.
Expand All @@ -34,4 +34,32 @@ public function execute(string $sql, array $params = []): PostgresResult;
* @throws ConnectionException If the connection to the database is lost.
*/
public function notify(string $channel, string $payload = ""): PostgresResult;

/**
* Quotes (escapes) the given string for use as a string literal or identifier in a query. This method wraps the
* string in single quotes, so additional quotes should not be added in the query.
*
* @param string $data Unquoted data.
*
* @return string Quoted string wrapped in single quotes.
*
* @throws \Error If the connection to the database has been closed.
*/
public function quoteString(string $data): string;

/**
* Quotes (escapes) the given string for use as a name or identifier in a query.
*
* @param string $name Unquoted identifier.
*
* @return string Quoted identifier.
*
* @throws \Error If the connection to the database has been closed.
*/
public function quoteName(string $name): string;

/**
* Escapes a binary string to be used as BYTEA data.
*/
public function escapeByteA(string $data): string;
}
34 changes: 0 additions & 34 deletions src/PostgresQuoter.php

This file was deleted.

0 comments on commit f15097a

Please sign in to comment.