[#981] Cannot insertInto(table("my_table")), as plain SQL tables return Table<Record>, not Table<TableRecord>. Relax bound on R - Fixed DELETE, MERGE
This commit is contained in:
parent
6a8f570740
commit
449333c143
@ -296,17 +296,17 @@ public class FactoryProxy implements FactoryOperations, MethodInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <R extends TableRecord<R>> MergeUsingStep<R> mergeInto(Table<R> table) {
|
||||
public final <R extends Record> MergeUsingStep<R> mergeInto(Table<R> table) {
|
||||
return getDelegate().mergeInto(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <R extends TableRecord<R>> DeleteQuery<R> deleteQuery(Table<R> table) {
|
||||
public final <R extends Record> DeleteQuery<R> deleteQuery(Table<R> table) {
|
||||
return getDelegate().deleteQuery(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <R extends TableRecord<R>> DeleteWhereStep<R> delete(Table<R> table) {
|
||||
public final <R extends Record> DeleteWhereStep<R> delete(Table<R> table) {
|
||||
return getDelegate().delete(table);
|
||||
}
|
||||
|
||||
|
||||
@ -40,6 +40,6 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface Delete<R extends TableRecord<R>> extends Query {
|
||||
public interface Delete<R extends Record> extends Query {
|
||||
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ import org.jooq.impl.Factory;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface DeleteConditionStep<R extends TableRecord<R>> extends DeleteFinalStep<R> {
|
||||
public interface DeleteConditionStep<R extends Record> extends DeleteFinalStep<R> {
|
||||
|
||||
/**
|
||||
* Combine the currently assembled conditions with another one using the
|
||||
|
||||
@ -48,6 +48,6 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface DeleteFinalStep<R extends TableRecord<R>> extends Delete<R> {
|
||||
public interface DeleteFinalStep<R extends Record> extends Delete<R> {
|
||||
|
||||
}
|
||||
|
||||
@ -42,6 +42,6 @@ package org.jooq;
|
||||
* @param <R> The record type of the table being deleted from
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface DeleteQuery<R extends TableRecord<R>> extends ConditionProvider, Delete<R> {
|
||||
public interface DeleteQuery<R extends Record> extends ConditionProvider, Delete<R> {
|
||||
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ import org.jooq.impl.Factory;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface DeleteWhereStep<R extends TableRecord<R>> extends DeleteFinalStep<R> {
|
||||
public interface DeleteWhereStep<R extends Record> extends DeleteFinalStep<R> {
|
||||
|
||||
/**
|
||||
* Add conditions to the query
|
||||
|
||||
@ -467,7 +467,7 @@ public interface FactoryOperations extends Configuration {
|
||||
* .execute();
|
||||
* </pre></code>
|
||||
*/
|
||||
<R extends TableRecord<R>> MergeUsingStep<R> mergeInto(Table<R> table);
|
||||
<R extends Record> MergeUsingStep<R> mergeInto(Table<R> table);
|
||||
|
||||
/**
|
||||
* Create a new {@link DeleteQuery}
|
||||
@ -475,7 +475,7 @@ public interface FactoryOperations extends Configuration {
|
||||
* @param table The table to delete data from
|
||||
* @return The new {@link DeleteQuery}
|
||||
*/
|
||||
<R extends TableRecord<R>> DeleteQuery<R> deleteQuery(Table<R> table);
|
||||
<R extends Record> DeleteQuery<R> deleteQuery(Table<R> table);
|
||||
|
||||
/**
|
||||
* Create a new DSL delete statement.
|
||||
@ -488,7 +488,7 @@ public interface FactoryOperations extends Configuration {
|
||||
* .execute();
|
||||
* </pre></code>
|
||||
*/
|
||||
<R extends TableRecord<R>> DeleteWhereStep<R> delete(Table<R> table);
|
||||
<R extends Record> DeleteWhereStep<R> delete(Table<R> table);
|
||||
|
||||
/**
|
||||
* Execute a set of queries in batch mode (without bind values).
|
||||
|
||||
@ -40,6 +40,6 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface Merge<R extends TableRecord<R>> extends Query {
|
||||
public interface Merge<R extends Record> extends Query {
|
||||
|
||||
}
|
||||
|
||||
@ -54,6 +54,6 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeFinalStep<R extends TableRecord<R>> extends Merge<R> {
|
||||
public interface MergeFinalStep<R extends Record> extends Merge<R> {
|
||||
|
||||
}
|
||||
|
||||
@ -54,6 +54,6 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeMatchedSetMoreStep<R extends TableRecord<R>> extends MergeMatchedSetStep<R>, MergeNotMatchedStep<R> {
|
||||
public interface MergeMatchedSetMoreStep<R extends Record> extends MergeMatchedSetStep<R>, MergeNotMatchedStep<R> {
|
||||
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ import java.util.Map;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeMatchedSetStep<R extends TableRecord<R>> {
|
||||
public interface MergeMatchedSetStep<R extends Record> {
|
||||
|
||||
/**
|
||||
* Set values for <code>UPDATE</code> in the <code>MERGE</code> statement's
|
||||
|
||||
@ -54,7 +54,7 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeMatchedStep<R extends TableRecord<R>> {
|
||||
public interface MergeMatchedStep<R extends Record> {
|
||||
|
||||
/**
|
||||
* Add the <code>WHEN MATCHED THEN UPDATE</code> clause to the
|
||||
|
||||
@ -56,7 +56,7 @@ import java.util.Collection;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeNotMatchedStep<R extends TableRecord<R>> {
|
||||
public interface MergeNotMatchedStep<R extends Record> {
|
||||
|
||||
/**
|
||||
* Add the <code>WHEN NOT MATCHED THEN INSERT</code> clause to the
|
||||
|
||||
@ -56,7 +56,7 @@ import java.util.Collection;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeNotMatchedValuesStep<R extends TableRecord<R>> {
|
||||
public interface MergeNotMatchedValuesStep<R extends Record> {
|
||||
|
||||
/**
|
||||
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
|
||||
|
||||
@ -56,7 +56,7 @@ import org.jooq.impl.Factory;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeOnConditionStep<R extends TableRecord<R>> extends MergeMatchedStep<R> {
|
||||
public interface MergeOnConditionStep<R extends Record> extends MergeMatchedStep<R> {
|
||||
|
||||
/**
|
||||
* Combine the currently assembled conditions with another one using the
|
||||
|
||||
@ -56,7 +56,7 @@ import org.jooq.impl.Factory;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeOnStep<R extends TableRecord<R>> {
|
||||
public interface MergeOnStep<R extends Record> {
|
||||
|
||||
/**
|
||||
* Provide join conditions and proceed to the next step
|
||||
|
||||
@ -54,7 +54,7 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface MergeUsingStep<R extends TableRecord<R>> {
|
||||
public interface MergeUsingStep<R extends Record> {
|
||||
|
||||
/**
|
||||
* Add the <code>USING</code> clause to the <code>MERGE</code> statement
|
||||
|
||||
@ -40,6 +40,6 @@ package org.jooq;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface Update<R extends TableRecord<R>> extends Query {
|
||||
public interface Update<R extends Record> extends Query {
|
||||
|
||||
}
|
||||
|
||||
@ -46,14 +46,14 @@ import org.jooq.Configuration;
|
||||
import org.jooq.DeleteConditionStep;
|
||||
import org.jooq.DeleteWhereStep;
|
||||
import org.jooq.Operator;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableRecord;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
class DeleteImpl<R extends TableRecord<R>>
|
||||
class DeleteImpl<R extends Record>
|
||||
extends AbstractDelegatingQueryPart<DeleteQueryImpl<R>>
|
||||
implements
|
||||
|
||||
|
||||
@ -45,14 +45,14 @@ import org.jooq.Condition;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.DeleteQuery;
|
||||
import org.jooq.Operator;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.RenderContext;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableRecord;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
class DeleteQueryImpl<R extends TableRecord<R>> extends AbstractQuery implements DeleteQuery<R> {
|
||||
class DeleteQueryImpl<R extends Record> extends AbstractQuery implements DeleteQuery<R> {
|
||||
|
||||
private static final long serialVersionUID = -1943687511774150929L;
|
||||
|
||||
|
||||
@ -980,7 +980,7 @@ public class Factory implements FactoryOperations {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public final <R extends TableRecord<R>> MergeUsingStep<R> mergeInto(Table<R> table) {
|
||||
public final <R extends Record> MergeUsingStep<R> mergeInto(Table<R> table) {
|
||||
return new MergeImpl<R>(this, table);
|
||||
}
|
||||
|
||||
@ -988,7 +988,7 @@ public class Factory implements FactoryOperations {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public final <R extends TableRecord<R>> DeleteQuery<R> deleteQuery(Table<R> table) {
|
||||
public final <R extends Record> DeleteQuery<R> deleteQuery(Table<R> table) {
|
||||
return new DeleteQueryImpl<R>(this, table);
|
||||
}
|
||||
|
||||
@ -996,7 +996,7 @@ public class Factory implements FactoryOperations {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public final <R extends TableRecord<R>> DeleteWhereStep<R> delete(Table<R> table) {
|
||||
public final <R extends Record> DeleteWhereStep<R> delete(Table<R> table) {
|
||||
return new DeleteImpl<R>(this, table);
|
||||
}
|
||||
|
||||
|
||||
@ -59,17 +59,17 @@ import org.jooq.MergeOnConditionStep;
|
||||
import org.jooq.MergeOnStep;
|
||||
import org.jooq.MergeUsingStep;
|
||||
import org.jooq.Operator;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.RenderContext;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
import org.jooq.TableRecord;
|
||||
import org.jooq.tools.StringUtils;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
class MergeImpl<R extends TableRecord<R>> extends AbstractQuery
|
||||
class MergeImpl<R extends Record> extends AbstractQuery
|
||||
implements
|
||||
|
||||
// Cascading interface implementations for Merge behaviour
|
||||
|
||||
Loading…
Reference in New Issue
Block a user