# \Query\DriversAbstractUtil

Abstract class defining database / table creation methods

## Summary

Methods
Properties
Constants
__construct()
getDriver()
createTable()
deleteTable()
backupStructure()
backupData()
quoteIdent()
quoteTable()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$conn
N/A
abstract

File
  Query/Drivers/AbstractUtil.php
Package
  Default
Class hierarchy
  \Query\Drivers\AbstractUtil

## Tags

None found

## Properties

### $conn

    $conn : \Query\Drivers\DriverInterface

Reference to the current connection object

#### Type

\Query\Drivers\DriverInterface

#

## Tags

None found

## Methods

### __construct()

    __construct(\Query\Drivers\DriverInterface  $conn)

Save a reference to the connection object for later use

#### Parameters

\Query\Drivers\DriverInterface | $conn |

#

## Tags

None found

### getDriver()

    getDriver() : \Query\Drivers\DriverInterface

Get the driver object for the current connection

#### Returns

\Query\Drivers\DriverInterface

#

## Tags

None found

### createTable()

    createTable(string  $name, array  $fields, array  $constraints = array(), boolean  $ifNotExists = TRUE) : string

Convenience public function to generate sql for creating a db table

#### Parameters

string | $name |
array | $fields |
array | $constraints |
boolean | $ifNotExists |

#### Returns

string

#

## Tags

None found

### deleteTable()

    deleteTable(string  $name) : string

Drop the selected table

#### Parameters

string | $name |

#### Returns

string

#

## Tags

None found

### backupStructure()

    backupStructure() : string

Return an SQL file with the database table structure

#### Returns

string

#

abstract

## Tags

None found

### backupData()

    backupData() : string

Return an SQL file with the database data as insert statements

#### Returns

string

#

abstract

## Tags

None found

### quoteIdent()

    quoteIdent(string  $sql) : string

#### Parameters

string | $sql |

#### Returns

string

#

## Tags

None found

### quoteTable()

    quoteTable(string  $sql) : string

#### Parameters

string | $sql |

#### Returns

string

#

## Tags

None found

### AbstractUtil.php