芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/vendor/doctrine/dbal/src/Driver/PgSQL/Connection.php
connection = $connection; $this->parser = new Parser(false); } public function __destruct() { if (! isset($this->connection)) { return; } @pg_close($this->connection); } public function prepare(string $sql): Statement { $visitor = new ConvertParameters(); $this->parser->parse($sql, $visitor); $statementName = uniqid('dbal', true); if (@pg_send_prepare($this->connection, $statementName, $visitor->getSQL()) !== true) { throw new Exception(pg_last_error($this->connection)); } $result = @pg_get_result($this->connection); assert($result !== false); if ((bool) pg_result_error($result)) { throw Exception::fromResult($result); } return new Statement($this->connection, $statementName, $visitor->getParameterMap()); } public function query(string $sql): Result { if (@pg_send_query($this->connection, $sql) !== true) { throw new Exception(pg_last_error($this->connection)); } $result = @pg_get_result($this->connection); assert($result !== false); if ((bool) pg_result_error($result)) { throw Exception::fromResult($result); } return new Result($result); } /** {@inheritDoc} */ public function quote($value, $type = ParameterType::STRING) { if ($type === ParameterType::BINARY || $type === ParameterType::LARGE_OBJECT) { return sprintf("'%s'", pg_escape_bytea($this->connection, $value)); } return pg_escape_literal($this->connection, $value); } public function exec(string $sql): int { return $this->query($sql)->rowCount(); } /** {@inheritDoc} */ public function lastInsertId($name = null) { if ($name !== null) { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/issues/4687', 'The usage of Connection::lastInsertId() with a sequence name is deprecated.', ); return $this->query(sprintf('SELECT CURRVAL(%s)', $this->quote($name)))->fetchOne(); } return $this->query('SELECT LASTVAL()')->fetchOne(); } /** @return true */ public function beginTransaction(): bool { $this->exec('BEGIN'); return true; } /** @return true */ public function commit(): bool { $this->exec('COMMIT'); return true; } /** @return true */ public function rollBack(): bool { $this->exec('ROLLBACK'); return true; } public function getServerVersion(): string { return (string) pg_version($this->connection)['server']; } /** @return PgSqlConnection|resource */ public function getNativeConnection() { return $this->connection; } }