protected function prepareFragment(FragmentInterface $context): string
    {
        if ($context instanceof BuilderInterface) {
            //Nested queries has to be wrapped with braces
            return '(' . $context->sqlStatement($this) . ')';
        }

        if ($context instanceof ExpressionInterface) {
            //Fragments does not need braces around them
            return $context->sqlStatement($this);
        }

        return $context->sqlStatement();
    }