[#981] Cannot insertInto(table("my_table")), as plain SQL tables return Table<Record>, not Table<TableRecord>. Relax bound on R - Fixed UPDATE

This commit is contained in:
Lukas Eder 2011-12-10 15:54:32 +00:00
parent 449333c143
commit fcca200ee7
13 changed files with 19 additions and 19 deletions

View File

@ -286,12 +286,12 @@ public class FactoryProxy implements FactoryOperations, MethodInterceptor {
}
@Override
public final <R extends TableRecord<R>> UpdateQuery<R> updateQuery(Table<R> table) {
public final <R extends Record> UpdateQuery<R> updateQuery(Table<R> table) {
return getDelegate().updateQuery(table);
}
@Override
public final <R extends TableRecord<R>> UpdateSetStep<R> update(Table<R> table) {
public final <R extends Record> UpdateSetStep<R> update(Table<R> table) {
return getDelegate().update(table);
}

View File

@ -387,7 +387,7 @@ public interface FactoryOperations extends Configuration {
* @param table The table to update data into
* @return The new {@link UpdateQuery}
*/
<R extends TableRecord<R>> UpdateQuery<R> updateQuery(Table<R> table);
<R extends Record> UpdateQuery<R> updateQuery(Table<R> table);
/**
* Create a new DSL update statement.
@ -402,7 +402,7 @@ public interface FactoryOperations extends Configuration {
* .execute();
* </pre></code>
*/
<R extends TableRecord<R>> UpdateSetStep<R> update(Table<R> table);
<R extends Record> UpdateSetStep<R> update(Table<R> table);
/**
* Create a new DSL merge statement.

View File

@ -45,7 +45,7 @@ import java.util.Map;
* @param <R> The record type of the table being modified
* @author Lukas Eder
*/
public interface StoreQuery<R extends TableRecord<R>> extends Query {
public interface StoreQuery<R extends Record> extends Query {
/**
* Add values to the store statement

View File

@ -52,7 +52,7 @@ import org.jooq.impl.Factory;
*
* @author Lukas Eder
*/
public interface UpdateConditionStep<R extends TableRecord<R>> extends UpdateFinalStep<R> {
public interface UpdateConditionStep<R extends Record> extends UpdateFinalStep<R> {
/**
* Combine the currently assembled conditions with another one using the

View File

@ -50,6 +50,6 @@ package org.jooq;
*
* @author Lukas Eder
*/
public interface UpdateFinalStep<R extends TableRecord<R>> extends Update<R> {
public interface UpdateFinalStep<R extends Record> extends Update<R> {
}

View File

@ -42,6 +42,6 @@ package org.jooq;
* @param <R> The record type of the table being updated
* @author Lukas Eder
*/
public interface UpdateQuery<R extends TableRecord<R>> extends StoreQuery<R>, ConditionProvider, Update<R> {
public interface UpdateQuery<R extends Record> extends StoreQuery<R>, ConditionProvider, Update<R> {
}

View File

@ -50,6 +50,6 @@ package org.jooq;
*
* @author Lukas Eder
*/
public interface UpdateSetMoreStep<R extends TableRecord<R>> extends UpdateSetStep<R>, UpdateWhereStep<R> {
public interface UpdateSetMoreStep<R extends Record> extends UpdateSetStep<R>, UpdateWhereStep<R> {
}

View File

@ -52,7 +52,7 @@ import java.util.Map;
*
* @author Lukas Eder
*/
public interface UpdateSetStep<R extends TableRecord<R>> {
public interface UpdateSetStep<R extends Record> {
/**
* Set a value for a field in the <code>UPDATE</code> statement

View File

@ -54,7 +54,7 @@ import org.jooq.impl.Factory;
*
* @author Lukas Eder
*/
public interface UpdateWhereStep<R extends TableRecord<R>> extends UpdateFinalStep<R> {
public interface UpdateWhereStep<R extends Record> extends UpdateFinalStep<R> {
/**
* Add conditions to the query

View File

@ -46,16 +46,16 @@ import org.jooq.ArrayRecord;
import org.jooq.Attachable;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.StoreQuery;
import org.jooq.Table;
import org.jooq.TableRecord;
/**
* A default implementation for store queries.
*
* @author Lukas Eder
*/
abstract class AbstractStoreQuery<R extends TableRecord<R>> extends AbstractQuery implements StoreQuery<R> {
abstract class AbstractStoreQuery<R extends Record> extends AbstractQuery implements StoreQuery<R> {
/**
* Generated UID

View File

@ -964,7 +964,7 @@ public class Factory implements FactoryOperations {
* {@inheritDoc}
*/
@Override
public final <R extends TableRecord<R>> UpdateQuery<R> updateQuery(Table<R> table) {
public final <R extends Record> UpdateQuery<R> updateQuery(Table<R> table) {
return new UpdateQueryImpl<R>(this, table);
}
@ -972,7 +972,7 @@ public class Factory implements FactoryOperations {
* {@inheritDoc}
*/
@Override
public final <R extends TableRecord<R>> UpdateSetStep<R> update(Table<R> table) {
public final <R extends Record> UpdateSetStep<R> update(Table<R> table) {
return new UpdateImpl<R>(this, table);
}

View File

@ -46,9 +46,9 @@ import org.jooq.Condition;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.Operator;
import org.jooq.Record;
import org.jooq.Select;
import org.jooq.Table;
import org.jooq.TableRecord;
import org.jooq.UpdateConditionStep;
import org.jooq.UpdateQuery;
import org.jooq.UpdateSetMoreStep;
@ -58,7 +58,7 @@ import org.jooq.UpdateSetMoreStep;
*
* @author Lukas Eder
*/
final class UpdateImpl<R extends TableRecord<R>>
final class UpdateImpl<R extends Record>
extends AbstractDelegatingQueryPart<UpdateQuery<R>>
implements

View File

@ -46,15 +46,15 @@ import org.jooq.Condition;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.Operator;
import org.jooq.Record;
import org.jooq.RenderContext;
import org.jooq.Table;
import org.jooq.TableRecord;
import org.jooq.UpdateQuery;
/**
* @author Lukas Eder
*/
class UpdateQueryImpl<R extends TableRecord<R>> extends AbstractStoreQuery<R> implements UpdateQuery<R> {
class UpdateQueryImpl<R extends Record> extends AbstractStoreQuery<R> implements UpdateQuery<R> {
private static final long serialVersionUID = -660460731970074719L;