PHP 클래스 Habari\PGSQLConnection

상속: extends DatabaseConnection
파일 보기 프로젝트 열기: habari/system

공개 메소드들

메소드 설명
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