\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

Properties

Methods

__construct()

__construct(\Query\Drivers\DriverInterface  $conn) 

Save a reference to the connection object for later use

Parameters

\Query\Drivers\DriverInterface $conn

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

deleteTable()

deleteTable(string  $name) : string

Drop the selected table

Parameters

string $name

Returns

string

backupStructure()

backupStructure() : string

Return an SQL file with the database table structure

Returns

string

backupData()

backupData() : string

Return an SQL file with the database data as insert statements

Returns

string

quoteIdent()

quoteIdent(string  $sql) : string

Parameters

string $sql

Returns

string

quoteTable()

quoteTable(string  $sql) : string

Parameters

string $sql

Returns

string