[#2031] Change union(Select<R>) and similar methods to union(Select<?
extends R>)
This commit is contained in:
parent
3ac1764ea5
commit
09b379103f
@ -49,25 +49,25 @@ public interface Select<R extends Record> extends ResultQuery<R>, TableLike<R>,
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Support
|
||||
Select<R> union(Select<R> select);
|
||||
Select<R> union(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Support
|
||||
Select<R> unionAll(Select<R> select);
|
||||
Select<R> unionAll(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Support
|
||||
Select<R> except(Select<R> select);
|
||||
Select<R> except(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Support
|
||||
Select<R> intersect(Select<R> select);
|
||||
Select<R> intersect(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* All fields selected in this query
|
||||
|
||||
@ -60,22 +60,22 @@ abstract class AbstractSelect<R extends Record> extends AbstractResultQuery<R> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> union(Select<R> select) {
|
||||
public final Select<R> union(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.UNION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> unionAll(Select<R> select) {
|
||||
public final Select<R> unionAll(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.UNION_ALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> except(Select<R> select) {
|
||||
public final Select<R> except(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.EXCEPT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> intersect(Select<R> select) {
|
||||
public final Select<R> intersect(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.INTERSECT);
|
||||
}
|
||||
|
||||
|
||||
@ -579,22 +579,22 @@ class SelectImpl<R extends Record> extends AbstractDelegatingSelect<R> implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public final SelectImpl<R> union(Select<R> select) {
|
||||
public final SelectImpl<R> union(Select<? extends R> select) {
|
||||
return new SelectImpl<R>(getDelegate().union(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final SelectImpl<R> unionAll(Select<R> select) {
|
||||
public final SelectImpl<R> unionAll(Select<? extends R> select) {
|
||||
return new SelectImpl<R>(getDelegate().unionAll(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final SelectImpl<R> except(Select<R> select) {
|
||||
public final SelectImpl<R> except(Select<? extends R> select) {
|
||||
return new SelectImpl<R>(getDelegate().except(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final SelectImpl<R> intersect(Select<R> select) {
|
||||
public final SelectImpl<R> intersect(Select<? extends R> select) {
|
||||
return new SelectImpl<R>(getDelegate().intersect(select));
|
||||
}
|
||||
|
||||
|
||||
@ -378,22 +378,22 @@ class SimpleSelectImpl<R extends Record> extends AbstractDelegatingSelect<R>
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> union(Select<R> select) {
|
||||
public final Select<R> union(Select<? extends R> select) {
|
||||
return new SimpleSelectImpl<R>(getQuery().union(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> unionAll(Select<R> select) {
|
||||
public final Select<R> unionAll(Select<? extends R> select) {
|
||||
return new SimpleSelectImpl<R>(getQuery().unionAll(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> except(Select<R> select) {
|
||||
public final Select<R> except(Select<? extends R> select) {
|
||||
return new SimpleSelectImpl<R>(getQuery().except(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> intersect(Select<R> select) {
|
||||
public final Select<R> intersect(Select<? extends R> select) {
|
||||
return new SimpleSelectImpl<R>(getQuery().intersect(select));
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,16 +53,16 @@ import org.jooq.Select;
|
||||
*/
|
||||
class Union<R extends Record> extends AbstractSelect<R> {
|
||||
|
||||
private static final long serialVersionUID = 7491446471677986172L;
|
||||
private static final long serialVersionUID = 7491446471677986172L;
|
||||
|
||||
private final List<Select<R>> queries;
|
||||
private final CombineOperator operator;
|
||||
private final List<Select<? extends R>> queries;
|
||||
private final CombineOperator operator;
|
||||
|
||||
Union(Configuration configuration, Select<R> query1, Select<R> query2, CombineOperator operator) {
|
||||
Union(Configuration configuration, Select<R> query1, Select<? extends R> query2, CombineOperator operator) {
|
||||
super(configuration);
|
||||
|
||||
this.operator = operator;
|
||||
this.queries = new ArrayList<Select<R>>();
|
||||
this.queries = new ArrayList<Select<? extends R>>();
|
||||
this.queries.add(query1);
|
||||
this.queries.add(query2);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user