TYPO3 API  SVNRelease
Public Member Functions | Protected Member Functions | Private Member Functions
ux_t3lib_sqlparser Class Reference
Inheritance diagram for ux_t3lib_sqlparser:
Inheritance graph
[legend]
Collaboration diagram for ux_t3lib_sqlparser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 compileFieldList ($selectFields, $compileComments=TRUE, $functionMapping=TRUE)
 compileCREATETABLE ($components)
 compileALTERTABLE ($components)
 compileFieldCfg ($fieldCfg)
 checkEmptyDefaultValue ($featureIndex)
 compileWhereClause ($clauseArray, $functionMapping=TRUE)

Protected Member Functions

 compileCaseStatement (array $components, $functionMapping=TRUE)
 compileAddslashes ($str)
 compileINSERT ($components)

Private Member Functions

 compileDROPTABLE ($components)

Detailed Description

Definition at line 47 of file class.ux_t3lib_sqlparser.php.


Member Function Documentation

ux_t3lib_sqlparser::checkEmptyDefaultValue ( featureIndex)

Checks if the submitted feature index contains a default value definition and the default value

Parameters:
array$featureIndexA feature index as produced by parseFieldDef()
Returns:
boolean
See also:
t3lib_sqlparser::parseFieldDef()

Definition at line 403 of file class.ux_t3lib_sqlparser.php.

ux_t3lib_sqlparser::compileAddslashes ( str) [protected]

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

Parameters:
stringInput string
Returns:
string Output string

Reimplemented from t3lib_sqlparser.

Definition at line 153 of file class.ux_t3lib_sqlparser.php.

Referenced by compileFieldCfg(), and compileWhereClause().

ux_t3lib_sqlparser::compileALTERTABLE ( components)

Compiles an ALTER TABLE statement from components array

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

Reimplemented from t3lib_sqlparser.

Definition at line 281 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, $query, and compileFieldCfg().

ux_t3lib_sqlparser::compileCaseStatement ( array $  components,
functionMapping = TRUE 
) [protected]

Compiles a CASE ... WHEN flow-control construct based on input array (made with ->parseCaseStatement())

Parameters:
arrayArray of case components, (made with ->parseCaseStatement())
booleanWhether function mapping should take place
Returns:
string case when string
See also:
parseCaseStatement()

Definition at line 116 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, and compileWhereClause().

Referenced by compileFieldList().

ux_t3lib_sqlparser::compileCREATETABLE ( components)

Compiles a CREATE TABLE statement from components array

Parameters:
arrayArray of SQL query components
Returns:
array array with SQL CREATE TABLE/INDEX command(s)
See also:
parseCREATETABLE()

Reimplemented from t3lib_sqlparser.

Definition at line 230 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, $query, and compileFieldCfg().

ux_t3lib_sqlparser::compileDROPTABLE ( components) [private]

Compiles a DROP TABLE statement from components array

Parameters:
arrayArray of SQL query components
Returns:
string SQL DROP TABLE query
See also:
compileSQL()

Definition at line 208 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, and $query.

ux_t3lib_sqlparser::compileFieldCfg ( fieldCfg)

Compile field definition

Parameters:
arrayField definition parts
Returns:
string Field definition string

Reimplemented from t3lib_sqlparser.

Definition at line 322 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, and compileAddslashes().

Referenced by compileALTERTABLE(), and compileCREATETABLE().

ux_t3lib_sqlparser::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:
arrayArray of select fields, (made with ->parseFieldList())
booleanWhether comments should be compiled
booleanWhether function mapping should take place
Returns:
string Select field string
See also:
parseFieldList()

Definition at line 59 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, and compileCaseStatement().

ux_t3lib_sqlparser::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()

Reimplemented from t3lib_sqlparser.

Definition at line 170 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, and $query.

ux_t3lib_sqlparser::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:
arrayWHERE clause configuration
Returns:
string WHERE clause as string.
See also:
t3lib_sqlparser::parseWhereClause()

Definition at line 429 of file class.ux_t3lib_sqlparser.php.

References $GLOBALS, compileAddslashes(), t3lib_sqlparser\compileSELECT(), t3lib_div\inList(), t3lib_div\isFirstPartOfStr(), and t3lib_div\strtolower().

Referenced by compileCaseStatement().


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