[#7865] Add support for SQLite window functions

This commit is contained in:
lukaseder 2018-10-08 10:43:14 +02:00
parent a8690a2b46
commit 4bffbc4148
17 changed files with 137 additions and 121 deletions

View File

@ -375,7 +375,7 @@ public interface SelectQuery<R extends Record> extends Select<R>, ConditionProvi
*
* @param definitions The definitions
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
void addWindow(WindowDefinition... definitions);
/**
@ -383,7 +383,7 @@ public interface SelectQuery<R extends Record> extends Select<R>, ConditionProvi
*
* @param definitions The definitions
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
void addWindow(Collection<? extends WindowDefinition> definitions);
/**

View File

@ -49,6 +49,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -129,7 +130,7 @@ public interface SelectWindowStep<R extends Record> extends SelectOrderByStep<R>
* use this clause in all other databases supporting window functions. jOOQ
* will inline window definitions where they are referenced.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
SelectOrderByStep<R> window(WindowDefinition... definitions);
/**
@ -143,6 +144,6 @@ public interface SelectWindowStep<R extends Record> extends SelectOrderByStep<R>
* use this clause in all other databases supporting window functions. jOOQ
* will inline window definitions where they are referenced.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
SelectOrderByStep<R> window(Collection<? extends WindowDefinition> definitions);
}

View File

@ -47,6 +47,7 @@ import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.POSTGRES_11;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -91,6 +92,6 @@ public interface WindowExcludeStep<T> extends WindowFinalStep<T> {
/**
* Add an <code>EXCLUDE NO OTHERS</code> clause.
*/
@Support({ MARIADB, MYSQL_8_0, POSTGRES })
@Support({ MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowFinalStep<T> excludeNoOthers();
}

View File

@ -50,6 +50,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -78,12 +79,12 @@ public interface WindowOrderByStep<T> extends WindowFinalStep<T> {
/**
* Add an <code>ORDER BY</code> clause to the window function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsStep<T> orderBy(OrderField<?>... fields);
/**
* Add an <code>ORDER BY</code> clause to the window function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsStep<T> orderBy(Collection<? extends OrderField<?>> fields);
}

View File

@ -52,6 +52,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -86,7 +87,7 @@ public interface WindowOverStep<T> {
* </code>
* </pre>
*/
@Support({ CUBRID, DERBY, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, DERBY, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowPartitionByStep<T> over();
/**
@ -102,7 +103,7 @@ public interface WindowOverStep<T> {
* {@link SelectWindowStep#window(WindowDefinition...)}, then referenced
* windows will be inlined.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowFinalStep<T> over(Name name);
/**
@ -118,7 +119,7 @@ public interface WindowOverStep<T> {
* {@link SelectWindowStep#window(WindowDefinition...)}, then referenced
* windows will be inlined.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowFinalStep<T> over(String name);
/**
@ -129,7 +130,7 @@ public interface WindowOverStep<T> {
* </code>
* </pre>
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowFinalStep<T> over(WindowSpecification specification);
/**
@ -145,7 +146,7 @@ public interface WindowOverStep<T> {
* {@link SelectWindowStep#window(WindowDefinition...)}, then referenced
* windows will be inlined.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowFinalStep<T> over(WindowDefinition definition);
}

View File

@ -50,6 +50,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -78,13 +79,13 @@ public interface WindowPartitionByStep<T> extends WindowOrderByStep<T> {
/**
* Add a <code>PARTITION BY</code> clause to the window functions.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowOrderByStep<T> partitionBy(Field<?>... fields);
/**
* Add a <code>PARTITION BY</code> clause to the window functions.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowOrderByStep<T> partitionBy(Collection<? extends Field<?>> fields);
/**
@ -99,7 +100,7 @@ public interface WindowPartitionByStep<T> extends WindowOrderByStep<T> {
* omit the clause entirely.
*/
@Deprecated
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowOrderByStep<T> partitionByOne();
}

View File

@ -47,6 +47,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -73,34 +74,34 @@ public interface WindowRowsAndStep<T> {
* Add a <code>... AND UNBOUNDED PRECEDING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> andUnboundedPreceding();
/**
* Add a <code>... AND [number] PRECEDING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> andPreceding(int number);
/**
* Add a <code>... AND CURRENT ROW</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> andCurrentRow();
/**
* Add a <code>... AND UNBOUNDED FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> andUnboundedFollowing();
/**
* Add a <code>... AND [number] FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> andFollowing(int number);
}

View File

@ -48,6 +48,7 @@ import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.POSTGRES_11;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -75,138 +76,138 @@ public interface WindowRowsStep<T> extends WindowFinalStep<T> {
* Add a <code>ROWS UNBOUNDED PRECEDING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rowsUnboundedPreceding();
/**
* Add a <code>ROWS [number] PRECEDING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rowsPreceding(int number);
/**
* Add a <code>ROWS CURRENT ROW</code> frame clause to the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rowsCurrentRow();
/**
* Add a <code>ROWS UNBOUNDED FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rowsUnboundedFollowing();
/**
* Add a <code>ROWS [number] FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rowsFollowing(int number);
/**
* Add a <code>ROWS BETWEEN UNBOUNDED PRECEDING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rowsBetweenUnboundedPreceding();
/**
* Add a <code>ROWS BETWEEN [number] PRECEDING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rowsBetweenPreceding(int number);
/**
* Add a <code>ROWS BETWEEN CURRENT ROW ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rowsBetweenCurrentRow();
/**
* Add a <code>ROWS BETWEEN UNBOUNDED FOLLOWING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rowsBetweenUnboundedFollowing();
/**
* Add a <code>ROWS BETWEEN [number] FOLLOWING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rowsBetweenFollowing(int number);
/**
* Add a <code>RANGE UNBOUNDED PRECEDING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rangeUnboundedPreceding();
/**
* Add a <code>RANGE [number] PRECEDING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rangePreceding(int number);
/**
* Add a <code>RANGE CURRENT ROW</code> frame clause to the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rangeCurrentRow();
/**
* Add a <code>RANGE UNBOUNDED FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rangeUnboundedFollowing();
/**
* Add a <code>RANGE [number] FOLLOWING</code> frame clause to the window
* function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowExcludeStep<T> rangeFollowing(int number);
/**
* Add a <code>RANGE BETWEEN UNBOUNDED PRECEDING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rangeBetweenUnboundedPreceding();
/**
* Add a <code>RANGE BETWEEN [number] PRECEDING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rangeBetweenPreceding(int number);
/**
* Add a <code>RANGE BETWEEN CURRENT ROW ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rangeBetweenCurrentRow();
/**
* Add a <code>RANGE BETWEEN UNBOUNDED FOLLOWING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rangeBetweenUnboundedFollowing();
/**
* Add a <code>RANGE BETWEEN [number] FOLLOWING ...</code> frame clause to
* the window function.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowRowsAndStep<T> rangeBetweenFollowing(int number);
/**

View File

@ -48,6 +48,7 @@ import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.POSTGRES_11;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -107,6 +108,6 @@ public interface WindowSpecificationExcludeStep extends WindowSpecificationFinal
/**
* Add an <code>EXCLUDE NO OTHERS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationFinalStep excludeNoOthers();
}

View File

@ -50,6 +50,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -93,12 +94,12 @@ public interface WindowSpecificationOrderByStep extends WindowSpecificationRowsS
/**
* Add an <code>ORDER BY</code> clause to the window specification.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsStep orderBy(OrderField<?>... fields);
/**
* Add an <code>ORDER BY</code> clause to the window specification.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsStep orderBy(Collection<? extends OrderField<?>> fields);
}

View File

@ -50,6 +50,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -93,13 +94,13 @@ public interface WindowSpecificationPartitionByStep extends WindowSpecificationO
/**
* Add a <code>PARTITION BY</code> clause to the window specification.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationOrderByStep partitionBy(Field<?>... fields);
/**
* Add a <code>PARTITION BY</code> clause to the window specification.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationOrderByStep partitionBy(Collection<? extends Field<?>> fields);
/**
@ -114,6 +115,6 @@ public interface WindowSpecificationPartitionByStep extends WindowSpecificationO
* omit the clause entirely.
*/
@Deprecated
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationOrderByStep partitionByOne();
}

View File

@ -47,6 +47,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -89,35 +90,35 @@ public interface WindowSpecificationRowsAndStep {
* Add a <code>... AND UNBOUNDED PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep andUnboundedPreceding();
/**
* Add a <code>... AND [number] PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep andPreceding(int number);
/**
* Add a <code>... AND CURRENT ROW</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep andCurrentRow();
/**
* Add a <code>... AND UNBOUNDED FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep andUnboundedFollowing();
/**
* Add a <code>... AND [number] FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep andFollowing(int number);
}

View File

@ -48,6 +48,7 @@ import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.POSTGRES_11;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
@ -90,140 +91,140 @@ public interface WindowSpecificationRowsStep extends WindowSpecificationFinalSte
* Add a <code>ROWS UNBOUNDED PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE, SQLITE })
WindowSpecificationExcludeStep rowsUnboundedPreceding();
/**
* Add a <code>ROWS [number] PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rowsPreceding(int number);
/**
* Add a <code>ROWS CURRENT ROW</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rowsCurrentRow();
/**
* Add a <code>ROWS UNBOUNDED FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rowsUnboundedFollowing();
/**
* Add a <code>ROWS [number] FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rowsFollowing(int number);
/**
* Add a <code>ROWS BETWEEN UNBOUNDED PRECEDING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rowsBetweenUnboundedPreceding();
/**
* Add a <code>ROWS BETWEEN [number] PRECEDING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rowsBetweenPreceding(int number);
/**
* Add a <code>ROWS BETWEEN CURRENT ROW ...</code> frame clause to the
* window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rowsBetweenCurrentRow();
/**
* Add a <code>ROWS BETWEEN UNBOUNDED FOLLOWING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rowsBetweenUnboundedFollowing();
/**
* Add a <code>ROWS BETWEEN [number] FOLLOWING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rowsBetweenFollowing(int number);
/**
* Add a <code>RANGE UNBOUNDED PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rangeUnboundedPreceding();
/**
* Add a <code>RANGE [number] PRECEDING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rangePreceding(int number);
/**
* Add a <code>RANGE CURRENT ROW</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rangeCurrentRow();
/**
* Add a <code>RANGE UNBOUNDED FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rangeUnboundedFollowing();
/**
* Add a <code>RANGE [number] FOLLOWING</code> frame clause to the window
* specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationExcludeStep rangeFollowing(int number);
/**
* Add a <code>RANGE BETWEEN UNBOUNDED PRECEDING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rangeBetweenUnboundedPreceding();
/**
* Add a <code>RANGE BETWEEN [number] PRECEDING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rangeBetweenPreceding(int number);
/**
* Add a <code>RANGE BETWEEN CURRENT ROW ...</code> frame clause to the
* window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rangeBetweenCurrentRow();
/**
* Add a <code>RANGE BETWEEN UNBOUNDED FOLLOWING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rangeBetweenUnboundedFollowing();
/**
* Add a <code>RANGE BETWEEN [number] FOLLOWING ...</code> frame clause to
* the window specification.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
WindowSpecificationRowsAndStep rangeBetweenFollowing(int number);
/**

View File

@ -17373,7 +17373,7 @@ public class DSL {
* More information here: <a href=
* "https://blog.jooq.org/2018/09/21/how-to-write-a-multiplication-aggregate-function-in-sql">https://blog.jooq.org/2018/09/21/how-to-write-a-multiplication-aggregate-function-in-sql</a>.
*/
@Support
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
public static AggregateFunction<BigDecimal> product(Field<? extends Number> field) {
return new org.jooq.impl.Function<BigDecimal>(Term.PRODUCT, SQLDataType.NUMERIC, nullSafe(field));
}
@ -17391,7 +17391,7 @@ public class DSL {
* More information here: <a href=
* "https://blog.jooq.org/2018/09/21/how-to-write-a-multiplication-aggregate-function-in-sql">https://blog.jooq.org/2018/09/21/how-to-write-a-multiplication-aggregate-function-in-sql</a>.
*/
@Support
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
public static AggregateFunction<BigDecimal> productDistinct(Field<? extends Number> field) {
return new org.jooq.impl.Function<BigDecimal>(Term.PRODUCT, true, SQLDataType.NUMERIC, nullSafe(field));
}
@ -17870,7 +17870,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>PARTITION BY</code> clause.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationOrderByStep partitionBy(Field<?>... fields) {
return new WindowSpecificationImpl().partitionBy(fields);
}
@ -17878,7 +17878,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>PARTITION BY</code> clause.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationOrderByStep partitionBy(Collection<? extends Field<?>> fields) {
return new WindowSpecificationImpl().partitionBy(fields);
}
@ -17886,7 +17886,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with an <code>ORDER BY</code> clause.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsStep orderBy(Field<?>... fields) {
return new WindowSpecificationImpl().orderBy(fields);
}
@ -17894,7 +17894,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with an <code>ORDER BY</code> clause.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsStep orderBy(OrderField<?>... fields) {
return new WindowSpecificationImpl().orderBy(fields);
}
@ -17902,7 +17902,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with an <code>ORDER BY</code> clause.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsStep orderBy(Collection<? extends OrderField<?>> fields) {
return new WindowSpecificationImpl().orderBy(fields);
}
@ -17910,7 +17910,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rowsUnboundedPreceding() {
return new WindowSpecificationImpl().rowsUnboundedPreceding();
}
@ -17918,7 +17918,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rowsPreceding(int number) {
return new WindowSpecificationImpl().rowsPreceding(number);
}
@ -17926,7 +17926,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rowsCurrentRow() {
return new WindowSpecificationImpl().rowsCurrentRow();
}
@ -17934,7 +17934,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rowsUnboundedFollowing() {
return new WindowSpecificationImpl().rowsUnboundedFollowing();
}
@ -17942,7 +17942,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rowsFollowing(int number) {
return new WindowSpecificationImpl().rowsFollowing(number);
}
@ -17950,7 +17950,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rowsBetweenUnboundedPreceding() {
return new WindowSpecificationImpl().rowsBetweenUnboundedPreceding();
}
@ -17958,7 +17958,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rowsBetweenPreceding(int number) {
return new WindowSpecificationImpl().rowsBetweenPreceding(number);
}
@ -17966,7 +17966,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rowsBetweenCurrentRow() {
return new WindowSpecificationImpl().rowsBetweenCurrentRow();
}
@ -17974,7 +17974,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rowsBetweenUnboundedFollowing() {
return new WindowSpecificationImpl().rowsBetweenUnboundedFollowing();
}
@ -17982,7 +17982,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>ROWS</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rowsBetweenFollowing(int number) {
return new WindowSpecificationImpl().rowsBetweenFollowing(number);
}
@ -17990,7 +17990,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rangeUnboundedPreceding() {
return new WindowSpecificationImpl().rangeUnboundedPreceding();
}
@ -17998,7 +17998,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rangePreceding(int number) {
return new WindowSpecificationImpl().rangePreceding(number);
}
@ -18006,7 +18006,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rangeCurrentRow() {
return new WindowSpecificationImpl().rangeCurrentRow();
}
@ -18014,7 +18014,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rangeUnboundedFollowing() {
return new WindowSpecificationImpl().rangeUnboundedFollowing();
}
@ -18022,7 +18022,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationExcludeStep rangeFollowing(int number) {
return new WindowSpecificationImpl().rangeFollowing(number);
}
@ -18030,7 +18030,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rangeBetweenUnboundedPreceding() {
return new WindowSpecificationImpl().rangeBetweenUnboundedPreceding();
}
@ -18038,7 +18038,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rangeBetweenPreceding(int number) {
return new WindowSpecificationImpl().rangeBetweenPreceding(number);
}
@ -18046,7 +18046,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rangeBetweenCurrentRow() {
return new WindowSpecificationImpl().rangeBetweenCurrentRow();
}
@ -18054,7 +18054,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rangeBetweenUnboundedFollowing() {
return new WindowSpecificationImpl().rangeBetweenUnboundedFollowing();
}
@ -18062,7 +18062,7 @@ public class DSL {
/**
* Create a {@link WindowSpecification} with a <code>RANGE</code> clause.
*/
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowSpecificationRowsAndStep rangeBetweenFollowing(int number) {
return new WindowSpecificationImpl().rangeBetweenFollowing(number);
}
@ -18160,7 +18160,7 @@ public class DSL {
* {@link SQLDialect#HSQLDB} can emulate this function using
* <code>ROWNUM()</code>
*/
@Support({ CUBRID, DERBY, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, DERBY, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<Integer> rowNumber() {
return new org.jooq.impl.Function<Integer>(ROW_NUMBER, SQLDataType.INTEGER);
}
@ -18168,7 +18168,7 @@ public class DSL {
/**
* The <code>rank() over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<Integer> rank() {
return new org.jooq.impl.Function<Integer>("rank", SQLDataType.INTEGER);
}
@ -18176,7 +18176,7 @@ public class DSL {
/**
* The <code>dense_rank() over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<Integer> denseRank() {
return new org.jooq.impl.Function<Integer>("dense_rank", SQLDataType.INTEGER);
}
@ -18184,7 +18184,7 @@ public class DSL {
/**
* The <code>precent_rank() over ([analytic clause])</code> function.
*/
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<BigDecimal> percentRank() {
return new org.jooq.impl.Function<BigDecimal>("percent_rank", SQLDataType.NUMERIC);
}
@ -18192,7 +18192,7 @@ public class DSL {
/**
* The <code>cume_dist() over ([analytic clause])</code> function.
*/
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<BigDecimal> cumeDist() {
return new org.jooq.impl.Function<BigDecimal>("cume_dist", SQLDataType.NUMERIC);
}
@ -18200,7 +18200,7 @@ public class DSL {
/**
* The <code>ntile([number]) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<Integer> ntile(int number) {
return new org.jooq.impl.Function<Integer>("ntile", SQLDataType.INTEGER, inline(number));
}
@ -18208,7 +18208,7 @@ public class DSL {
/**
* The <code>ratio_to_report([expression]) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<BigDecimal> ratioToReport(Number number) {
return ratioToReport(Tools.field(number));
}
@ -18216,7 +18216,7 @@ public class DSL {
/**
* The <code>ratio_to_report([expression]) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static WindowOverStep<BigDecimal> ratioToReport(Field<? extends Number> field) {
return new RatioToReport(nullSafe(field));
}
@ -18224,7 +18224,7 @@ public class DSL {
/**
* The <code>first_value(field) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> firstValue(Field<T> field) {
return new org.jooq.impl.Function<T>("first_value", nullSafeDataType(field), nullSafe(field));
}
@ -18232,7 +18232,7 @@ public class DSL {
/**
* The <code>last_value(field) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lastValue(Field<T> field) {
return new org.jooq.impl.Function<T>("last_value", nullSafeDataType(field), nullSafe(field));
}
@ -18240,7 +18240,7 @@ public class DSL {
/**
* The <code>nth_value(field) over ([analytic clause])</code> function.
*/
@Support({ FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowFromFirstLastStep<T> nthValue(Field<T> field, int nth) {
return nthValue(field, val(nth));
}
@ -18248,7 +18248,7 @@ public class DSL {
/**
* The <code>nth_value(field) over ([analytic clause])</code> function.
*/
@Support({ FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowFromFirstLastStep<T> nthValue(Field<T> field, Field<Integer> nth) {
return new org.jooq.impl.Function<T>("nth_value", nullSafeDataType(field), nullSafe(field), nullSafe(nth));
}
@ -18256,7 +18256,7 @@ public class DSL {
/**
* The <code>lead(field) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lead(Field<T> field) {
return new LeadLag<T>("lead", nullSafe(field));
}
@ -18264,7 +18264,7 @@ public class DSL {
/**
* The <code>lead(field, offset) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lead(Field<T> field, int offset) {
return new LeadLag<T>("lead", nullSafe(field), offset);
}
@ -18274,7 +18274,7 @@ public class DSL {
* <code>lead(field, offset, defaultValue) over ([analytic clause])</code>
* function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lead(Field<T> field, int offset, T defaultValue) {
return lead(nullSafe(field), offset, Tools.field(defaultValue, field));
}
@ -18284,7 +18284,7 @@ public class DSL {
* <code>lead(field, offset, defaultValue) over ([analytic clause])</code>
* function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lead(Field<T> field, int offset, Field<T> defaultValue) {
return new LeadLag<T>("lead", nullSafe(field), offset, nullSafe(defaultValue));
}
@ -18292,7 +18292,7 @@ public class DSL {
/**
* The <code>lag(field) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lag(Field<T> field) {
return new LeadLag<T>("lag", nullSafe(field));
}
@ -18300,7 +18300,7 @@ public class DSL {
/**
* The <code>lag(field, offset) over ([analytic clause])</code> function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MARIADB, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lag(Field<T> field, int offset) {
return new LeadLag<T>("lag", nullSafe(field), offset);
}
@ -18310,7 +18310,7 @@ public class DSL {
* <code>lag(field, offset, defaultValue) over ([analytic clause])</code>
* function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lag(Field<T> field, int offset, T defaultValue) {
return lag(nullSafe(field), offset, Tools.field(defaultValue, field));
}
@ -18320,7 +18320,7 @@ public class DSL {
* <code>lag(field, offset, defaultValue) over ([analytic clause])</code>
* function.
*/
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES })
@Support({ CUBRID, FIREBIRD_3_0, H2, MYSQL_8_0, POSTGRES, SQLITE })
public static <T> WindowIgnoreNullsStep<T> lag(Field<T> field, int offset, Field<T> defaultValue) {
return new LeadLag<T>("lag", nullSafe(field), offset, nullSafe(defaultValue));
}

View File

@ -37,11 +37,14 @@
*/
package org.jooq.impl;
import static org.jooq.SQLDialect.SQLITE;
import static org.jooq.impl.SQLDataType.DECIMAL;
import static org.jooq.impl.SQLDataType.DOUBLE;
import java.math.BigDecimal;
import org.jooq.Context;
import org.jooq.DataType;
import org.jooq.Field;
/**
@ -79,7 +82,7 @@ final class RatioToReport extends Function<BigDecimal> {
default:
ctx.visit(field.cast(DECIMAL))
ctx.visit(field.cast((DataType<?>) (ctx.family() == SQLITE ? DOUBLE : DECIMAL)))
.sql(" / ")
.visit(DSL.sum(field));
toSQLOverClause(ctx);

View File

@ -202,7 +202,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
private static final EnumSet<SQLDialect> NO_SUPPORT_FOR_UPDATE = EnumSet.of(CUBRID);
private static final EnumSet<SQLDialect> NO_SUPPORT_FOR_UPDATE_QUALIFIED = EnumSet.of(DERBY, FIREBIRD, H2, HSQLDB);
private static final EnumSet<SQLDialect> SUPPORT_SELECT_INTO = EnumSet.of(HSQLDB, POSTGRES);
static final EnumSet<SQLDialect> SUPPORT_WINDOW_CLAUSE = EnumSet.of(H2, MYSQL, POSTGRES);
static final EnumSet<SQLDialect> SUPPORT_WINDOW_CLAUSE = EnumSet.of(H2, MYSQL, POSTGRES, SQLITE);
private static final EnumSet<SQLDialect> REQUIRES_FROM_CLAUSE = EnumSet.of(CUBRID, DERBY, FIREBIRD, HSQLDB, MARIADB, MYSQL);
private static final EnumSet<SQLDialect> EMULATE_EMPTY_GROUP_BY_OTHER = EnumSet.of(FIREBIRD, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE);

View File

@ -41,6 +41,7 @@ package org.jooq.impl;
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.MYSQL;
import static org.jooq.SQLDialect.SQLITE;
// ...
import static org.jooq.impl.DSL.one;
import static org.jooq.impl.Keywords.K_AND;
@ -93,7 +94,7 @@ final class WindowSpecificationImpl extends AbstractQueryPart implements
* Generated UID
*/
private static final long serialVersionUID = 2996016924769376361L;
private static final EnumSet<SQLDialect> OMIT_PARTITION_BY_ONE = EnumSet.of(CUBRID, MYSQL);
private static final EnumSet<SQLDialect> OMIT_PARTITION_BY_ONE = EnumSet.of(CUBRID, MYSQL, SQLITE);
private final WindowDefinitionImpl windowDefinition;
private final QueryPartList<Field<?>> partitionBy;