final protected static function generateValue (string $column, array $operatorValues, string $expressionOperator="AND") : string
	{
        $dbObject 			= Database::getInstance();
        $column 			= $dbObject->escapeValue($column);
		$operator 			= static::validateOperator(array_shift($operatorValues));
        $values 			= $dbObject->escapeValues($operatorValues);
		$expressionOperator = static::validateOperator($expressionOperator, "AND");
		$expression 		= "";
		if (count($values) > 1):
			switch ($operator)
			{
				case 'BETWEEN':
					$expression = joinArray($values, "' AND '", "{$operator} '", "'");
					break;
				case 'IN':
					$expression = joinArray($values, "', '", "{$operator} ('", "')");
					break;
				case '=':
				case '<':
				case '<=':
				case '>':
				case '>=':
				case '<>':
				default:
					$expression = joinArray($values, "' {$expressionOperator} {$column} {$operator} '", "{$operator} '", "'");
					break;
			}
		else:
	        $expression = "{$operator} '".$dbObject->escapeValue($values[0])."'";
		endif;
		return $expression;
	}
final protected static function generateValue (string $column, array $operatorValues, string $expressionOperator="AND") : string
	{
        $dbObject 			= Database::getInstance();
        $column 			= $dbObject->escapeValue($column);
		$operator 			= static::validateOperator(array_shift($operatorValues));
        $values 			= $dbObject->escapeValues($operatorValues);
		$expressionOperator = static::validateOperator($expressionOperator, "AND");
		$expression 		= "";
		if (count($values) > 1):
			switch ($operator)
			{
				case 'BETWEEN':
					$expression = joinArray($values, "' AND '", "{$operator} '", "'");
					break;
				case 'IN':
					$expression = joinArray($values, "', '", "{$operator} ('", "')");
					break;
				case '=':
				case '<':
				case '<=':
				case '>':
				case '>=':
				case '<>':
				default:
					$expression = joinArray($values, "' {$expressionOperator} {$column} {$operator} '", "{$operator} '", "'");
					break;
			}
		else:
	        $expression = "{$operator} '".$dbObject->escapeValue($values[0])."'";
		endif;
		return $expression;
	}
final protected static function generateValue ( string $ column , array $ operatorValues , string $ expressionOperator = "AND" ) : string { $ dbObject = Database :: getInstance ( ) ; $ column = $ dbObject -> escapeValue ( $ column ) ; $ operator = static :: validateOperator ( array_shift ( $ operatorValues ) ) ; $ values = $ dbObject -> escapeValues ( $ operatorValues ) ; $ expressionOperator = static :: validateOperator ( $ expressionOperator , "AND" ) ; $ expression = "" ; if ( count ( $ values ) > 1 ) : switch ( $ operator ) { case 'BETWEEN' : $ expression = joinArray ( $ values , "' AND '" , "{$operator} '" , "'" ) ; break ; case 'IN' : $ expression = joinArray ( $ values , "', '" , "{$operator} ('" , "')" ) ; break ; case '=' : case '<' : case '<=' : case '>' : case '>=' : case '<>' : default : $ expression = joinArray ( $ values , "' {$expressionOperator} {$column} {$operator} '" , "{$operator} '" , "'" ) ; break ; } else : $ expression = "{$operator} '" . $ dbObject -> escapeValue ( $ values [ 0 ] ) . "'" ; endif ; return $ expression ; }
Generate values for sqlQuery based on the operator
@param string $column
@param array $operatorValues
@param string $expressionOperator
@return string
Generate values for sqlQuery based on the operator