\Query\DriverMySQL_Util

MySQL-specific backup, import and creation methods

Summary

Methods
Properties
Constants
backup_structure()
backup_data()
__construct()
__call()
create_table()
delete_table()
get_dbs()
driver_query()
get_system_tables()
get_tables()
query()
quote()
quote_ident()
quote_table()
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

$conn

$conn

Reference to the current connection object

Methods

backup_structure()

backup_structure() : string

Return an SQL file with the database table structure

Returns

string

backup_data()

backup_data() : string

Return an SQL file with the database data as insert statements

Returns

string

__construct()

__construct(\Query\Driver\Driver_Interface $conn)

Save a reference to the connection object for later use

Parameters

\Query\Driver\Driver_Interface $conn

__call()

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

Enable calling driver methods

Parameters

string $method
array $args

Returns

mixed

create_table()

create_table(string $name, array $fields, array $constraints, bool $if_not_exists) : string

Convenience public function to generate sql for creating a db table

Parameters

string $name
array $fields
array $constraints
bool $if_not_exists

Returns

string

delete_table()

delete_table(string $name) : string

Drop the selected table

Parameters

string $name

Returns

string

get_dbs()

get_dbs() : array

Returns

array

driver_query()

driver_query(string $sql, bool $filtered_index=TRUE) : mixed

Parameters

string $sql
bool $filtered_index=TRUE

Returns

mixed

get_system_tables()

get_system_tables() : array

Returns

array

get_tables()

get_tables() : array

Returns

array

query()

query(string $sql) : mixed

Parameters

string $sql

Returns

mixed

quote()

quote(string $str) : string

Parameters

string $str

Returns

string

quote_ident()

quote_ident(string $sql) : string

Parameters

string $sql

Returns

string

quote_table()

quote_table(string $sql) : string

Parameters

string $sql

Returns

string