Skip to content

Conversation

@xxx-tea
Copy link

@xxx-tea xxx-tea commented May 30, 2025

已完成in和notIn的功能,支持普通和Chain的查询和更新,已完成测试用例的覆盖。
#6825

@ghost
Copy link

ghost commented Jun 2, 2025

这里存在多余的转化 可以不需要 .collect(Collectors.toList())

    protected List<ISqlSegment> inMulExpression(List<List<?>> value) {
        if (CollectionUtils.isEmpty(value)) {
            return Collections.singletonList(() -> "()");
        }
        List<ISqlSegment> sqlSegments = new ArrayList<>();
        sqlSegments.add(0, LEFT_BRACKET);
        // 不需要 .collect(Collectors.toList())
        value.stream().map(this::inExpression).collect(Collectors.toList()).forEach(e -> {
            sqlSegments.add(e);
            sqlSegments.add(COMMA);
        });
        sqlSegments.remove(sqlSegments.size() - 1);
        sqlSegments.add(RIGHT_BRACKET);
        return sqlSegments;
    }

@xxx-tea
Copy link
Author

xxx-tea commented Jun 2, 2025

这里存在多余的转化 可以不需要 .collect(Collectors.toList())

    protected List<ISqlSegment> inMulExpression(List<List<?>> value) {
        if (CollectionUtils.isEmpty(value)) {
            return Collections.singletonList(() -> "()");
        }
        List<ISqlSegment> sqlSegments = new ArrayList<>();
        sqlSegments.add(0, LEFT_BRACKET);
        // 不需要 .collect(Collectors.toList())
        value.stream().map(this::inExpression).collect(Collectors.toList()).forEach(e -> {
            sqlSegments.add(e);
            sqlSegments.add(COMMA);
        });
        sqlSegments.remove(sqlSegments.size() - 1);
        sqlSegments.add(RIGHT_BRACKET);
        return sqlSegments;
    }

是的,疏漏了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant