private function builtConditions(
        string $innerJoiner,
        string $key,
        $where,
        &$tokens,
        callable $wrapper
    ) {
        foreach ($where as $operation => $value) {
            if (is_numeric($operation)) {
                throw new BuilderException('Nested conditions should have defined operator');
            }

            $operation = strtoupper($operation);
            if (!in_array($operation, ['BETWEEN', 'NOT BETWEEN'])) {
                //AND|OR [name] [OPERATION] [nestedValue]
                $tokens[] = [$innerJoiner, [$key, $operation, $wrapper($value)]];
                continue;
            }

            /*
             * Between and not between condition described using array of [left, right] syntax.
             */

            if (!is_array($value) || count($value) != 2) {
                throw new BuilderException(
                    'Exactly 2 array values are required for between statement'
                );
            }

            $tokens[] = [
                //AND|OR [name] [BETWEEN|NOT BETWEEN] [value 1] [value 2]
                $innerJoiner,
                [$key, $operation, $wrapper($value[0]), $wrapper($value[1])],
            ];
        }

        return $tokens;
    }