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 $featureIndex A feature index as produced by parseFieldDef()
Returns:
boolean
See also:
t3lib_sqlparser::parseFieldDef()

Definition at line 402 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:
string Input string
Returns:
string Output string

Reimplemented from t3lib_sqlparser.

Definition at line 152 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:
array Array of SQL query components
Returns:
string SQL ALTER TABLE query
See also:
parseALTERTABLE()

Reimplemented from t3lib_sqlparser.

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

References $GLOBALS, 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:
array Array of case components, (made with ->parseCaseStatement())
boolean Whether function mapping should take place
Returns:
string case when string
See also:
parseCaseStatement()

Definition at line 115 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:
array Array of SQL query components
Returns:
array array with SQL CREATE TABLE/INDEX command(s)
See also:
parseCREATETABLE()

Reimplemented from t3lib_sqlparser.

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

References $GLOBALS, and compileFieldCfg().

ux_t3lib_sqlparser::compileDROPTABLE ( components  )  [private]

Compiles a DROP TABLE statement from components array

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

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

References $GLOBALS.

ux_t3lib_sqlparser::compileFieldCfg ( fieldCfg  ) 

Compile field definition

Parameters:
array Field definition parts
Returns:
string Field definition string

Reimplemented from t3lib_sqlparser.

Definition at line 321 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:
array Array of select fields, (made with ->parseFieldList())
boolean Whether comments should be compiled
boolean Whether 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:
array Array of SQL query components
Returns:
string SQL INSERT query / array
See also:
parseINSERT()

Reimplemented from t3lib_sqlparser.

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

References $GLOBALS.

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:

Parameters:
array WHERE clause configuration
Returns:
string WHERE clause as string.
See also:
t3lib_sqlparser::parseWhereClause()

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

References $GLOBALS, compileAddslashes(), t3lib_sqlparser::compileSELECT(), and t3lib_div::inList().

Referenced by compileCaseStatement().


The documentation for this class was generated from the following file:
Generated on Sat Jul 24 04:21:28 2010 for TYPO3 API by  doxygen 1.4.7