ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
MySQL Database Wrapper. More...
Public Member Functions | ||||||||||
supportsSlave () | ||||||||||
Supports slave. More... | ||||||||||
setDBSlaveActive ($a_val) | ||||||||||
Set slave active. More... | ||||||||||
getDBSlaveActive () | ||||||||||
Get slave active. More... | ||||||||||
setDBSlaveUser ($a_user) | ||||||||||
Set slave database user. More... | ||||||||||
getDBSlaveUser () | ||||||||||
Get slave database user. More... | ||||||||||
setDBSlavePort ($a_port) | ||||||||||
Set slave database port. More... | ||||||||||
getDBSlavePort () | ||||||||||
Get slave database port. More... | ||||||||||
setDBSlaveHost ($a_host) | ||||||||||
Set slave database host. More... | ||||||||||
getDBSlaveHost () | ||||||||||
Get slave database host. More... | ||||||||||
setDBSlavePassword ($a_password) | ||||||||||
Set slave database password. More... | ||||||||||
getDBSlavePassword () | ||||||||||
Get slave database password. More... | ||||||||||
setDBSlaveName ($a_name) | ||||||||||
Set slave database name. More... | ||||||||||
getDBSlaveName () | ||||||||||
Get slave database name. More... | ||||||||||
getDSN () | ||||||||||
Get DSN. More... | ||||||||||
getSlaveDSN () | ||||||||||
Get slave DSN. More... | ||||||||||
getHostDSN () | ||||||||||
Get Host DSN. More... | ||||||||||
getDBType () | ||||||||||
Get DB Type. More... | ||||||||||
setStorageEngine ($a_storage_engine) | ||||||||||
Set the storage engine. More... | ||||||||||
initFromIniFile ($tmpClientIniFile=null) | ||||||||||
Init db parameters from ini file. More... | ||||||||||
doConnect () | ||||||||||
Standard way to connect to db. More... | ||||||||||
initConnection () | ||||||||||
Initialize the database connection. More... | ||||||||||
now () | ||||||||||
now() More... | ||||||||||
getDBVersion () | ||||||||||
get mysql version More... | ||||||||||
isMysql4_0OrHigher () | ||||||||||
check wether current MySQL server is version 4.0.x or higher More... | ||||||||||
isMysql4_1 () | ||||||||||
check wether current MySQL server is version 4.1.x More... | ||||||||||
isMysql4_1OrHigher () | ||||||||||
check wether current MySQL server is version 4.1.x or higher More... | ||||||||||
isMysql5_6OrHigher () | ||||||||||
check wether current MySQL server is version 5.6.x or higher More... | ||||||||||
checkQuerySize ($a_query) | ||||||||||
Check query size. More... | ||||||||||
supportsFulltext () | ||||||||||
Is fulltext index supported? More... | ||||||||||
addFulltextIndex ($a_table, $a_fields, $a_name="in") | ||||||||||
Add fulltext index. More... | ||||||||||
dropFulltextIndex ($a_table, $a_name) | ||||||||||
Add fulltext index. More... | ||||||||||
isFulltextIndex ($a_table, $a_name) | ||||||||||
Is index a fulltext index? More... | ||||||||||
lockTables ($a_tables) | ||||||||||
Lock table. More... | ||||||||||
unlockTables () | ||||||||||
Unlock tables. More... | ||||||||||
getErrorNo () | ||||||||||
getLastError () | ||||||||||
query ($sql, $a_handle_error=true) | ||||||||||
loadModule ($module) | ||||||||||
getStorageEngine () | ||||||||||
groupConcat ($a_field_name, $a_seperator=",", $a_order=null) | ||||||||||
| ||||||||||
Public Member Functions inherited from ilDB | ||||||||||
setDBUser ($a_user) | ||||||||||
Set database user. More... | ||||||||||
getDBUser () | ||||||||||
Get database user. More... | ||||||||||
setDBPort ($a_port) | ||||||||||
Set database port. More... | ||||||||||
getDBPort () | ||||||||||
Get database port. More... | ||||||||||
setDBHost ($a_host) | ||||||||||
Set database host. More... | ||||||||||
getDBHost () | ||||||||||
Get database host. More... | ||||||||||
setDBPassword ($a_password) | ||||||||||
Set database password. More... | ||||||||||
getDBPassword () | ||||||||||
Get database password. More... | ||||||||||
setDBName ($a_name) | ||||||||||
Set database name. More... | ||||||||||
getDBName () | ||||||||||
Get database name. More... | ||||||||||
getDSN () | ||||||||||
Get DSN. More... | ||||||||||
getDBVersion () | ||||||||||
Get DB version. More... | ||||||||||
getDBType () | ||||||||||
Get DSN. More... | ||||||||||
enableResultBuffering ($a_status) | ||||||||||
En/disable result buffering. More... | ||||||||||
initFromIniFile ($tmpClientIniFile=null) | ||||||||||
Init db parameters from ini file. More... | ||||||||||
connect ($a_return_false_for_error=false) | ||||||||||
Open the connection. More... | ||||||||||
doConnect () | ||||||||||
Standard way to connect to db. More... | ||||||||||
disconnect () | ||||||||||
Disconnect. More... | ||||||||||
getHostDSN () | ||||||||||
Should return a valid value, if host connections are possible (connectHost) to create a new database from scratch. More... | ||||||||||
connectHost () | ||||||||||
Sets up a host connection only (no specific database used). More... | ||||||||||
supportsFulltext () | ||||||||||
supportsSlave () | ||||||||||
Supports slave. More... | ||||||||||
supports ($feature) | ||||||||||
supportsTransactions () | ||||||||||
useSlave ($a_val=true) | ||||||||||
Use slave. More... | ||||||||||
handleError ($a_res, $a_info="", $a_level="") | ||||||||||
Handle MDB2 Errors. More... | ||||||||||
raisePearError ($a_message, $a_level="") | ||||||||||
Raise an error. More... | ||||||||||
createDatabase ($a_name, $a_charset="utf8", $a_collation="") | ||||||||||
Create database. More... | ||||||||||
createTable ( $a_name, $a_definition_array, $a_drop_table=false, $a_ignore_erros=false) | ||||||||||
Create a new table in the database. More... | ||||||||||
dropTable ($a_name, $a_error_if_not_existing=true) | ||||||||||
Drop a table. More... | ||||||||||
alterTable ($a_name, $a_changes) | ||||||||||
Alter a table in the database This method is DEPRECATED, see http://www.ilias.de/docu/goto.php?target=pg_25354_42&client_id=docu PLEASE USE THE SPECIALIZED METHODS OF THIS CLASS TO CHANGE THE DB SCHEMA. More... | ||||||||||
addTableColumn ($a_table, $a_column, $a_attributes) | ||||||||||
Add table column Use this only on aleady "abstracted" tables. More... | ||||||||||
dropTableColumn ($a_table, $a_column) | ||||||||||
Drop table column Use this only on aleady "abstracted" tables. More... | ||||||||||
modifyTableColumn ($a_table, $a_column, $a_attributes) | ||||||||||
Modify a table column Use this only on aleady "abstracted" tables. More... | ||||||||||
renameTableColumn ($a_table, $a_column, $a_new_column) | ||||||||||
Rename a table column Use this only on aleady "abstracted" tables. More... | ||||||||||
renameTable ($a_name, $a_new_name) | ||||||||||
Rename a table. More... | ||||||||||
addPrimaryKey ($a_table, $a_fields) | ||||||||||
Add a primary key to a table. More... | ||||||||||
getPrimaryKeyIdentifier () | ||||||||||
Primary key identifier. More... | ||||||||||
dropPrimaryKey ($a_table) | ||||||||||
Drop a primary key from a table. More... | ||||||||||
addFulltextIndex ($a_table, $a_fields, $a_name="in") | ||||||||||
Add fulltext index. More... | ||||||||||
isFulltextIndex ($a_table, $a_name) | ||||||||||
Is index a fulltext index? More... | ||||||||||
indexExistsByFields ($a_table, $a_fields) | ||||||||||
Check if index exists. More... | ||||||||||
dropIndexByFields ($a_table, $a_fields) | ||||||||||
Drop index by field(s) More... | ||||||||||
dropIndex ($a_table, $a_name="in") | ||||||||||
Drop an index from a table. More... | ||||||||||
addUniqueConstraint ($a_table, $a_fields, $a_name="con") | ||||||||||
Add a unique constraint to a table. More... | ||||||||||
dropUniqueConstraint ($a_table, $a_name="con") | ||||||||||
Drop a constraint from a table. More... | ||||||||||
dropUniqueConstraintByFields ($a_table, $a_fields) | ||||||||||
Drop constraint by field(s) More... | ||||||||||
createSequence ($a_table_name, $a_start=1) | ||||||||||
Create a sequence for a table. More... | ||||||||||
dropSequence ($a_table_name) | ||||||||||
Drop a sequence for a table. More... | ||||||||||
checkTableName ($a_name) | ||||||||||
Check whether a table name is valid. More... | ||||||||||
checkTableColumns ($a_cols) | ||||||||||
Check table columns definition. More... | ||||||||||
checkColumn ($a_col, $a_def) | ||||||||||
Check column definition. More... | ||||||||||
checkColumnDefinition ($a_def, $a_modify_mode=false) | ||||||||||
Check whether a column definition is valid. More... | ||||||||||
checkColumnName ($a_name) | ||||||||||
Check whether a column name is valid. More... | ||||||||||
checkIndexName ($a_name) | ||||||||||
Check whether an index name is valid. More... | ||||||||||
getAllowedAttributes () | ||||||||||
constraintName ($a_table, $a_constraint) | ||||||||||
Determine contraint name by table name and constraint name. More... | ||||||||||
query ($sql, $a_handle_error=true) | ||||||||||
Query. More... | ||||||||||
queryF ($a_query, $a_types, $a_values) | ||||||||||
Formatted query (for SELECTS). More... | ||||||||||
manipulateF ($a_query, $a_types, $a_values) | ||||||||||
Formatted manupulate (for DELETE, UPDATE, INSERT). More... | ||||||||||
logStatement ($sql) | ||||||||||
Helper function, should usually not be called. More... | ||||||||||
setLimit ($a_limit, $a_offset=0) | ||||||||||
Set limit and offset for a query. More... | ||||||||||
nextId ($a_table_name) | ||||||||||
Get next ID for an index. More... | ||||||||||
manipulate ($sql) | ||||||||||
Data manipulation. More... | ||||||||||
prepare ($a_query, $a_types=null, $a_result_types=null) | ||||||||||
Prepare a query (SELECT) statement to be used with execute. More... | ||||||||||
prepareManip ($a_query, $a_types=null) | ||||||||||
Prepare a data manipulation statement to be used with execute. More... | ||||||||||
execute ($a_stmt, $a_data=null) | ||||||||||
Execute a query statement prepared by either prepare() or prepareManip() More... | ||||||||||
executeMultiple ($a_stmt, $a_data) | ||||||||||
Execute a query statement prepared by either prepare() or prepareManip() with multiple data arrays. More... | ||||||||||
insert ($a_table, $a_columns) | ||||||||||
Convenient method for standard insert statements, example field array: More... | ||||||||||
update ($a_table, $a_columns, $a_where) | ||||||||||
Convenient method for standard update statements, example field array: More... | ||||||||||
replace ($a_table, $a_pk_columns, $a_other_columns) | ||||||||||
Replace into method. More... | ||||||||||
fetchAssoc ($a_set) | ||||||||||
Fetch row as associative array from result set. More... | ||||||||||
free ($a_st) | ||||||||||
Free a statement / result set. More... | ||||||||||
fetchObject ($a_set) | ||||||||||
Fetch row as object from result set. More... | ||||||||||
numRows ($a_set) | ||||||||||
Fetch row as associative array from result set. More... | ||||||||||
in ($a_field, $a_values, $negate=false, $a_type="") | ||||||||||
Get abstract in-clause for given array. More... | ||||||||||
addTypesToArray ($a_arr, $a_type, $a_cnt) | ||||||||||
Adds a type x times to an array. More... | ||||||||||
now () | ||||||||||
now() More... | ||||||||||
concat (array $a_values, $a_allow_null=true) | ||||||||||
Abstraction of SQL function CONCAT. More... | ||||||||||
substr ($a_exp, $a_pos=1, $a_len=-1) | ||||||||||
Substring. More... | ||||||||||
upper ($a_exp) | ||||||||||
Upper. More... | ||||||||||
lower ($a_exp) | ||||||||||
Upper. More... | ||||||||||
locate ($a_needle, $a_string, $a_start_pos=1) | ||||||||||
Create locate string. More... | ||||||||||
like ($a_col, $a_type, $a_value="?", $case_insensitive=true) | ||||||||||
Like. More... | ||||||||||
equals ($a_col, $a_value, $a_type, $a_empty_or_null=false) | ||||||||||
Use this only on text fields. More... | ||||||||||
equalsNot ($a_col, $a_value, $a_type, $a_empty_or_null=false) | ||||||||||
Use this only on text fields. More... | ||||||||||
fromUnixtime ($a_expr, $a_to_text=true) | ||||||||||
fromUnixtime (makes timestamp out of unix timestamp) More... | ||||||||||
unixTimestamp () | ||||||||||
Unix timestamp. More... | ||||||||||
tableExists ($a_table) | ||||||||||
Check, whether a given table exists. More... | ||||||||||
tableColumnExists ($a_table, $a_column_name) | ||||||||||
Checks for the existence of a table column. More... | ||||||||||
uniqueConstraintExists ($a_table, array $a_fields) | ||||||||||
Checks if a unique constraint exists based on the fields of the unique constraint (not the name) More... | ||||||||||
listTables () | ||||||||||
Get all tables. More... | ||||||||||
sequenceExists ($a_sequence) | ||||||||||
Check, whether a given sequence exists. More... | ||||||||||
listSequences () | ||||||||||
Get all sequences. More... | ||||||||||
quote ($a_query, $a_type=null) | ||||||||||
Wrapper for quote method. More... | ||||||||||
quoteIdentifier ($a_identifier, $check_option=false) | ||||||||||
Quote table and field names. More... | ||||||||||
beginTransaction () | ||||||||||
Begin Transaction. More... | ||||||||||
commit () | ||||||||||
Commit a transaction. More... | ||||||||||
rollback () | ||||||||||
Rollback a transaction. More... | ||||||||||
lockTables ($a_tables) | ||||||||||
Abstraction of lock table. More... | ||||||||||
unlockTables () | ||||||||||
Unlock tables locked by previous lock table calls. More... | ||||||||||
autoExecute ($a_tablename, $a_fields, $a_mode=MDB2_AUTOQUERY_INSERT, $a_where=false) | ||||||||||
Wrapper for Pear autoExecute. More... | ||||||||||
getLastInsertId () | ||||||||||
Get last insert id. More... | ||||||||||
getOne ($sql) | ||||||||||
getOne. More... | ||||||||||
getRow ($sql, $mode=ilDBConstants::FETCHMODE_OBJECT) | ||||||||||
getRow. More... | ||||||||||
setSubType ($a_value) | ||||||||||
Set sub type. More... | ||||||||||
getSubType () | ||||||||||
Get sub type. More... | ||||||||||
migrateAllTablesToEngine ($engine=ilDBConstants::MYSQL_ENGINE_INNODB) | ||||||||||
supportsEngineMigration () | ||||||||||
getSequenceName ($table_name) | ||||||||||
buildAtomQuery () | ||||||||||
sanitizeMB4StringIfNotSupported ($query) | ||||||||||
| ||||||||||
doesCollationSupportMB4Strings () | ||||||||||
cast ($a_field_name, $a_dest_type) | ||||||||||
Public Member Functions inherited from PEAR | ||||||||||
__construct ($error_class=null) | ||||||||||
Constructor. More... | ||||||||||
_PEAR () | ||||||||||
Destructor (the emulated type of...). More... | ||||||||||
registerShutdownFunc ($func, $args=array()) | ||||||||||
Use this function to register a shutdown method for static classes. More... | ||||||||||
isError ($data, $code=null) | ||||||||||
Tell whether a value is a PEAR error. More... | ||||||||||
expectError ($code=' *') | ||||||||||
This method is used to tell which errors you expect to get. More... | ||||||||||
popExpect () | ||||||||||
This method pops one element off the expected error codes stack. More... | ||||||||||
_checkDelExpect ($error_code) | ||||||||||
This method checks unsets an error code if available. More... | ||||||||||
delExpect ($error_code) | ||||||||||
This method deletes all occurences of the specified element from the expected error codes stack. More... | ||||||||||
& | raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) | |||||||||
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. More... | ||||||||||
& | throwError ($message=null, $code=null, $userinfo=null) | |||||||||
Simpler form of raiseError with fewer options. More... | ||||||||||
staticPushErrorHandling ($mode, $options=null) | ||||||||||
staticPopErrorHandling () | ||||||||||
pushErrorHandling ($mode, $options=null) | ||||||||||
Push a new error handler on top of the error handler options stack. More... | ||||||||||
popErrorHandling () | ||||||||||
Pop the last error handler used. More... | ||||||||||
loadExtension ($ext) | ||||||||||
OS independant PHP extension load. More... | ||||||||||
Public Member Functions inherited from ilDBInterface | ||||||||||
query ($query) | ||||||||||
Run a (read-only) Query on the database. More... | ||||||||||
fetchAll ($query_result, $fetch_mode=ilDBConstants::FETCHMODE_ASSOC) | ||||||||||
addIndex ($table_name, $fields, $index_name='', $fulltext=false) | ||||||||||
substr ($a_exp) | ||||||||||
Static Public Member Functions | |
static | getReservedWords () |
Get reserved words. More... | |
Static Public Member Functions inherited from ilDB | |
static | getReservedWords () |
Get reserved words. More... | |
static | isDbError ($a_res) |
Check error. More... | |
static | isReservedWord ($a_word) |
Checks whether a word is a reserved word in one of the supported databases. More... | |
Static Public Member Functions inherited from PEAR | |
static & | getStaticProperty ($class, $var) |
If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. More... | |
static | setErrorHandling ($mode=null, $options=null) |
Sets how errors generated by this object should be handled. More... | |
Data Fields | |
$max_allowed_packet_size | |
Data Fields inherited from ilDB | |
const | LOCK_WRITE = 1 |
const | LOCK_READ = 2 |
$error_class | |
$db | |
$result | |
$allowed_attributes | |
$sub_type | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() | |
Protected Member Functions | |
__buildDSN ($a_host, $a_name, $a_user, $a_pass, $a_port="") | |
Build DSN string. More... | |
isMySQLi () | |
setMaxAllowedPacket () | |
Set maximum allowed packet size. More... | |
getCreateTableOptions () | |
Protected Member Functions inherited from ilDB | |
initConnection () | |
Initialize the database connection. More... | |
initHostConnection () | |
Initialize the host connection (no specific database) More... | |
loadMDB2Extensions () | |
load additional mdb2 extensions and set their constants More... | |
getCreateTableOptions () | |
Get options for the create table statement. More... | |
Protected Attributes | |
$slave_active = false | |
$use_slave = false | |
MySQL Database Wrapper.
This class extends the main ILIAS database wrapper ilDB. Only a few methods should be overwritten, that contain MySQL specific statements and methods.
Definition at line 18 of file class.ilDBMySQL.php.
|
protected |
Build DSN string.
Definition at line 193 of file class.ilDBMySQL.php.
References isMySQLi().
Referenced by getDSN(), and getSlaveDSN().
ilDBMySQL::addFulltextIndex | ( | $a_table, | |
$a_fields, | |||
$a_name = "in" |
|||
) |
Add fulltext index.
Implements ilDBInterface.
Definition at line 494 of file class.ilDBMySQL.php.
References ilDB\constraintName(), and query().
ilDBMySQL::checkQuerySize | ( | $a_query | ) |
ilDBMySQL::doConnect | ( | ) |
Standard way to connect to db.
Definition at line 320 of file class.ilDBMySQL.php.
References array, MDB2\connect(), getDBSlaveActive(), and getSlaveDSN().
ilDBMySQL::dropFulltextIndex | ( | $a_table, | |
$a_name | |||
) |
Add fulltext index.
Implements ilDBInterface.
Definition at line 505 of file class.ilDBMySQL.php.
References ilDB\constraintName(), and query().
|
protected |
ilDBMySQL::getDBSlaveActive | ( | ) |
Get slave active.
Definition at line 54 of file class.ilDBMySQL.php.
References $slave_active.
Referenced by doConnect(), and query().
ilDBMySQL::getDBSlaveHost | ( | ) |
Get slave database host.
string | slave database host |
Definition at line 114 of file class.ilDBMySQL.php.
Referenced by getSlaveDSN().
ilDBMySQL::getDBSlaveName | ( | ) |
Get slave database name.
string | slave database name |
Definition at line 154 of file class.ilDBMySQL.php.
Referenced by getSlaveDSN().
ilDBMySQL::getDBSlavePassword | ( | ) |
Get slave database password.
string | slave database password |
Definition at line 134 of file class.ilDBMySQL.php.
Referenced by getSlaveDSN().
ilDBMySQL::getDBSlavePort | ( | ) |
Get slave database port.
string | slave database port |
Definition at line 94 of file class.ilDBMySQL.php.
Referenced by getSlaveDSN().
ilDBMySQL::getDBSlaveUser | ( | ) |
Get slave database user.
string | slave database user |
Definition at line 74 of file class.ilDBMySQL.php.
Referenced by getSlaveDSN().
ilDBMySQL::getDBType | ( | ) |
ilDBMySQL::getDBVersion | ( | ) |
get mysql version
Definition at line 364 of file class.ilDBMySQL.php.
References isMySQLi().
Referenced by isMysql4_0OrHigher(), isMysql4_1(), isMysql4_1OrHigher(), isMysql5_6OrHigher(), and setMaxAllowedPacket().
ilDBMySQL::getDSN | ( | ) |
Get DSN.
Implements ilDBInterface.
Definition at line 162 of file class.ilDBMySQL.php.
References __buildDSN(), ilDB\getDBHost(), ilDB\getDBName(), ilDB\getDBPassword(), ilDB\getDBPort(), and ilDB\getDBUser().
ilDBMySQL::getErrorNo | ( | ) |
Definition at line 591 of file class.ilDBMySQL.php.
References isMySQLi().
ilDBMySQL::getHostDSN | ( | ) |
Get Host DSN.
Definition at line 214 of file class.ilDBMySQL.php.
References ilDB\getDBPassword(), ilDB\getDBUser(), and isMySQLi().
ilDBMySQL::getLastError | ( | ) |
Definition at line 600 of file class.ilDBMySQL.php.
References isMySQLi().
|
static |
Get reserved words.
Implements ilDBInterface.
Definition at line 242 of file class.ilDBMySQL.php.
References array.
ilDBMySQL::getSlaveDSN | ( | ) |
Get slave DSN.
Definition at line 176 of file class.ilDBMySQL.php.
References __buildDSN(), getDBSlaveHost(), getDBSlaveName(), getDBSlavePassword(), getDBSlavePort(), and getDBSlaveUser().
Referenced by doConnect().
ilDBMySQL::getStorageEngine | ( | ) |
ilDBMySQL::groupConcat | ( | $a_field_name, | |
$a_seperator = "," , |
|||
$a_order = null |
|||
) |
string | $a_field_name | |
string | $a_seperator | |
string | $a_order |
Implements ilDBInterface.
Definition at line 648 of file class.ilDBMySQL.php.
References ilDB\quote().
ilDBMySQL::initConnection | ( | ) |
Initialize the database connection.
Definition at line 335 of file class.ilDBMySQL.php.
References query(), setMaxAllowedPacket(), and setStorageEngine().
ilDBMySQL::initFromIniFile | ( | $tmpClientIniFile = null | ) |
Init db parameters from ini file.
$tmpClientIniFile | overwrite global client ini file if is set to an object |
Implements ilDBInterface.
Definition at line 292 of file class.ilDBMySQL.php.
References setDBSlaveActive(), setDBSlaveHost(), setDBSlaveName(), setDBSlavePassword(), setDBSlavePort(), and setDBSlaveUser().
ilDBMySQL::isFulltextIndex | ( | $a_table, | |
$a_name | |||
) |
Is index a fulltext index?
Implements ilDBInterface.
Definition at line 514 of file class.ilDBMySQL.php.
References ilDB\fetchAssoc(), and query().
ilDBMySQL::isMysql4_0OrHigher | ( | ) |
check wether current MySQL server is version 4.0.x or higher
Definition at line 381 of file class.ilDBMySQL.php.
References $version, and getDBVersion().
ilDBMySQL::isMysql4_1 | ( | ) |
check wether current MySQL server is version 4.1.x
Definition at line 393 of file class.ilDBMySQL.php.
References $version, and getDBVersion().
ilDBMySQL::isMysql4_1OrHigher | ( | ) |
check wether current MySQL server is version 4.1.x or higher
NOTE: Two sourcecodes use this or a similar handling:
Definition at line 410 of file class.ilDBMySQL.php.
References $version, and getDBVersion().
ilDBMySQL::isMysql5_6OrHigher | ( | ) |
check wether current MySQL server is version 5.6.x or higher
NOTE: Two sourcecodes use this or a similar handling:
Definition at line 428 of file class.ilDBMySQL.php.
References $version, and getDBVersion().
Referenced by setStorageEngine().
|
protected |
Definition at line 206 of file class.ilDBMySQL.php.
References ilDB\getSubType().
Referenced by __buildDSN(), getDBVersion(), getErrorNo(), getHostDSN(), and getLastError().
ilDBMySQL::loadModule | ( | $module | ) |
$module |
Implements ilDBInterface.
Definition at line 633 of file class.ilDBMySQL.php.
References $module.
ilDBMySQL::lockTables | ( | $a_tables | ) |
Lock table.
E.g $ilDB->lockTable('tree',ilDBConstants::LOCK_WRITE,'t1')
array | $a_tables | |
int | $a_mode | |
string | $a_alias |
Implements ilDBInterface.
Definition at line 534 of file class.ilDBMySQL.php.
References $counter, $ilLog, $table, ilDBConstants\LOCK_READ, ilDBConstants\LOCK_WRITE, and query().
ilDBMySQL::now | ( | ) |
Implements ilDBInterface.
Definition at line 355 of file class.ilDBMySQL.php.
ilDBMySQL::query | ( | $sql, | |
$a_handle_error = true |
|||
) |
Definition at line 613 of file class.ilDBMySQL.php.
References $r, getDBSlaveActive(), and ilDB\handleError().
Referenced by addFulltextIndex(), dropFulltextIndex(), ilDBInnoDB\initConnection(), initConnection(), isFulltextIndex(), lockTables(), setMaxAllowedPacket(), setStorageEngine(), and unlockTables().
ilDBMySQL::setDBSlaveActive | ( | $a_val | ) |
Set slave active.
bool | $a_val | slave active |
Definition at line 44 of file class.ilDBMySQL.php.
Referenced by initFromIniFile().
ilDBMySQL::setDBSlaveHost | ( | $a_host | ) |
Set slave database host.
string | slave database host |
Definition at line 104 of file class.ilDBMySQL.php.
Referenced by initFromIniFile().
ilDBMySQL::setDBSlaveName | ( | $a_name | ) |
Set slave database name.
string | slave database name |
Definition at line 144 of file class.ilDBMySQL.php.
Referenced by initFromIniFile().
ilDBMySQL::setDBSlavePassword | ( | $a_password | ) |
Set slave database password.
string | slave database password |
Definition at line 124 of file class.ilDBMySQL.php.
Referenced by initFromIniFile().
ilDBMySQL::setDBSlavePort | ( | $a_port | ) |
Set slave database port.
string | slave database port |
Definition at line 84 of file class.ilDBMySQL.php.
Referenced by initFromIniFile().
ilDBMySQL::setDBSlaveUser | ( | $a_user | ) |
Set slave database user.
string | slave database user |
Definition at line 64 of file class.ilDBMySQL.php.
Referenced by initFromIniFile().
|
protected |
Set maximum allowed packet size.
todo@: This is MySQL specific and should go to a MySQL specific class.
Definition at line 458 of file class.ilDBMySQL.php.
References $query, $res, $row, $version, ilDBConstants\FETCHMODE_OBJECT, getDBVersion(), query(), and ilDB\substr().
Referenced by ilDBInnoDB\initConnection(), and initConnection().
ilDBMySQL::setStorageEngine | ( | $a_storage_engine | ) |
Set the storage engine.
Implements ilDBInterface.
Definition at line 233 of file class.ilDBMySQL.php.
References isMysql5_6OrHigher(), and query().
Referenced by ilDBInnoDB\initConnection(), and initConnection().
ilDBMySQL::supportsFulltext | ( | ) |
Is fulltext index supported?
Implements ilDBInterface.
Definition at line 486 of file class.ilDBMySQL.php.
ilDBMySQL::supportsSlave | ( | ) |
Supports slave.
Implements ilDBInterface.
Definition at line 34 of file class.ilDBMySQL.php.
ilDBMySQL::unlockTables | ( | ) |
Unlock tables.
Implements ilDBInterface.
Definition at line 580 of file class.ilDBMySQL.php.
References query().
ilDBMySQL::$max_allowed_packet_size |
Definition at line 24 of file class.ilDBMySQL.php.
|
protected |
Definition at line 25 of file class.ilDBMySQL.php.
Referenced by getDBSlaveActive().
|
protected |
Definition at line 26 of file class.ilDBMySQL.php.