Abstract class defining database / table creation methods

package Query
subpackage Drivers

 Methods

Enable calling driver methods

__call(string $method, array $args) : mixed

Parameters

$method

string

$args

array

Returns

mixed

Save a reference to the connection object for later use

__construct(object $conn) 

Parameters

$conn

object

Return an SQL file with the database data as insert statements

backup_data() : string
abstract

Returns

string

Return an SQL file with the database table structure

backup_structure() : string
abstract

Returns

string

Convienience public function to generate sql for creating a db table

create_table(string $name, array $fields, array $constraints = array(), array $indexes = array()) : string

Parameters

$name

string

$fields

array

$constraints

array

$indexes

array

Returns

string

Get database-specific sql to drop a table

delete_table(string $name) : string
abstract

Parameters

$name

string

Returns

string

 Properties

 

Reference to the current connection object

$conn 

Default