ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
MDB2_Driver_Function_oci8 Class Reference
+ Inheritance diagram for MDB2_Driver_Function_oci8:
+ Collaboration diagram for MDB2_Driver_Function_oci8:

Public Member Functions

executeStoredProc ($name, $params=null, $types=null, $result_class=true, $result_wrap_class=false)
 Execute a stored procedure and return any results.
 functionTable ()
 return string for internal table used when calling only a function
 now ($type= 'timestamp')
 Return string to call a variable with the current timestamp inside an SQL statement There are three special variables for current date and time:
 substring ($value, $position=1, $length=null)
 return string to call a function to get a substring inside an SQL statement
 random ()
 return string to call a function to get random value inside an SQL statement
 guid ()
 Returns global unique identifier.
- Public Member Functions inherited from MDB2_Driver_Function_Common
 concat ($value1, $value2)
 Returns string to concatenate two or more string parameters.
 lower ($expression)
 return string to call a function to lower the case of an expression
 upper ($expression)
 return string to call a function to upper the case of an expression
- Public Member Functions inherited from MDB2_Module_Common
 __construct ($db_index)
 Constructor.
 MDB2_Module_Common ($db_index)
 PHP 4 Constructor.
getDBInstance ()
 Get the instance of MDB2 associated with the module instance.

Additional Inherited Members

- Data Fields inherited from MDB2_Module_Common
 $db_index

Detailed Description

Definition at line 56 of file oci8.php.

Member Function Documentation

& MDB2_Driver_Function_oci8::executeStoredProc (   $name,
  $params = null,
  $types = null,
  $result_class = true,
  $result_wrap_class = false 
)

Execute a stored procedure and return any results.

Parameters
string$namestring that identifies the function to execute
mixed$paramsarray that contains the paramaters to pass the stored proc
mixed$typesarray that contains the types of the columns in the result set
mixed$result_classstring which specifies which result class to use
mixed$result_wrap_classstring which specifies which class to wrap results in
Returns
mixed a result handle or MDB2_OK on success, a MDB2 error on failure public

Reimplemented from MDB2_Driver_Function_Common.

Definition at line 72 of file oci8.php.

References $query, MDB2_Module_Common\getDBInstance(), and PEAR\isError().

{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'EXEC '.$name;
$query .= $params ? '('.implode(', ', $params).')' : '()';
return $db->query($query, $types, $result_class, $result_wrap_class);
}

+ Here is the call graph for this function:

MDB2_Driver_Function_oci8::functionTable ( )

return string for internal table used when calling only a function

Returns
string for internal table used when calling only a function public

Reimplemented from MDB2_Driver_Function_Common.

Definition at line 93 of file oci8.php.

{
return ' FROM dual';
}
MDB2_Driver_Function_oci8::guid ( )

Returns global unique identifier.

Returns
string to get global unique identifier public

Reimplemented from MDB2_Driver_Function_Common.

Definition at line 162 of file oci8.php.

{
return 'SYS_GUID()';
}
MDB2_Driver_Function_oci8::now (   $type = 'timestamp')

Return string to call a variable with the current timestamp inside an SQL statement There are three special variables for current date and time:

  • CURRENT_TIMESTAMP (date and time, TIMESTAMP type)
  • CURRENT_DATE (date, DATE type)
  • CURRENT_TIME (time, TIME type)
Returns
string to call a variable with the current timestamp public

Reimplemented from MDB2_Driver_Function_Common.

Definition at line 111 of file oci8.php.

{
switch ($type) {
case 'date':
case 'time':
case 'timestamp':
default:
return 'TO_CHAR(CURRENT_TIMESTAMP, \'YYYY-MM-DD HH24:MI:SS\')';
}
}
MDB2_Driver_Function_oci8::random ( )

return string to call a function to get random value inside an SQL statement

Returns
return string to generate float between 0 and 1 public

Reimplemented from MDB2_Driver_Function_Common.

Definition at line 148 of file oci8.php.

{
return 'dbms_random.value';
}
MDB2_Driver_Function_oci8::substring (   $value,
  $position = 1,
  $length = null 
)

return string to call a function to get a substring inside an SQL statement

Returns
string to call a function to get a substring public

Reimplemented from MDB2_Driver_Function_Common.

Definition at line 131 of file oci8.php.

{
if (!is_null($length)) {
return "SUBSTR($value, $position, $length)";
}
return "SUBSTR($value, $position)";
}

The documentation for this class was generated from the following file: