class ConnectionConfig

internal  
 

The facts of a configured database connection that schema inference reads.

Methods

__construct(string $owner, string $driver, string $prefix, string|null $defaultSchema, array $searchPath, bool $nativeJson, bool $nativeJsonb, array $fetchOptions, bool $customized)

Create a new connection config instance.

Parser|null
createParser()

Create the schema parser for the connection's driver, or return null when the driver has none.

string|null
definitionSchema()

Get the schema an unqualified definition belongs to: the MySQL database or SQLite's main database.

array
physicalTable(string $table)

Get the schema and physical name of a logical table name.

Details

at line 34
__construct(string $owner, string $driver, string $prefix, string|null $defaultSchema, array $searchPath, bool $nativeJson, bool $nativeJsonb, array $fetchOptions, bool $customized)

Create a new connection config instance.

Parameters

string $owner

the connection its migrations run on, which owns its schema facts

string $driver
string $prefix
string|null $defaultSchema

the schema of unqualified names: the MySQL database or SQLite's main database

array $searchPath

the schemas an unqualified PostgreSQL name resolves through, in order

bool $nativeJson

whether SQLite's schema grammar creates Blueprint json columns as json rather than text

bool $nativeJsonb

whether SQLite's schema grammar creates Blueprint jsonb columns as jsonb rather than text

array $fetchOptions

each distinct set of the PDO options that change fetched values

bool $customized

whether a DB::extend() resolver or a custom connector creates the connection, so fetched values are unknown

at line 50
Parser|null createParser()

Create the schema parser for the connection's driver, or return null when the driver has none.

Return Value

Parser|null

at line 66
string|null definitionSchema()

Get the schema an unqualified definition belongs to: the MySQL database or SQLite's main database.

PostgreSQL definitions stay unqualified with the connection's search path.

Return Value

string|null

at line 78
array physicalTable(string $table)

Get the schema and physical name of a logical table name.

The prefix applies to the final segment, as Grammar::wrapTable() applies it.

Parameters

string $table

Return Value

array