diff --git a/PDO/PDO.php b/PDO/PDO.php index e97ef4731..a8ed7c67d 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -2058,4 +2058,57 @@ class Mysql extends PDO public function getWarningCount(): int {} } + + /** + * @since 8.4 + */ + class Pgsql extends PDO + { + public const int ATTR_DISABLE_PREPARES = 1000; + public const int ATTR_RESULT_MEMORY_SIZE = 1001; + public const int TRANSACTION_IDLE = 0; + public const int TRANSACTION_ACTIVE = 1; + public const int TRANSACTION_INTRANS = 2; + public const int TRANSACTION_INERROR = 3; + public const int TRANSACTION_UNKNOWN = 4; + + public function copyFromArray( + string $tableName, + array $rows, + string $separator = "\t", + string $nullAs = "\\\\N", + ?string $fields = null + ): bool {} + public function copyFromFile( + string $tableName, + string $filename, + string $separator = "\t", + string $nullAs = "\\\\N", + ?string $fields = null + ): bool {} + public function copyToArray( + string $tableName, + string $separator = "\t", + string $nullAs = "\\\\N", + ?string $fields = null + ): array|false {} + public function copyToFile( + string $tableName, + string $filename, + string $separator = "\t", + string $nullAs = "\\\\N", + ?string $fields = null + ): bool {} + public function escapeIdentifier(string $input): string {} + public function getNotify(int $fetchMode = \PDO::FETCH_DEFAULT, int $timeoutMilliseconds = 0): array|false {} + public function getPid(): int{} + public function lobCreate(): string|false {} + /** + * Opens an existing large object stream. Must be called inside a transaction. + * @return resource|false + */ + public function lobOpen(string $oid, string $mode = "rb") {} + public function lobUnlink(string $oid): bool {} + public function setNoticeCallback(?callable $callback): void {} + } } diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index 647e2a7de..92324fe7f 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -821,6 +821,7 @@ final class PhpStormStubsMap 'ParseError' => 'Core/Core_c.php', 'Pcntl\\QosClass' => 'pcntl/pcntl_c.php', 'Pdo\\Mysql' => 'PDO/PDO.php', + 'Pdo\\Pgsql' => 'PDO/PDO.php', 'Pdo\\Sqlite' => 'PDO/PDO.php', 'PgSql\\Connection' => 'pgsql/pgsql_c.php', 'PgSql\\Lob' => 'pgsql/pgsql_c.php',