Skip to content

Commit cf46fe5

Browse files
committed
Implemented whereNotExists and orWhereNotExists on Query
1 parent 799658e commit cf46fe5

File tree

1 file changed

+10
-0
lines changed
  • src/main/java/org/javawebstack/orm/query

1 file changed

+10
-0
lines changed

src/main/java/org/javawebstack/orm/query/Query.java

+10
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,21 @@ public <M extends Model> Query<T> whereExists(Class<M> model, Function<Query<M>,
249249
return this;
250250
}
251251

252+
public <M extends Model> Query<T> whereNotExists(Class<M> model, Function<Query<M>, Query<M>> consumer) {
253+
where.whereNotExists(model, consumer);
254+
return this;
255+
}
256+
252257
public <M extends Model> Query<T> orWhereExists(Class<M> model, Function<Query<M>, Query<M>> consumer) {
253258
where.orWhereExists(model, consumer);
254259
return this;
255260
}
256261

262+
public <M extends Model> Query<T> orWhereNotExists(Class<M> model, Function<Query<M>, Query<M>> consumer) {
263+
where.orWhereNotExists(model, consumer);
264+
return this;
265+
}
266+
257267
public Query<T> whereIn(Object left, Object... values) {
258268
where.whereIn(left, values);
259269
return this;

0 commit comments

Comments
 (0)