(Context<?> ctx)
| 75 | } |
| 76 | |
| 77 | @Override |
| 78 | public final void accept(Context<?> ctx) { |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | if (SelectIsNull.EMULATE_NULL_QUERY.contains(ctx.dialect())) { |
| 86 | |
| 87 | // [#11011] Avoid the RVE IS NULL emulation for queries of degree 1 |
| 88 | // [#16319] Flatten embeddables to find collection size |
| 89 | List<Field<?>> f = collect(flattenCollection(select.getSelect())); |
| 90 | if (f.size() == 1) { |
| 91 | acceptStandard(ctx); |
| 92 | } |
| 93 | else { |
| 94 | Name[] n = fieldNames(f.size()); |
| 95 | Table<?> t = new AliasedSelect<>(select, true, true, false, n).as("t"); |
| 96 | ctx.visit(inline(1).eq(selectCount().from(t).where(allNotNull(fieldsByName(n))))); |
| 97 | } |
| 98 | } |
| 99 | else |
| 100 | acceptStandard(ctx); |
| 101 | } |
| 102 | |
| 103 | private final void acceptStandard(Context<?> ctx) { |
| 104 | visitSubquery(ctx, select, PREDICAND); |
nothing calls this directly
no test coverage detected