Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
ADODB2_oci8 Class Reference
Inheritance diagram for ADODB2_oci8:
ADODB_DataDict

Public Member Functions

 _CreateSuffix ($fname, &$ftype, $fnotnull, $fdefault, $fautoinc, $fconstraint, $funsigned)
 
 _createSuffix ($fname, &$ftype, $fnotnull, $fdefault, $fautoinc, $fconstraint, $funsigned)
 
 _DropAutoIncrement ($t)
 
 _dropAutoIncrement ($tabname)
 
 _genFields ($flds, $widespacing=false)
 
 _getSize ($ftype, $ty, $fsize, $fprec, $options=false)
 GENERATE THE SIZE PART OF THE DATATYPE $ftype is the actual type $ty is the type defined originally in the DDL.
 
 _getSizePrec ($size)
 
 _IndexSQL ($idxname, $tabname, $flds, $idxoptions)
 
 _indexSQL ($idxname, $tabname, $flds, $idxoptions)
 
 _options ($opts)
 Sanitize options, so that array elements with no keys are promoted to keys.
 
 _tableSQL ($tabname, $lines, $pkey, $tableoptions)
 
 _Triggers ($tabname, $tableoptions)
 Creates an insert trigger to emulate an auto-increment column in a table.
 
 _triggers ($tabname, $taboptions)
 GENERATE TRIGGERS IF NEEDED used when table has auto-incrementing field that is emulated using triggers.
 
 ActualType ($meta)
 
 actualType ($meta)
 Returns the actual type given a character code.
 
 AddColumnSQL ($tabname, $flds)
 
 addColumnSQL ($tabname, $flds)
 
 AlterColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='')
 
 alterColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='')
 Change the definition of one column.
 
 changeTableSQL ($tablename, $flds, $tableoptions=false, $dropOldFlds=false)
 This function changes/adds new fields to your table.
 
 CreateDatabase ($dbname, $options=false)
 
 createDatabase ($dbname, $options=false)
 
 createIndexSQL ($idxname, $tabname, $flds, $idxoptions=false)
 
 createTableSQL ($tabname, $flds, $tableoptions=array())
 Generate the SQL to create table.
 
 DropColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='')
 
 dropColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='')
 Drop one column.
 
 dropIndexSQL ($idxname, $tabname=NULL)
 
 dropTableSQL ($tabname)
 
 executeSQLArray ($sql, $continueOnError=true)
 
 GetCommentSQL ($table, $col)
 
 getCommentSQL ($table, $col)
 
 metaColumns ($tab, $upper=true, $schema=false)
 
 metaIndexes ($table, $primary=false, $owner=false)
 
 metaPrimaryKeys ($tab, $owner=false, $intkey=false)
 
 metaTables ()
 
 metaType ($t, $len=-1, $fieldobj=false)
 
 nameQuote ($name=NULL, $allowBrackets=false)
 
 renameColumnSQL ($tabname, $oldcolumn, $newcolumn, $flds='')
 Rename one column.
 
 renameTableSQL ($tabname, $newname)
 
 SetCommentSQL ($table, $col, $cmt)
 
 setCommentSQL ($table, $col, $cmt)
 
 setSchema ($schema)
 
 tableName ($name)
 

Public Attributes

 $addCol = ' ADD'
 
 $alterCol = ' MODIFY '
 
 $autoIncrement = false
 
 $blobAllowsDefaultValue
 
 $blobAllowsNotNull
 
 $blobSize = 100
 
ADOConnection $connection
 
 $databaseType = 'oci8'
 
 $dataProvider
 
 $debug = false
 
 $dropCol = ' DROP COLUMN'
 
 $dropIndex = 'DROP INDEX %s'
 
 $dropTable = "DROP TABLE %s CASCADE CONSTRAINTS"
 
 $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME')
 
 $nameRegex = '\w'
 
 $nameRegexBrackets = 'a-zA-Z0-9_\(\‍)'
 
string $quote
 String to use to quote identifiers and names.
 
 $renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s'
 
 $renameTable = 'RENAME TABLE %s TO %s'
 
 $schema = false
 
 $seqField = false
 
 $seqPrefix = 'SEQ_'
 
 $serverInfo = array()
 
 $trigPrefix = 'TRIG_'
 
 $typeX = 'VARCHAR(4000)'
 
 $typeXL = 'CLOB'
 
