MCPcopy Index your code
hub / github.com/jOOQ/jOOQ / accept

Method accept

jOOQ/src/main/java/org/jooq/impl/ArrayOverlap.java:118–156  ·  view source on GitHub ↗
(Context<?> ctx)

Source from the content-addressed store, hash-verified

116 }
117
118 @Override
119 public final void accept(Context<?> ctx) {
120 switch (ctx.family()) {
121
122
123
124
125
126
127 case DUCKDB:
128 ctx.visit(cardinality(function(N_ARRAY_INTERSECT, array1.getDataType(), array1, array2)).gt(inline(0)));
129 break;
130
131 case H2:
132 ctx.visit(exists(
133 select(asterisk()).from(unnest(array1))
134 .intersect(select(asterisk()).from(unnest(array2)))
135 ));
136 break;
137
138
139
140 case HSQLDB:
141 ctx.visit(exists(
142 select(asterisk()).from(unnest(array1))
143 .intersectAll(select(asterisk()).from(unnest(array2)))
144 ));
145 break;
146
147
148 case TRINO:
149 ctx.visit(function(N_ARRAYS_OVERLAP, BOOLEAN, array1, array2));
150 break;
151
152 default:
153 ctx.sql('(').visit(array1).sql(" && ").visit(array2).sql(')');
154 break;
155 }
156 }
157
158
159

Callers

nothing calls this directly

Calls 15

cardinalityMethod · 0.80
inlineMethod · 0.80
unnestMethod · 0.80
familyMethod · 0.65
visitMethod · 0.65
gtMethod · 0.65
getDataTypeMethod · 0.65
existsMethod · 0.65
intersectMethod · 0.65
fromMethod · 0.65
selectMethod · 0.65
asteriskMethod · 0.65

Tested by

no test coverage detected