Abstract class defining database / table creation methods

package Query
subpackage Query

 Methods

Enable calling driver methods

__call(string $method, array $args) 

Parameters

$method

string

$args

array

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

Get database-specific sql to create a new table

create_table(string $name, array $columns, array $constraints, array $indexes) : string
abstract

Parameters

$name

string

$columns

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