[jOOQ/jOOQ#13195] [jOOQ/jOOQ#13271] Support UPDATE .. FROM in SQLite

This commit is contained in:
Lukas Eder 2022-03-14 12:50:33 +01:00
parent 8c00ea2a51
commit 78b5fbfdeb
3 changed files with 14 additions and 12 deletions

View File

@ -45,6 +45,7 @@ package org.jooq;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
@ -93,21 +94,21 @@ public interface UpdateFromStep<R extends Record> extends UpdateWhereStep<R> {
* Add a <code>FROM</code> clause to the query.
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
UpdateWhereStep<R> from(TableLike<?> table);
/**
* Add a <code>FROM</code> clause to the query.
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
UpdateWhereStep<R> from(TableLike<?>... table);
/**
* Add a <code>FROM</code> clause to the query.
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
UpdateWhereStep<R> from(Collection<? extends TableLike<?>> tables);
/**
@ -122,7 +123,7 @@ public interface UpdateFromStep<R extends Record> extends UpdateWhereStep<R> {
* @see SQL
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
@PlainSQL
UpdateWhereStep<R> from(SQL sql);
@ -138,7 +139,7 @@ public interface UpdateFromStep<R extends Record> extends UpdateWhereStep<R> {
* @see SQL
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
@PlainSQL
UpdateWhereStep<R> from(String sql);
@ -155,7 +156,7 @@ public interface UpdateFromStep<R extends Record> extends UpdateWhereStep<R> {
* @see SQL
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
@PlainSQL
UpdateWhereStep<R> from(String sql, Object... bindings);
@ -172,7 +173,7 @@ public interface UpdateFromStep<R extends Record> extends UpdateWhereStep<R> {
* @see SQL
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
@PlainSQL
UpdateWhereStep<R> from(String sql, QueryPart... parts);
@ -182,6 +183,6 @@ public interface UpdateFromStep<R extends Record> extends UpdateWhereStep<R> {
* @see DSL#table(Name)
*/
@NotNull @CheckReturnValue
@Support({ POSTGRES })
@Support({ POSTGRES, SQLITE })
UpdateWhereStep<R> from(Name name);
}

View File

@ -52,6 +52,7 @@ import static org.jooq.SQLDialect.HSQLDB;
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
import static org.jooq.SQLDialect.YUGABYTEDB;
@ -361,7 +362,7 @@ public interface UpdateQuery<R extends Record> extends StoreQuery<R>, ConditionP
*
* @param from The added tables
*/
@Support({ POSTGRES, YUGABYTEDB })
@Support({ POSTGRES, SQLITE, YUGABYTEDB })
void addFrom(TableLike<?> from);
/**
@ -369,7 +370,7 @@ public interface UpdateQuery<R extends Record> extends StoreQuery<R>, ConditionP
*
* @param from The added tables
*/
@Support({ POSTGRES, YUGABYTEDB })
@Support({ POSTGRES, SQLITE, YUGABYTEDB })
void addFrom(TableLike<?>... from);
/**
@ -377,7 +378,7 @@ public interface UpdateQuery<R extends Record> extends StoreQuery<R>, ConditionP
*
* @param from The added tables
*/
@Support({ POSTGRES, YUGABYTEDB })
@Support({ POSTGRES, SQLITE, YUGABYTEDB })
void addFrom(Collection<? extends TableLike<?>> from);
// ------------------------------------------------------------------------

View File

@ -22,7 +22,7 @@
<!-- These in-memory DBs are used by jOOQ-meta-extensions and a variety of integration tests -->
<h2.version>2.1.210</h2.version>
<sqlite.version>3.32.3.2</sqlite.version>
<sqlite.version>3.36.0.3</sqlite.version>
<derby.version>10.14.2.0</derby.version>
<hsqldb.version>2.5.1</hsqldb.version>