SQLOperatorUtil Class Reference

Static Public Member Functions

static isValidOperatorTypeByValue ($operatorType, $value)
static getOperatorByType ($operatorType)
static resolveValueLeftSideLikePartByOperatorType ($operatorType)
static resolveValueRightSideLikePartByOperatorType ($operatorType)
static resolveOperatorAndValueForOneOf ($operatorType, $values, $ignoreStringToLower=false)
static resolveOperatorAndValueForNullOrEmpty ($operatorType)
static doesOperatorTypeAllowNullValues ($type)
static resolveValidationForATemplateSqlStatementAndReturnErrorMessage ($structure, $clauseCount)
static validateParenthesis ($formula)

Static Protected Member Functions

static isValidOperatorType ($type)

Detailed Description

Helper class to provider SQL operators and validate accurate usage of operator types

Definition at line 41 of file SQLOperatorUtil.php.


Member Function Documentation

static isValidOperatorTypeByValue ( operatorType,
value 
) [static]

Confirms usage of operator type is valid.

Returns:
boolean;

Definition at line 47 of file SQLOperatorUtil.php.

static getOperatorByType ( operatorType  )  [static]

Input an operator type and it returns an equivalent SQL operator.

Returns:
string

Definition at line 77 of file SQLOperatorUtil.php.

static resolveValueLeftSideLikePartByOperatorType ( operatorType  )  [static]
Returns:
string

Definition at line 134 of file SQLOperatorUtil.php.

static resolveValueRightSideLikePartByOperatorType ( operatorType  )  [static]
Returns:
string

Definition at line 151 of file SQLOperatorUtil.php.

static isValidOperatorType ( type  )  [static, protected]
Returns:
boolean

Definition at line 231 of file SQLOperatorUtil.php.

static resolveValidationForATemplateSqlStatementAndReturnErrorMessage ( structure,
clauseCount 
) [static]

Used to validate dynamicStructure for search or filtersStructure for reporting for example. If you have 1 and 2 and 3 and 4, where the numbers are later replaced by valid clauses, this method will ensure the operators are correctly used.

Returns:
null or error message

Definition at line 277 of file SQLOperatorUtil.php.

static validateParenthesis ( formula  )  [static]

Function for validation of parenthesis in a formula

Definition at line 313 of file SQLOperatorUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sun Mar 26 07:10:29 2017