ILIAS
Release_5_0_x_branch Revision 61816
|
Public Member Functions | |
__construct () | |
Constructor. | |
errorInfo ($error=null) | |
This method is used to collect information about an error. | |
beginTransaction ($savepoint=null) | |
Start a transaction or set a savepoint. | |
commit ($savepoint=null) | |
Commit the database changes done during a transaction that is in progress or release a savepoint. | |
rollback ($savepoint=null) | |
Cancel any database changes done during a transaction or since a specific savepoint that is in progress. | |
setTransactionIsolation ($isolation) | |
Set the transacton isolation level. | |
_doConnect ($username, $password, $persistent=false) | |
do the grunt work of the connect | |
connect () | |
Connect to the database. | |
disconnect ($force=true) | |
Log out and disconnect from the database. | |
& | standaloneExec ($query) |
execute a query as database administrator | |
& | standaloneQuery ($query, $types=null, $is_manip=false) |
execute a query as DBA | |
_modifyQuery ($query, $is_manip, $limit, $offset) | |
Changes a query string for various DBMS specific reasons. | |
& | _doQuery ($query, $is_manip=false, $connection=null, $database_name=null) |
Execute a query. | |
_affectedRows ($connection, $result=null) | |
Returns the number of rows affected. | |
getServerVersion ($native=false) | |
return version information about the server | |
& | prepare ($query, $types=null, $result_types=null, $lobs=array()) |
Prepares a query for multiple execution with execute(). | |
nextID ($seq_name, $ondemand=true) | |
Returns the next free id of a sequence. | |
lastInsertID ($table=null, $field=null) | |
Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence called: $table. | |
currId ($seq_name) | |
Returns the current id of a sequence. | |
Public Member Functions inherited from MDB2_Driver_Common | |
MDB2_Driver_Common () | |
PHP 4 Constructor. | |
__destruct () | |
Destructor. | |
free () | |
Free the internal references so that the instance can be destroyed. | |
__toString () | |
String conversation. | |
& | raiseError ($code=null, $mode=null, $options=null, $userinfo=null, $method=null) |
This method is used to communicate an error and invoke error callbacks etc. | |
resetWarnings () | |
reset the warning array | |
getWarnings () | |
Get all warnings in reverse order. | |
setFetchMode ($fetchmode, $object_class= 'stdClass') | |
Sets which fetch mode should be used by default on queries on this connection. | |
setOption ($option, $value) | |
set the option for the db class | |
getOption ($option) | |
Returns the value of an option. | |
debug ($message, $scope= '', $context=array()) | |
set a debug message | |
getDebugOutput () | |
output debug info | |
escape ($text, $escape_wildcards=false) | |
Quotes a string so it can be safely used in a query. | |
escapePattern ($text) | |
Quotes pattern (% and _) characters in a string) | |
quoteIdentifier ($str, $check_option=false) | |
Quote a string so it can be safely used as a table or column name. | |
getAsKeyword () | |
Gets the string to alias column. | |
getConnection () | |
Returns a native connection. | |
_fixResultArrayValues (&$row, $mode) | |
Do all necessary conversions on result arrays to fix DBMS quirks. | |
& | loadModule ($module, $property=null, $phptype_specific=null) |
loads a module | |
__call ($method, $params) | |
Calls a module method using the __call magic method. | |
inTransaction ($ignore_nested=false) | |
If a transaction is currently open. | |
setTransactionIsolation ($isolation, $options=array()) | |
Set the transacton isolation level. | |
beginNestedTransaction () | |
Start a nested transaction. | |
completeNestedTransaction ($force_rollback=false) | |
Finish a nested transaction by rolling back if an error occured or committing otherwise. | |
failNestedTransaction ($error=null, $immediately=false) | |
Force setting nested transaction to failed. | |
getNestedTransactionError () | |
The first error that occured since the transaction start. | |
setCharset ($charset, $connection=null) | |
Set the charset on the current connection. | |
setDatabase ($name) | |
Select a different database. | |
getDatabase () | |
Get the current database. | |
setDSN ($dsn) | |
set the DSN | |
getDSN ($type= 'string', $hidepw=false) | |
return the DSN as a string | |
& | exec ($query) |
Execute a manipulation query to the database and return the number of affected rows. | |
& | query ($query, $types=null, $result_class=true, $result_wrap_class=false) |
Send a query to the database and return any results. | |
& | _wrapResult ($result, $types=array(), $result_class=true, $result_wrap_class=false, $limit=null, $offset=null) |
wrap a result set into the correct class | |
setLimit ($limit, $offset=null) | |
set the range of the next query | |
subSelect ($query, $type=false) | |
simple subselect emulation: leaves the query untouched for all RDBMS that support subselects | |
replace ($table, $fields) | |
Execute a SQL REPLACE query. | |
_skipDelimitedStrings ($query, $position, $p_position) | |
Utility method, used by prepare() to avoid replacing placeholders within delimited strings. | |
quote ($value, $type=null, $quote=true, $escape_wildcards=false) | |
Convert a text value into a DBMS specific format that is suitable to compose query statements. | |
getDeclaration ($type, $name, $field) | |
Obtain DBMS specific SQL code portion needed to declare of the given type. | |
compareDefinition ($current, $previous) | |
Obtain an array of changes that may need to applied. | |
supports ($feature) | |
Tell whether a DB implementation or its backend extension supports a given feature. | |
getSequenceName ($sqn) | |
adds sequence name formatting to a sequence name | |
getIndexName ($idx) | |
adds index name formatting to a index name | |
currID ($seq_name) | |
Returns the current id of a sequence. | |
queryOne ($query, $type=null, $colnum=0) | |
Execute the specified query, fetch the value from the first column of the first row of the result set and then frees the result set. | |
queryRow ($query, $types=null, $fetchmode=MDB2_FETCHMODE_DEFAULT) | |
Execute the specified query, fetch the values from the first row of the result set into an array and then frees the result set. | |
queryCol ($query, $type=null, $colnum=0) | |
Execute the specified query, fetch the value from the first column of each row of the result set into an array and then frees the result set. | |
queryAll ($query, $types=null, $fetchmode=MDB2_FETCHMODE_DEFAULT, $rekey=false, $force_array=false, $group=false) | |
Execute the specified query, fetch all the rows of the result set into a two dimensional array and then frees the result set. | |
Public Member Functions inherited from PEAR | |
PEAR ($error_class=null) | |
Constructor. | |
_PEAR () | |
Destructor (the emulated type of...). | |
& | 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. | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. | |
setErrorHandling ($mode=null, $options=null) | |
Sets how errors generated by this object should be handled. | |
expectError ($code= '*') | |
This method is used to tell which errors you expect to get. | |
popExpect () | |
This method pops one element off the expected error codes stack. | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. | |
& | 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. | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. | |
popErrorHandling () | |
Pop the last error handler used. | |
loadExtension ($ext) | |
OS independant PHP extension load. |
MDB2_Driver_oci8::__construct | ( | ) |
Constructor.
Reimplemented from MDB2_Driver_Common.
Definition at line 69 of file oci8.php.
MDB2_Driver_oci8::_affectedRows | ( | $connection, | |
$result = null |
|||
) |
Returns the number of rows affected.
resource | $result | |
resource | $connection |
Reimplemented from MDB2_Driver_Common.
Definition at line 684 of file oci8.php.
References MDB2_Driver_Common\$connection, $result, MDB2_Driver_Common\getConnection(), and PEAR\isError().
Referenced by standaloneExec(), and standaloneQuery().
MDB2_Driver_oci8::_doConnect | ( | $username, | |
$password, | |||
$persistent = false |
|||
) |
do the grunt work of the connect
Definition at line 319 of file oci8.php.
References MDB2_Driver_Common\$connection, MDB2_Driver_Common\$database_name, $query, $result, _doQuery(), disconnect(), PEAR\isError(), PEAR\loadExtension(), MDB2_ERROR_CONNECT_FAILED, MDB2_ERROR_NOT_FOUND, MDB2_Driver_Common\raiseError(), and MDB2_Driver_Common\setCharset().
Referenced by connect(), standaloneExec(), and standaloneQuery().
& MDB2_Driver_oci8::_doQuery | ( | $query, | |
$is_manip = false , |
|||
$connection = null , |
|||
$database_name = null |
|||
) |
Execute a query.
string | $query | query |
boolean | $is_manip | if the query is a manipulation query |
resource | $connection | |
string | $database_name |
Reimplemented from MDB2_Driver_Common.
Definition at line 627 of file oci8.php.
References MDB2_Driver_Common\$connection, $query, $result, MDB2_Driver_Common\debug(), MDB2_Driver_Common\getConnection(), MDB2_Driver_Common\getOption(), PEAR\isError(), and MDB2_Driver_Common\raiseError().
Referenced by _doConnect(), beginTransaction(), rollback(), setTransactionIsolation(), standaloneExec(), and standaloneQuery().
MDB2_Driver_oci8::_modifyQuery | ( | $query, | |
$is_manip, | |||
$limit, | |||
$offset | |||
) |
Changes a query string for various DBMS specific reasons.
string | $query | query to modify |
boolean | $is_manip | if it is a DML query |
integer | $limit | limit the number of rows |
integer | $offset | start reading from given offset |
Reimplemented from MDB2_Driver_Common.
Definition at line 595 of file oci8.php.
References MDB2_Driver_Common\$limit, MDB2_Driver_Common\$offset, and $query.
Referenced by prepare(), standaloneExec(), and standaloneQuery().
MDB2_Driver_oci8::beginTransaction | ( | $savepoint = null | ) |
Start a transaction or set a savepoint.
string | name of a savepoint to set |
public
Reimplemented from MDB2_Driver_Common.
Definition at line 171 of file oci8.php.
References $query, $uncommitedqueries, _doQuery(), MDB2_Driver_Common\debug(), MDB2_ERROR_INVALID, MDB2_OK, and MDB2_Driver_Common\raiseError().
MDB2_Driver_oci8::commit | ( | $savepoint = null | ) |
Commit the database changes done during a transaction that is in progress or release a savepoint.
This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
string | name of a savepoint to release |
public
Reimplemented from MDB2_Driver_Common.
Definition at line 207 of file oci8.php.
References MDB2_Driver_Common\$connection, MDB2_Driver_Common\debug(), MDB2_Driver_Common\getConnection(), PEAR\isError(), MDB2_ERROR_INVALID, MDB2_OK, and MDB2_Driver_Common\raiseError().
MDB2_Driver_oci8::connect | ( | ) |
Connect to the database.
Reimplemented from MDB2_Driver_Common.
Definition at line 423 of file oci8.php.
References MDB2_Driver_Common\$connection, MDB2_Driver_Common\$database_name, MDB2_Driver_Common\$dsn, MDB2_Driver_Common\$phptype, _doConnect(), disconnect(), getServerVersion(), PEAR\isError(), and MDB2_OK.
MDB2_Driver_oci8::currId | ( | $seq_name | ) |
Returns the current id of a sequence.
string | $seq_name | name of the sequence |
Definition at line 951 of file oci8.php.
References $query, MDB2_Driver_Common\getSequenceName(), and MDB2_Driver_Common\queryOne().
MDB2_Driver_oci8::disconnect | ( | $force = true | ) |
Log out and disconnect from the database.
boolean | $force | if the disconnect should be forced even if the connection is opened persistently |
Reimplemented from MDB2_Driver_Common.
Definition at line 474 of file oci8.php.
References MDB2_Driver_Common\$connected_database_name, MDB2_Driver_Common\$connected_dsn, MDB2_Driver_Common\$database_name, MDB2_Driver_Common\$dsn, MDB2_Driver_Common\$opened_persistent, and rollback().
Referenced by _doConnect(), and connect().
MDB2_Driver_oci8::errorInfo | ( | $error = null | ) |
This method is used to collect information about an error.
integer | $error |
Reimplemented from MDB2_Driver_Common.
Definition at line 115 of file oci8.php.
References MDB2_ERROR_ALREADY_EXISTS, MDB2_ERROR_CONSTRAINT, MDB2_ERROR_CONSTRAINT_NOT_NULL, MDB2_ERROR_DIVZERO, MDB2_ERROR_INVALID, MDB2_ERROR_INVALID_NUMBER, MDB2_ERROR_NOSUCHFIELD, MDB2_ERROR_NOSUCHTABLE, MDB2_ERROR_NOT_FOUND, MDB2_ERROR_SYNTAX, and MDB2_ERROR_VALUE_COUNT_ON_ROW.
MDB2_Driver_oci8::getServerVersion | ( | $native = false | ) |
return version information about the server
bool | $native | determines if the raw version string should be returned |
Reimplemented from MDB2_Driver_Common.
Definition at line 705 of file oci8.php.
References MDB2_Driver_Common\$connected_server_info, MDB2_Driver_Common\$connection, MDB2_Driver_Common\getConnection(), PEAR\isError(), MDB2_ERROR_INVALID, and MDB2_Driver_Common\raiseError().
Referenced by connect().
MDB2_Driver_oci8::lastInsertID | ( | $table = null , |
|
$field = null |
|||
) |
Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence called: $table.
(empty($field) ? '' : '_'.$field)
string | $table | name of the table into which a new row was inserted |
string | $field | name of the field into which a new row was inserted |
Reimplemented from MDB2_Driver_Common.
Definition at line 934 of file oci8.php.
References MDB2_Driver_Common\getSequenceName(), MDB2_Driver_Common\queryOne(), and MDB2_Driver_Common\quoteIdentifier().
MDB2_Driver_oci8::nextID | ( | $seq_name, | |
$ondemand = true |
|||
) |
Returns the next free id of a sequence.
string | $seq_name | name of the sequence |
boolean | $ondemand | when true the sequence is automatic created, if it not exists |
Reimplemented from MDB2_Driver_Common.
Definition at line 902 of file oci8.php.
References $query, $result, PEAR\expectError(), MDB2_Driver_Common\getSequenceName(), PEAR\isError(), MDB2_Driver_Common\loadModule(), MDB2_ERROR_NOSUCHTABLE, PEAR\popExpect(), MDB2_Driver_Common\queryOne(), and MDB2_Driver_Common\quoteIdentifier().
& MDB2_Driver_oci8::prepare | ( | $query, | |
$types = null , |
|||
$result_types = null , |
|||
$lobs = array() |
|||
) |
Prepares a query for multiple execution with execute().
With some database backends, this is emulated. prepare() requires a generic query as string like 'INSERT INTO numbers VALUES(?,?)' or 'INSERT INTO numbers VALUES(:foo,:bar)'. The ? and :[a-zA-Z] and are placeholders which can be set using bindParam() and the query can be send off using the execute() method.
string | $query | the query to prepare |
mixed | $types | array that contains the types of the placeholders |
mixed | $result_types | array that contains the types of the columns in the result set or MDB2_PREPARE_RESULT, if set to MDB2_PREPARE_MANIP the query is handled as a manipulation query |
mixed | $lobs | key (field) value (parameter) pair for all lob placeholders |
Reimplemented from MDB2_Driver_Common.
Definition at line 761 of file oci8.php.
References $columns, MDB2_Driver_Common\$connection, MDB2_Driver_Common\$limit, MDB2_Driver_Common\$offset, $query, $result, _modifyQuery(), MDB2_Driver_Common\_skipDelimitedStrings(), MDB2_Driver_Common\debug(), MDB2_Driver_Common\getConnection(), PEAR\isError(), MDB2_ERROR_SYNTAX, MDB2_PREPARE_MANIP, MDB2_Driver_Common\quote(), and MDB2_Driver_Common\raiseError().
MDB2_Driver_oci8::rollback | ( | $savepoint = null | ) |
Cancel any database changes done during a transaction or since a specific savepoint that is in progress.
This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
string | name of a savepoint to rollback to |
public
Reimplemented from MDB2_Driver_Common.
Definition at line 247 of file oci8.php.
References MDB2_Driver_Common\$connection, $query, _doQuery(), MDB2_Driver_Common\debug(), MDB2_Driver_Common\getConnection(), PEAR\isError(), MDB2_ERROR_INVALID, MDB2_OK, and MDB2_Driver_Common\raiseError().
Referenced by disconnect().
MDB2_Driver_oci8::setTransactionIsolation | ( | $isolation | ) |
Set the transacton isolation level.
string | standard isolation level READ UNCOMMITTED (allows dirty reads) READ COMMITTED (prevents dirty reads) REPEATABLE READ (prevents nonrepeatable reads) SERIALIZABLE (prevents phantom reads) |
public
Definition at line 290 of file oci8.php.
References $query, _doQuery(), MDB2_Driver_Common\debug(), MDB2_ERROR_UNSUPPORTED, and MDB2_Driver_Common\raiseError().
& MDB2_Driver_oci8::standaloneExec | ( | $query | ) |
execute a query as database administrator
string | $query | the SQL query |
Definition at line 512 of file oci8.php.
References MDB2_Driver_Common\$connection, MDB2_Driver_Common\$limit, MDB2_Driver_Common\$offset, $query, $result, $ret, _affectedRows(), _doConnect(), _doQuery(), _modifyQuery(), and PEAR\isError().
& MDB2_Driver_oci8::standaloneQuery | ( | $query, | |
$types = null , |
|||
$is_manip = false |
|||
) |
execute a query as DBA
string | $query | the SQL query |
mixed | $types | array that contains the types of the columns in the result set |
boolean | $is_manip | if the query is a manipulation query |
Reimplemented from MDB2_Driver_Common.
Definition at line 552 of file oci8.php.
References MDB2_Driver_Common\$connection, MDB2_Driver_Common\$limit, MDB2_Driver_Common\$offset, $query, $result, _affectedRows(), _doConnect(), _doQuery(), _modifyQuery(), MDB2_Driver_Common\_wrapResult(), and PEAR\isError().
MDB2_Driver_oci8::$identifier_quoting = array('start' => '"', 'end' => '"', 'escape' => '"') |
MDB2_Driver_oci8::$string_quoting = array('start' => "'", 'end' => "'", 'escape' => "'", 'escape_pattern' => '@') |
MDB2_Driver_oci8::$uncommitedqueries = 0 |
Definition at line 62 of file oci8.php.
Referenced by beginTransaction().