[#3579] More meaningful API
This commit is contained in:
parent
bebc454fc7
commit
d77e77696b
@ -83,7 +83,7 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface SelectOptionStep<R extends Record> extends SelectFinalStep<R> {
|
||||
public interface SelectOptionStep<R extends Record> extends SelectUnionStep<R> {
|
||||
|
||||
/**
|
||||
* Add a SQL Server-style query hint to the select clause.
|
||||
@ -115,5 +115,5 @@ public interface SelectOptionStep<R extends Record> extends SelectFinalStep<R> {
|
||||
* @see SelectQuery#addOption(String)
|
||||
*/
|
||||
@Support
|
||||
SelectFinalStep<R> option(String string);
|
||||
SelectUnionStep<R> option(String string);
|
||||
}
|
||||
|
||||
@ -97,33 +97,33 @@ import static org.jooq.SQLDialect.SQLITE;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface SelectUnionStep<R extends Record> extends SelectOrderByStep<R> {
|
||||
public interface SelectUnionStep<R extends Record> extends SelectFinalStep<R> {
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Override
|
||||
@Support
|
||||
SelectUnionStep<R> union(Select<? extends R> select);
|
||||
SelectOrderByStep<R> union(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Override
|
||||
@Support
|
||||
SelectUnionStep<R> unionAll(Select<? extends R> select);
|
||||
SelectOrderByStep<R> unionAll(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Override
|
||||
@Support({ CUBRID, DERBY, H2, HSQLDB, POSTGRES, SQLITE })
|
||||
SelectUnionStep<R> except(Select<? extends R> select);
|
||||
SelectOrderByStep<R> except(Select<? extends R> select);
|
||||
|
||||
/**
|
||||
* Combine with other selects
|
||||
*/
|
||||
@Override
|
||||
@Support({ CUBRID, DERBY, H2, HSQLDB, POSTGRES, SQLITE })
|
||||
SelectUnionStep<R> intersect(Select<? extends R> select);
|
||||
SelectOrderByStep<R> intersect(Select<? extends R> select);
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ import java.util.Collection;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface SelectWindowStep<R extends Record> extends SelectUnionStep<R> {
|
||||
public interface SelectWindowStep<R extends Record> extends SelectOrderByStep<R> {
|
||||
|
||||
/**
|
||||
* Add a <code>WINDOW</code> clause to the statement.
|
||||
@ -106,7 +106,7 @@ public interface SelectWindowStep<R extends Record> extends SelectUnionStep<R> {
|
||||
* will inline window definitions where they are referenced.
|
||||
*/
|
||||
@Support({ CUBRID, POSTGRES })
|
||||
SelectUnionStep<R> window(WindowDefinition... definitions);
|
||||
SelectOrderByStep<R> window(WindowDefinition... definitions);
|
||||
|
||||
/**
|
||||
* Add a <code>WINDOW</code> clause to the statement.
|
||||
@ -120,5 +120,5 @@ public interface SelectWindowStep<R extends Record> extends SelectUnionStep<R> {
|
||||
* will inline window definitions where they are referenced.
|
||||
*/
|
||||
@Support({ CUBRID, POSTGRES })
|
||||
SelectUnionStep<R> window(Collection<? extends WindowDefinition> definitions);
|
||||
SelectOrderByStep<R> window(Collection<? extends WindowDefinition> definitions);
|
||||
}
|
||||
|
||||
@ -111,7 +111,6 @@ import org.jooq.SelectSeekStep8;
|
||||
import org.jooq.SelectSeekStep9;
|
||||
import org.jooq.SelectSeekStepN;
|
||||
import org.jooq.SelectSelectStep;
|
||||
import org.jooq.SelectUnionStep;
|
||||
import org.jooq.SortField;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
@ -1914,13 +1913,13 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final SelectUnionStep<R> window(WindowDefinition... definitions) {
|
||||
public final SelectImpl window(WindowDefinition... definitions) {
|
||||
getQuery().addWindow(definitions);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final SelectUnionStep<R> window(Collection<? extends WindowDefinition> definitions) {
|
||||
public final SelectImpl window(Collection<? extends WindowDefinition> definitions) {
|
||||
getQuery().addWindow(definitions);
|
||||
return this;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user