PHP Класс Habari\PGSQLConnection

Наследование: extends DatabaseConnection
Показать файл Открыть проект

Открытые методы

Метод Описание
connect ( string $connect_string, string $db_user, string $db_pass ) : boolean Extends default connection method. It will be useful in order to allow accents and other DB-centric global commands.
dbdelta ( $queries, $execute = true, $silent = true, boolean $doinserts = false ) : array automatic diffing function - used for determining required database upgrades based on Owen Winkler's microwiki upgrade function
replace_concat ( array $matches ) : string Replaces the MySQL CONCAT function with PostgreSQL-compatible statements
sql_t ( string $sql, array &$args ) : string Database specific SQL translation function, loosely modelled on the internationalization _t() function.
upgrade_post ( integer $old_version, $upgrade_path = '' ) : boolean Run all of the upgrades slated for post-dbdelta since the last database revision.
upgrade_pre ( integer $old_version, $upgrade_path = '' ) : boolean Run all of the upgrades slated for pre-dbdelta since the last database revision.

Описание методов

connect() публичный Метод

Extends default connection method. It will be useful in order to allow accents and other DB-centric global commands.
public connect ( string $connect_string, string $db_user, string $db_pass ) : boolean
$connect_string string a PDO connection string
$db_user string the database user name
$db_pass string the database user password
Результат boolean true on success, false on error

dbdelta() публичный Метод

automatic diffing function - used for determining required database upgrades based on Owen Winkler's microwiki upgrade function
public dbdelta ( $queries, $execute = true, $silent = true, boolean $doinserts = false ) : array
$doinserts boolean (optional) Execute all insert queries found, default=false
Результат array list of updates made

replace_concat() публичный Метод

Replaces the MySQL CONCAT function with PostgreSQL-compatible statements
См. также: PGSQLConnection::sql_t()
public replace_concat ( array $matches ) : string
$matches array Matches from the regex in sql_t()
Результат string The replacement for the MySQL SQL

sql_t() публичный Метод

Call with a database independent SQL string and it will be translated to a PostgreSQL specific SQL string.
public sql_t ( string $sql, array &$args ) : string
$sql string database independent SQL
$args array An array of SQL arguments
Результат string translated SQL string

upgrade_post() публичный Метод

Run all of the upgrades slated for post-dbdelta since the last database revision.
public upgrade_post ( integer $old_version, $upgrade_path = '' ) : boolean
$old_version integer The current version of the database that is being upgraded
Результат boolean True on success

upgrade_pre() публичный Метод

Run all of the upgrades slated for pre-dbdelta since the last database revision.
public upgrade_pre ( integer $old_version, $upgrade_path = '' ) : boolean
$old_version integer The current version of the database that is being upgraded
Результат boolean True on success