classPostgreSqlSchemaFetcher
final class PostgreSqlSchemaFetcher
implements SchemaFetcherInterface
Fetches table schemas from PostgreSQL databases.
Uses information_schema to query column definitions, since PostgreSQL does not have a SHOW CREATE TABLE equivalent.
Methods§
public function __construct(?PostgreSqlSchemaParser $parser = null)Initializes the collaborators and declared state for this object.
Parameters
$parser | ?PostgreSqlSchemaParser |
Calls 1
public function fetchSchema(PDO $pdo, string $tableName): TableSchemaReads the named table from the selected database connection.
Parameters
$pdo | PDO | |
$tableName | string |
Returns
Test cases 1
Calls 5
- method-call CatalogDdl::reconstructCreateTable() line 34
- new CatalogDdl line 34
- method-call PostgreSqlSchemaParser::parse() line 37
- method-call CatalogSchema::fetchSchemaFromInformationSchema() line 40
- new CatalogSchema line 40
Private surface 1§
Implementation details, listed for orientation only.
private PostgreSqlSchemaParser $parserTest cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.