string $upperName
 any varchar/char field this size or greater is treated as a blob in other words, we use a text area for editing.
 
bool $useCompactAutoIncrements = false
 Legacy compatibility for sequence names for emulated auto-increments.
 

Member Function Documentation

◆ _Triggers()

ADODB2_oci8::_Triggers ( $tabname,
$tableoptions )

Creates an insert trigger to emulate an auto-increment column in a table.

Parameters
string$tabnameThe name of the table
string[]$tableoptionsOptional configuration items
Return values
string[]The SQL statements to create the trigger

◆ actualType()

ADODB_DataDict::actualType ( $meta)
inherited

Returns the actual type given a character code.

C: varchar X: CLOB (character large object) or largest varchar size if CLOB is not supported C2: Multibyte varchar X2: Multibyte CLOB

B: BLOB (binary large object)

D: Date T: Date-time L: Integer field suitable for storing booleans (0 or 1) I: Integer F: Floating point number N: Numeric or decimal number

◆ alterColumnSQL()

ADODB_DataDict::alterColumnSQL ( $tabname,
$flds,
$tableflds = '',
$tableoptions = '' )
inherited

Change the definition of one column.

As some DBMs can't do that on their own, you need to supply the complete definition of the new table, to allow recreating the table and copying the content over to the new table

Parameters
string$tabnametable-name
string$fldscolumn-name and type for the changed column
string$tableflds,=''complete definition of the new table, eg. for postgres, default ''
array | string$tableoptions,=''options for the new table see createTableSQL, default ''
Return values
arraywith SQL strings

Reimplemented in ADODB2_db2.

◆ changeTableSQL()

ADODB_DataDict::changeTableSQL ( $tablename,
$flds,
$tableoptions = false,
$dropOldFlds = false )
inherited

This function changes/adds new fields to your table.

You don't have to know if the col is new or not. It will check on its own.

Parameters
string$tablename
string$flds
string[]$tableoptions
bool$dropOldFlds
Return values
string[]Array of SQL Commands

Reimplemented in ADODB2_db2.

◆ createTableSQL()

ADODB_DataDict::createTableSQL ( $tabname,
$flds,
$tableoptions = array() )
inherited

Generate the SQL to create table.

Returns an array of sql strings.

◆ dropColumnSQL()

ADODB_DataDict::dropColumnSQL ( $tabname,
$flds,
$tableflds = '',
$tableoptions = '' )
inherited

Drop one column.

Some DBM's can't do that on their own, you need to supply the complete definition of the new table, to allow, recreating the table and copying the content over to the new table

Parameters
string$tabnametable-name
string$fldscolumn-name and type for the changed column
string$tableflds,=''complete definition of the new table, eg. for postgres, default ''
array | string$tableoptions,=''options for the new table see createTableSQL, default ''
Return values
arraywith SQL strings

◆ metaType()

ADODB2_oci8::metaType ( $t,
$len = -1,
$fieldobj = false )

Reimplemented from ADODB_DataDict.

◆ renameColumnSQL()

ADODB_DataDict::renameColumnSQL ( $tabname,
$oldcolumn,
$newcolumn,
$flds = '' )
inherited

Rename one column.

Some DBMs can only do this together with changeing the type of the column (even if that stays the same, eg. mysql)

Parameters
string$tabnametable-name
string$oldcolumncolumn-name to be renamed
string$newcolumnnew column-name
string$flds,=''complete column-definition-string like for addColumnSQL, only used by mysql atm., default=''
Return values
arraywith SQL strings

Member Data Documentation

◆ $upperName

string ADODB_DataDict::$upperName
inherited

any varchar/char field this size or greater is treated as a blob in other words, we use a text area for editing.

Uppercase driver name

◆ $useCompactAutoIncrements

bool ADODB2_oci8::$useCompactAutoIncrements = false

Legacy compatibility for sequence names for emulated auto-increments.

If set to true, creates sequences and triggers as TRIG_394545594 instead of TRIG_possibly_too_long_tablename

$useCompactAutoIncrements


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