DefaultDatabaseConnection.hhi 1.09 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?hh // decl

class PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
  implements PHPUnit_Extensions_Database_DB_IDatabaseConnection {
  protected PHPUnit_Extensions_Database_DB_IMetaData $metadata;

  public function __construct(protected PDO $connection, string $schema);
  public function close(): void;
  public function getMetaData(): PHPUnit_Extensions_Database_DB_IMetaData;
  public function getSchema(): ?string;
  public function createDataSet(
    ?array $tableNames = null,
  ): PHPUnit_Extensions_Database_DataSet_IDataSet;
  public function createQueryTable(
    string $resultName,
    string $sql,
  ): PHPUnit_Extensions_Database_DB_Table;
  public function getConfig(): void;
  public function getConnection(): PDO;
  public function getRowCount(
    string $tableName,
    ?string $whereClause = null,
  ): int;
  public function quoteSchemaObject(string $object): string;
  public function getTruncateCommand(): string;
  public function allowsCascading(): bool;
  public function disablePrimaryKeys(string $tableName): void;
  public function enablePrimaryKeys(string $tableName): void;
}