# Documentation

Menu

## AbstractUtil
in package

AbstractUtil.php : 24

Abstract class defining database / table creation methods

### Table of Contents

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

### Methods

#### __construct()

AbstractUtil.php : 29

Save a reference to the connection object for later use

`public __construct(DriverInterface $connection) : mixed`

##### Parameters

$connection : DriverInterface

##### Return values

mixed —

#### backupData()

AbstractUtil.php : 98

Return an SQL file with the database data as insert statements

`public abstract backupData() : string`

##### Return values

string —

#### backupStructure()

AbstractUtil.php : 93

Return an SQL file with the database table structure

`public abstract backupStructure() : string`

##### Return values

string —

#### createTable()

AbstractUtil.php : 44

Convenience public function to generate sql for creating a db table

`public createTable(string $name, array<string|int, mixed> $fields[, array<string|int, mixed> $constraints = [] ][, bool $ifNotExists = TRUE ]) : string`

##### Parameters

$name : string
$fields : array<string|int, mixed>
$constraints : array<string|int, mixed> = []
$ifNotExists : bool = TRUE

##### Return values

string —

#### deleteTable()

AbstractUtil.php : 82

Drop the selected table

`public deleteTable(string $name) : string`

##### Parameters

$name : string

##### Return values

string —

#### getDriver()

AbstractUtil.php : 36

Get the driver object for the current connection

`public getDriver() : DriverInterface`

##### Return values

DriverInterface —

## Search results