|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| driver_installed () | |
| get_dbfamily () | |
| create_database ($dbhost, $dbuser, $dbpass, $dbname, array $dboptions=null) | |
| get_dbfilepath () | |
| get_tables ($usecache=true) | |
| get_indexes ($table) | |
| get_columns ($table, $usecache=true) | |
| delete_records ($table, array $conditions=null) | |
| sql_concat () | |
| sql_concat_join ($separator="' '", $elements=array()) | |
| sql_bitxor ($int1, $int2) | |
Protected Member Functions | |
| get_dbtype () | |
| configure_dbconnection () | |
| get_dsn () | |
| normalise_value ($column, $value) | |
| get_limit_clauses ($sql, $limitfrom=0, $limitnum=0) | |
Protected Attributes | |
| $database_file_extension = '.sq3.php' | |
Experimental pdo database class
Definition at line 35 of file sqlite3_pdo_moodle_database.php.
| configure_dbconnection | ( | ) | [protected] |
Reimplemented from pdo_moodle_database.
Definition at line 67 of file sqlite3_pdo_moodle_database.php.
| create_database | ( | $ | dbhost, |
| $ | dbuser, | ||
| $ | dbpass, | ||
| $ | dbname, | ||
| array $ | dboptions = null |
||
| ) |
Attempt to create the database
| string | $dbhost | |
| string | $dbuser | |
| string | $dbpass | |
| string | $dbname |
Reimplemented from moodle_database.
Definition at line 88 of file sqlite3_pdo_moodle_database.php.

| delete_records | ( | $ | table, |
| array $ | conditions = null |
||
| ) |
Delete the records from a table where all the given conditions met. If conditions not specified, table is truncated.
| string | $table | the table to delete from. |
| array | $conditions | optional array $fieldname=>requestedvalue with AND in between |
Reimplemented from moodle_database.
Definition at line 334 of file sqlite3_pdo_moodle_database.php.
| driver_installed | ( | ) |
Detects if all needed PHP stuff installed. Note: can be used before connect()
Reimplemented from moodle_database.
Definition at line 42 of file sqlite3_pdo_moodle_database.php.
| get_columns | ( | $ | table, |
| $ | usecache = true |
||
| ) |
Returns detailed information about columns in table. This information is cached internally.
| string | $table | name |
| bool | $usecache |
Reimplemented from moodle_database.
Definition at line 193 of file sqlite3_pdo_moodle_database.php.

| get_dbfamily | ( | ) |
Returns database family type - describes SQL dialect Note: can be used before connect()
Reimplemented from moodle_database.
Definition at line 54 of file sqlite3_pdo_moodle_database.php.
| get_dbfilepath | ( | ) |
Returns the file path for the database file, computed from dbname and/or dboptions. If dboptions['file'] is set, then it is used (use :memory: for in memory database); else if dboptions['path'] is set, then the file will be <dboptions path>="">/<dbname>.sq3.php; else if dbhost is set and not localhost, then the file will be <dbhost>/<dbname>.sq3.php; else the file will be <moodle data="" path>="">/<dbname>.sq3.php
Definition at line 116 of file sqlite3_pdo_moodle_database.php.

| get_dbtype | ( | ) | [protected] |
Returns more specific database driver type Note: can be used before connect()
Reimplemented from moodle_database.
Definition at line 63 of file sqlite3_pdo_moodle_database.php.
| get_dsn | ( | ) | [protected] |
Returns the driver-dependent DSN for PDO based on members stored by connect. Must be called after connect (or after $dbname, $dbhost, etc. members have been set).
Reimplemented from pdo_moodle_database.
Definition at line 104 of file sqlite3_pdo_moodle_database.php.
| get_indexes | ( | $ | table | ) |
Return table indexes - everything lowercased
Reimplemented from moodle_database.
Definition at line 161 of file sqlite3_pdo_moodle_database.php.

| get_limit_clauses | ( | $ | sql, |
| $ | limitfrom = 0, |
||
| $ | limitnum = 0 |
||
| ) | [protected] |
Returns the sql statement with clauses to append used to limit a recordset range.
| string | $sql | the SQL statement to limit. |
| int | $limitfrom | return a subset of records, starting at this point (optional, required if $limitnum is set). |
| int | $limitnum | return a subset comprising this many records (optional, required if $limitfrom is set). |
Definition at line 316 of file sqlite3_pdo_moodle_database.php.
| get_tables | ( | $ | usecache = true | ) |
Return tables in database WITHOUT current prefix
Reimplemented from moodle_database.
Definition at line 138 of file sqlite3_pdo_moodle_database.php.

| normalise_value | ( | $ | column, |
| $ | value | ||
| ) | [protected] |
Normalise values based in RDBMS dependencies (booleans, LOBs...)
| database_column_info | $column | column metadata corresponding with the value we are going to normalise |
| mixed | $value | value we are going to normalise |
Reimplemented from moodle_database.
Definition at line 305 of file sqlite3_pdo_moodle_database.php.
| sql_bitxor | ( | $ | int1, |
| $ | int2 | ||
| ) |
Returns the SQL text to be used in order to perform one bitwise XOR operation between 2 integers.
| integer | int1 first integer in the operation |
| integer | int2 second integer in the operation |
Reimplemented from moodle_database.
Definition at line 381 of file sqlite3_pdo_moodle_database.php.
| sql_concat | ( | ) |
Returns the proper SQL to do CONCAT between the elements passed Can take many parameters
| string | $element |
Reimplemented from pdo_moodle_database.
Definition at line 349 of file sqlite3_pdo_moodle_database.php.
| sql_concat_join | ( | $ | separator = "' '", |
| $ | elements = array() |
||
| ) |
Returns the proper SQL to do CONCAT between the elements passed with a given separator
| string | $separator | |
| array | $elements |
Reimplemented from pdo_moodle_database.
Definition at line 362 of file sqlite3_pdo_moodle_database.php.
$database_file_extension = '.sq3.php' [protected] |
Definition at line 36 of file sqlite3_pdo_moodle_database.php.