# phpDox - Query\Drivers\AbstractUtil

# Query\Drivers\AbstractUtil

#### Abstract class defining database / table creation methods

## Synopsis

class AbstractUtil {

- // methods
- public void __construct()
- public DriverInterface getDriver()
- public string createTable()
- public string deleteTable()
- public abstract string backupStructure()
- public abstract string backupData()

}

## Violations

### PHPMessDetector

Line | Rule | Message
--- | --- | ---
58 | BooleanArgumentFlag | The method createTable has a boolean flag argument $ifNotExists, which is a certain sign of a Single Responsibility Principle violation.

## Methods

#### public

- __construct() — Save a reference to the connection object for later use
- backupData() — Return an SQL file with the database data as insert statements
- backupStructure() — Return an SQL file with the database table structure
- createTable() — Convenience public function to generate sql for creating a db table
- deleteTable() — Drop the selected table
- getDriver() — Get the driver object for the current connection