IDatabaseConnection.hhi 882 Bytes
Newer Older
Simon Welsh's avatar
Simon Welsh committed
1 2 3 4 5 6 7 8 9 10 11
<?hh // decl

interface PHPUnit_Extensions_Database_DB_IDatabaseConnection {
  public function close(): void;
  public function createDataSet(
    ?array $tableNames = NULL,
  ): PHPUnit_Extensions_Database_DataSet_IDataSet;
  public function createQueryTable(
    string $resultName,
    string $sql,
  ): PHPUnit_Extensions_Database_DataSet_ITable;
12
  public function getConnection(): PDO;
Simon Welsh's avatar
Simon Welsh committed
13 14 15 16 17 18 19 20 21 22 23 24
  public function getMetaData(): PHPUnit_Extensions_Database_DB_IMetaData;
  public function getRowCount(
    string $tableName,
    ?string $whereClause = NULL,
  ): int;
  public function getSchema(): ?string;
  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;
}