Methods

process()

process(  $inputArray) 

This function implements the main functionality of a processor class.

Always use default valuses for additional parameters within overridden functions.

Parameters

$inputArray

splitSQLIntoTokens()

splitSQLIntoTokens(  $sql) 

this function splits up a SQL statement into easy to "parse" tokens for the SQL processor

Parameters

$sql

toArray()

toArray(  $tokenList) 

translates an array of objects into an associative array

Parameters

$tokenList

isUnion()

isUnion(  $queries) 

Parameters

$queries

revokeQuotation()

revokeQuotation(  $sql) 

Revokes the quoting characters from an expression

Parameters

$sql

removeParenthesisFromStart()

removeParenthesisFromStart(  $token) 

This method removes parenthesis from start of the given string.

It removes also the associated closing parenthesis.

Parameters

$token

getVariableType()

getVariableType(  $expression) 

Parameters

$expression

isCommaToken()

isCommaToken(  $token) 

Parameters

$token

isWhitespaceToken()

isWhitespaceToken(  $token) 

Parameters

$token

isCommentToken()

isCommentToken(  $token) 

Parameters

$token

isColumnReference()

isColumnReference(  $out) 

Parameters

$out

isReserved()

isReserved(  $out) 

Parameters

$out

isConstant()

isConstant(  $out) 

Parameters

$out

isAggregateFunction()

isAggregateFunction(  $out) 

Parameters

$out

isFunction()

isFunction(  $out) 

Parameters

$out

isExpression()

isExpression(  $out) 

Parameters

$out

isBracketExpression()

isBracketExpression(  $out) 

Parameters

$out

isSubQuery()

isSubQuery(  $out) 

Parameters

$out

array_insert_after()

array_insert_after(  $array,   $key,   $entry) 

Parameters

$array
$key
$entry

processMySQLUnion()

processMySQLUnion(  $queries) 

MySQL supports a special form of UNION: (select .

..) union (select ...)

This function handles this query syntax. Only one such subquery is supported in each UNION block. (select)(select)union(select) is not legal. The extra queries will be silently ignored.

Parameters

$queries