Public Member Functions

MySQLConnection Class Reference

Inheritance diagram for MySQLConnection:
Collaboration diagram for MySQLConnection:

List of all members.

Public Member Functions

 connect ($connect_string, $db_user, $db_pass)
 sql_t ($sql)
 dbdelta ($queries, $execute=true, $silent=true, $doinserts=false)
 upgrade_pre ($old_version, $upgrade_path= '')
 upgrade_post ($old_version, $upgrade_path= '')

Detailed Description

Definition at line 10 of file connection.php.


Member Function Documentation

MySQLConnection::connect ( connect_string,
db_user,
db_pass 
)

Extends default connection method. It will be useful in order to allow accents and other DB-centric global commands.

Parameters:
string $connect_string a PDO connection string
string $db_user the database user name
string $db_pass the database user password
Returns:
boolean true on success, false on error

Reimplemented from DatabaseConnection.

Definition at line 21 of file connection.php.

MySQLConnection::dbdelta ( queries,
execute = true,
silent = true,
doinserts = false 
)

automatic diffing function - used for determining required database upgrades based on Owen Winkler's microwiki upgrade function

Parameters:
queries array of create table and insert statements which constitute a fresh install
(optional) execute should the queries be executed against the database or just simulated. default = true
(optional) silent silent running with no messages printed? default = true
boolean $doinserts (optional) Execute all insert queries found, default=false
Returns:
array list of updates made

Definition at line 66 of file connection.php.

MySQLConnection::sql_t ( sql  ) 

Database specific SQL translation function, loosely modelled on the internationalization _t() function. Call with a database independent SQL string and it will be translated to a MySQL specific SQL string.

Parameters:
$sql database independent SQL
Returns:
string translated SQL string
Todo:
Actually implement this.

Reimplemented from DatabaseConnection.

Definition at line 51 of file connection.php.

MySQLConnection::upgrade_post ( old_version,
upgrade_path = '' 
)

Run all of the upgrades slated for post-dbdelta since the last database revision.

Parameters:
integer $old_version The current version of the database that is being upgraded
Returns:
boolean True on success

Definition at line 273 of file connection.php.

MySQLConnection::upgrade_pre ( old_version,
upgrade_path = '' 
)

Run all of the upgrades slated for pre-dbdelta since the last database revision.

Parameters:
integer $old_version The current version of the database that is being upgraded
Returns:
boolean True on success

Definition at line 262 of file connection.php.


The documentation for this class was generated from the following file: