Drivers\Abstraction\Sql::createCriteria PHP Method

createCriteria() protected method

Create criteria condition. It use in on, where and having method.
protected createCriteria ( string $column, string $operator, string $value, mix $separator )
$column string
$operator string
$value string
$separator mix
    protected function createCriteria($column, $operator, $value, $separator)
    {
        if (is_string($value) && $this->isQuotes) {
            $value = $this->escape($value);
            $value = " '{$value}'";
        }
        $operator = strtoupper($operator);
        if ($operator == 'IN') {
            if (is_array($value)) {
                $value = "('" . implode("', '", $value) . "')";
            }
        }
        if ($operator == 'BETWEEN') {
            $value = $value[0] . ' AND ' . $value[1];
        }
        $return = $column . ' ' . $operator . ' ' . $value;
        if ($separator) {
            $return .= ' ' . strtoupper($separator);
        }
        return $return;
    }