TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
Adodb Class Reference
Inheritance diagram for Adodb:
AbstractCompiler

Public Member Functions

 compileFieldList ($selectFields, $compileComments=true, $functionMapping=true)
 
 compileWhereClause ($clauseArray, $functionMapping=true)
 
- Public Member Functions inherited from AbstractCompiler
 __construct (DatabaseConnection $databaseConnection)
 
 compileSQL ($components)
 
 compileFieldList ($selectFields, $compileComments=true, $functionMapping=true)
 
 compileWhereClause ($clauseArray, $functionMapping=true)
 
 compileFromTables ($tablesArray)
 

Protected Member Functions

 compileINSERT ($components)
 
 compileCREATETABLE ($components)
 
 compileALTERTABLE ($components)
 
 compileCREATEINDEX ($indexName, $tableName, $indexFields, $indexOptions=array())
 
 compileDROPINDEX ($indexName, $tableName)
 
 compileAddslashes ($str)
 
 compileFieldCfg ($fieldCfg)
 
- Protected Member Functions inherited from AbstractCompiler
 compileSELECT ($components)
 
 compileUPDATE ($components)
 
 compileINSERT ($components)
 
 compileDELETE ($components)
 
 compileCREATETABLE ($components)
 
 compileALTERTABLE ($components)
 
 compileTRUNCATETABLE (array $components)
 
 compileAddslashes ($str)
 
 compileJoinIdentifier ($identifierParts)
 
 compileCaseStatement (array $components, $functionMapping=true)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractCompiler
 $databaseConnection
 

Detailed Description

SQL Compiler for ADOdb connections

Definition at line 24 of file Adodb.php.

Member Function Documentation

compileAddslashes (   $str)
protected

Add slashes function used for compiling queries This method overrides the method from because the input string is already properly escaped.

Parameters
string$strInput string
Returns
string Output string

Definition at line 245 of file Adodb.php.

Referenced by Adodb\compileFieldCfg(), and Adodb\compileWhereClause().

compileALTERTABLE (   $components)
protected

Compiles an ALTER TABLE statement from components array

Parameters
arrayArray of SQL query components
Returns
string SQL ALTER TABLE query
See Also
parseALTERTABLE()

Definition at line 100 of file Adodb.php.

References Adodb\compileCREATEINDEX(), Adodb\compileDROPINDEX(), and Adodb\compileFieldCfg().

compileCREATEINDEX (   $indexName,
  $tableName,
  $indexFields,
  $indexOptions = array() 
)
protected

Compiles CREATE INDEX statements from component information

MySQL only needs uniqueness of index names per table, but many DBMS require uniqueness of index names per schema. The table name is hashed and prepended to the index name to make sure index names are unique.

Parameters
string$indexName
string$tableName
array$indexFields
array$indexOptions
Returns
array
See Also
compileALTERTABLE()

Definition at line 149 of file Adodb.php.

References AbstractSpecifics\PARTIAL_STRING_INDEX.

Referenced by Adodb\compileALTERTABLE(), and Adodb\compileCREATETABLE().

compileCREATETABLE (   $components)
protected

Compiles a CREATE TABLE statement from components array

Parameters
array$componentsArray of SQL query components
Returns
array array with SQL CREATE TABLE/INDEX command(s)
See Also
parseCREATETABLE()

Definition at line 61 of file Adodb.php.

References Adodb\compileCREATEINDEX(), Adodb\compileFieldCfg(), and elseif.

compileDROPINDEX (   $indexName,
  $tableName 
)
protected

Compiles DROP INDEX statements from component information

MySQL only needs uniqueness of index names per table, but many DBMS require uniqueness of index names per schema. The table name is hashed and prepended to the index name to make sure index names are unique.

Parameters
$indexName
$tableName
Returns
array
See Also
compileALTERTABLE()

Definition at line 179 of file Adodb.php.

Referenced by Adodb\compileALTERTABLE().

compileFieldCfg (   $fieldCfg)
protected

Compile field definition

Parameters
array$fieldCfgField definition parts
Returns
string Field definition string

Definition at line 256 of file Adodb.php.

References Adodb\compileAddslashes(), and elseif.

Referenced by Adodb\compileALTERTABLE(), and Adodb\compileCREATETABLE().

compileFieldList (   $selectFields,
  $compileComments = true,
  $functionMapping = true 
)

Compiles a "SELECT [output] FROM..:" field list based on input array (made with ->parseFieldList()) Can also compile field lists for ORDER BY and GROUP BY.

Parameters
array$selectFieldsArray of select fields, (made with ->parseFieldList())
bool$compileCommentsWhether comments should be compiled
bool$functionMappingWhether function mapping should take place
Returns
string Select field string
See Also
parseFieldList()

Definition at line 198 of file Adodb.php.

References AbstractCompiler\compileCaseStatement().

compileINSERT (   $components)
protected

Compiles an INSERT statement from components array

Parameters
arrayArray of SQL query components
Returns
string SQL INSERT query / array
See Also
parseINSERT()

Definition at line 33 of file Adodb.php.

compileWhereClause (   $clauseArray,
  $functionMapping = true 
)

Implodes an array of WHERE clause configuration into a WHERE clause.

DBAL-specific: The only(!) handled "calc" operators supported by parseWhereClause() are:

  • the bitwise logical and (&)
  • the addition (+)
  • the substraction (-)
  • the multiplication (*)
  • the division (/)
  • the modulo (%)
Parameters
array$clauseArray
bool$functionMapping
Returns
string WHERE clause as string.
See Also
::parseWhereClause()

Definition at line 335 of file Adodb.php.

References Adodb\compileAddslashes(), AbstractCompiler\compileSELECT(), elseif, GeneralUtility\inList(), GeneralUtility\isFirstPartOfStr(), SqlParser\normalizeKeyword(), and GeneralUtility\strtolower().