PHP 8.3.31
Preview: PostgresConnection.php Size: 2.90 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php

<?php

namespace Illuminate\Database;

use Exception;
use Illuminate\Database\Query\Grammars\PostgresGrammar as QueryGrammar;
use Illuminate\Database\Query\Processors\PostgresProcessor;
use Illuminate\Database\Schema\Grammars\PostgresGrammar as SchemaGrammar;
use Illuminate\Database\Schema\PostgresBuilder;
use Illuminate\Database\Schema\PostgresSchemaState;
use Illuminate\Filesystem\Filesystem;

class PostgresConnection extends Connection
{
    /**
     * {@inheritdoc}
     */
    public function getDriverTitle()
    {
        return 'PostgreSQL';
    }

    /**
     * Escape a binary value for safe SQL embedding.
     *
     * @param  string  $value
     * @return string
     */
    protected function escapeBinary($value)
    {
        $hex = bin2hex($value);

        return "'\x{$hex}'::bytea";
    }

    /**
     * Escape a bool value for safe SQL embedding.
     *
     * @param  bool  $value
     * @return string
     */
    protected function escapeBool($value)
    {
        return $value ? 'true' : 'false';
    }

    /**
     * Determine if the given database exception was caused by a unique constraint violation.
     *
     * @param  \Exception  $exception
     * @return bool
     */
    protected function isUniqueConstraintError(Exception $exception)
    {
        return '23505' === $exception->getCode();
    }

    /**
     * Get the default query grammar instance.
     *
     * @return \Illuminate\Database\Query\Grammars\PostgresGrammar
     */
    protected function getDefaultQueryGrammar()
    {
        ($grammar = new QueryGrammar)->setConnection($this);

        return $this->withTablePrefix($grammar);
    }

    /**
     * Get a schema builder instance for the connection.
     *
     * @return \Illuminate\Database\Schema\PostgresBuilder
     */
    public function getSchemaBuilder()
    {
        if (is_null($this->schemaGrammar)) {
            $this->useDefaultSchemaGrammar();
        }

        return new PostgresBuilder($this);
    }

    /**
     * Get the default schema grammar instance.
     *
     * @return \Illuminate\Database\Schema\Grammars\PostgresGrammar
     */
    protected function getDefaultSchemaGrammar()
    {
        ($grammar = new SchemaGrammar)->setConnection($this);

        return $this->withTablePrefix($grammar);
    }

    /**
     * Get the schema state for the connection.
     *
     * @param  \Illuminate\Filesystem\Filesystem|null  $files
     * @param  callable|null  $processFactory
     * @return \Illuminate\Database\Schema\PostgresSchemaState
     */
    public function getSchemaState(?Filesystem $files = null, ?callable $processFactory = null)
    {
        return new PostgresSchemaState($this, $files, $processFactory);
    }

    /**
     * Get the default post processor instance.
     *
     * @return \Illuminate\Database\Query\Processors\PostgresProcessor
     */
    protected function getDefaultPostProcessor()
    {
        return new PostgresProcessor;
    }
}

Directory Contents

Dirs: 9 × Files: 33

Name Size Perms Modified Actions
Capsule DIR
- drwxrwxrwx 2025-09-17 06:53:01
Edit Download
Concerns DIR
- drwxrwxrwx 2025-09-17 06:53:01
Edit Download
- drwxrwxrwx 2025-09-17 06:53:00
Edit Download
Console DIR
- drwxrwxrwx 2025-09-17 06:53:01
Edit Download
Eloquent DIR
- drwxrwxrwx 2025-09-17 06:53:01
Edit Download
Events DIR
- drwxrwxrwx 2025-09-17 06:53:01
Edit Download
- drwxrwxrwx 2025-09-17 06:53:00
Edit Download
Query DIR
- drwxrwxrwx 2025-09-17 06:53:01
Edit Download
Schema DIR
- drwxrwxrwx 2025-09-17 06:53:00
Edit Download
525 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
1.67 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
192 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
41.76 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
4.16 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
1.95 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
575 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
13.52 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
3.19 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
1.58 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
7.75 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
114 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
1.09 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
4.26 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
7.89 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
769 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
1.05 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
124 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
2.53 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
6.08 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
137 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
745 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
4.39 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
2.90 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
2.08 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
2.16 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
128 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
129 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
4.63 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
5.53 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
565 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
3.98 KB lrw-rw-rw- 2025-09-17 06:53:00
Edit Download
107 B lrw-rw-rw- 2025-09-17 06:53:00
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).