PHP 클래스 Habari\SQLiteConnection

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

공개 메소드들

메소드 설명
connect ( $connect_string, $db_user, $db_pass ) : boolean Connect to SQLite Overrides the DatabaseConnection to return false if the SQLite file doesn't exist.
dbdelta ( $queries, $execute = true, $silent = true, $doinserts = false ) : string automatic diffing function - used for determining required database upgrades based on Owen Winkler's microwiki upgrade function
execute_procedure ( $procedure, $args = [] ) : mixed Execute a stored procedure
replace_concat ( array $matches ) : string Replaces the MySQL CONCAT function with SQLite-compatible statements
sql_t ( string $sql, array &$args ) : string 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 SQLite specific SQL string
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.

보호된 메소드들

메소드 설명
filter_fieldnames ( StdClass $row ) : string Filter out the fieldnames from whole pragma rows

메소드 상세

connect() 공개 메소드

Connect to SQLite Overrides the DatabaseConnection to return false if the SQLite file doesn't exist.
public connect ( $connect_string, $db_user, $db_pass ) : boolean
리턴 boolean True if connection succeeded, false if not.

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, $doinserts = false ) : string
리턴 string translated SQL string

execute_procedure() 공개 메소드

Execute a stored procedure
public execute_procedure ( $procedure, $args = [] ) : mixed
리턴 mixed whatever the procedure returns... Not supported with SQLite

filter_fieldnames() 보호된 메소드

Filter out the fieldnames from whole pragma rows
protected filter_fieldnames ( StdClass $row ) : string
$row StdClass A row result from a SQLite PRAGMA table_info query
리턴 string The name of the associated field

replace_concat() 공개 메소드

Replaces the MySQL CONCAT function with SQLite-compatible statements
또한 보기: SQLiteConnection::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() 공개 메소드

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 SQLite 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