[jOOQ/jOOQ#11495] Remove pre 3.5 deprecated API
This commit is contained in:
parent
aa38783f25
commit
fd756190b1
@ -3418,31 +3418,6 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -73,12 +73,6 @@ public class CatalogDefinition extends AbstractDefinition {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public final String getOutputName() {
|
||||
return getDatabase().getOutputCatalog(getInputName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Definition> getDefinitionPath() {
|
||||
return asList(this);
|
||||
|
||||
@ -75,15 +75,6 @@ public interface ColumnDefinition extends TypedElementDefinition<TableDefinition
|
||||
*/
|
||||
boolean isIdentity();
|
||||
|
||||
/**
|
||||
* Whether the column is nullable.
|
||||
*
|
||||
* @deprecated - [#2699] - 3.2.0 - Use
|
||||
* {@link DataTypeDefinition#isNullable()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isNullable();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -120,11 +120,6 @@ public class DefaultColumnDefinition
|
||||
return isIdentity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isNullable() {
|
||||
return getType().isNullable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -110,22 +110,6 @@ package org.jooq;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -58,63 +58,4 @@ import org.jetbrains.annotations.NotNull;
|
||||
@Internal
|
||||
public interface BindContext extends Context<BindContext> {
|
||||
|
||||
/**
|
||||
* Bind values from a {@link QueryPart}. This will also increment the
|
||||
* internal counter.
|
||||
*
|
||||
* @throws DataAccessException If something went wrong while binding a
|
||||
* variable
|
||||
* @deprecated - 3.2.0 - [#2666] - Use {@link #visit(QueryPart)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
BindContext bind(QueryPart part) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Bind values from several {@link QueryPart}'s. This will also increment
|
||||
* the internal counter.
|
||||
*
|
||||
* @throws DataAccessException If something went wrong while binding a
|
||||
* variable
|
||||
* @deprecated - 3.2.0 - [#2666] - Use {@link #visit(QueryPart)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
BindContext bind(Collection<? extends QueryPart> parts) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Bind values from several {@link QueryPart}'s. This will also increment
|
||||
* the internal counter.
|
||||
*
|
||||
* @throws DataAccessException If something went wrong while binding a
|
||||
* variable
|
||||
* @deprecated - 3.2.0 - [#2666] - Use {@link #visit(QueryPart)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
BindContext bind(QueryPart[] parts) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Bind a value using a specific type. This will also increment the internal
|
||||
* counter.
|
||||
*
|
||||
* @throws DataAccessException If something went wrong while binding a
|
||||
* variable
|
||||
* @deprecated - 3.4.0 - [#3114] - Use {@link #bindValue(Object, Field)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
BindContext bindValue(Object value, Class<?> type) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Bind several values. This will also increment the internal counter.
|
||||
*
|
||||
* @throws DataAccessException If something went wrong while binding a
|
||||
* variable
|
||||
* @deprecated - 3.4.0 - [#3114] - Use {@link #bindValue(Object, Field)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
BindContext bindValues(Object... values) throws DataAccessException;
|
||||
|
||||
}
|
||||
|
||||
@ -761,44 +761,4 @@ public interface Context<C extends Context<C>> extends Scope {
|
||||
*/
|
||||
@NotNull
|
||||
C castModeIf(CastMode mode, boolean condition);
|
||||
|
||||
/**
|
||||
* Whether casting must be applied. The result follows this logic:
|
||||
* <table border="1">
|
||||
* <tr>
|
||||
* <th>CastMode</th>
|
||||
* <th>result</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>ALWAYS</code></td>
|
||||
* <td><code>true</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>NEVER</code></td>
|
||||
* <td><code>false</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>SOME</code></td>
|
||||
* <td><code>true</code> or <code>false</code> depending on the dialect</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>DEFAULT</code></td>
|
||||
* <td><code>null</code></td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* @deprecated - [#3703] - 3.5.0 - Do not use this any longer
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Boolean cast();
|
||||
|
||||
/**
|
||||
* Set the new cast mode to {@link CastMode#SOME} for a list of dialects.
|
||||
*
|
||||
* @deprecated - [#3703] - 3.5.0 - Do not use this any longer
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
C castModeSome(SQLDialect... dialects);
|
||||
}
|
||||
|
||||
@ -812,13 +812,6 @@ public interface DSLContext extends Scope {
|
||||
@NotNull
|
||||
BindContext bindContext(PreparedStatement stmt);
|
||||
|
||||
/**
|
||||
* @deprecated - [#2662] - 3.2.0 - Do not reuse this method. It will be
|
||||
* removed with jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
int bind(QueryPart part, PreparedStatement stmt);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX Attachable and Serializable API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* Fetch results asynchronously.
|
||||
* <p>
|
||||
* This type wraps fetching of records in a {@link java.util.concurrent.Future},
|
||||
* such that you can access the actual records at a future instant. This is
|
||||
* especially useful when
|
||||
* <ul>
|
||||
* <li>You want to load heavy data in the background, for instance when the user
|
||||
* logs in and accesses a pre-calculated dashboard screen, before they access
|
||||
* the heavy data.</li>
|
||||
* <li>You want to parallelise several independent OLAP queries before merging
|
||||
* all data into a single report</li>
|
||||
* <li>...</li>
|
||||
* </ul>
|
||||
*
|
||||
* @deprecated - 3.2.0 - [#2581] - This type will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface FutureResult<R extends Record> extends Future<Result<R>> {
|
||||
|
||||
}
|
||||
@ -175,26 +175,6 @@ public interface Query extends Statement, Attachable, AutoCloseable {
|
||||
@NotNull
|
||||
String getSQL();
|
||||
|
||||
/**
|
||||
* Retrieve the SQL code rendered by this Query.
|
||||
* <p>
|
||||
* [#1520] Note that the query actually being executed might not contain any
|
||||
* bind variables, in case the number of bind variables exceeds your SQL
|
||||
* dialect's maximum number of supported bind variables. This is not
|
||||
* reflected by this method, which will only use <code>inline</code>
|
||||
* argument to decide whether to render bind values.
|
||||
* <p>
|
||||
* See {@link #getSQL()} for more details.
|
||||
*
|
||||
* @param inline Whether to inline bind variables. This overrides values in
|
||||
* {@link Settings#getStatementType()}
|
||||
* @return The generated SQL
|
||||
* @deprecated - [#2414] - 3.1.0 - Use {@link #getSQL(ParamType)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
String getSQL(boolean inline);
|
||||
|
||||
/**
|
||||
* Retrieve the SQL code rendered by this Query.
|
||||
* <p>
|
||||
|
||||
@ -70,33 +70,6 @@ public interface QueryPartInternal extends QueryPart {
|
||||
@Deprecated
|
||||
void accept(Context<?> ctx);
|
||||
|
||||
/**
|
||||
* Render this {@link QueryPart} to a SQL string contained in
|
||||
* <code>context.sql()</code>. The <code>context</code> will contain
|
||||
* additional information about how to render this <code>QueryPart</code>,
|
||||
* e.g. whether this <code>QueryPart</code> should be rendered as a
|
||||
* declaration or reference, whether this <code>QueryPart</code>'s contained
|
||||
* bind variables should be inlined or replaced by <code>'?'</code>, etc.
|
||||
*
|
||||
* @deprecated - 3.4.0 - [#2694] - Use {@link #accept(Context)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
void toSQL(RenderContext ctx);
|
||||
|
||||
/**
|
||||
* Bind all parameters of this {@link QueryPart} to a PreparedStatement
|
||||
* <p>
|
||||
* This method is for JOOQ INTERNAL USE only. Do not reference directly
|
||||
*
|
||||
* @param ctx The context holding the next bind index and other information
|
||||
* for variable binding
|
||||
* @throws DataAccessException If something went wrong while binding a
|
||||
* variable
|
||||
* @deprecated - 3.4.0 - [#2694] - Use {@link #accept(Context)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
void bind(BindContext ctx) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* The {@link Clause}s that are represented by this query part.
|
||||
* <p>
|
||||
|
||||
@ -1438,21 +1438,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<T> T getValue(Field<T> field) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Get a value from this record, providing a field.
|
||||
*
|
||||
* @param <T> The generic field parameter
|
||||
* @param field The field
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field contained in this record, or defaultValue,
|
||||
* if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument field is not contained
|
||||
* in {@link #fieldsRow()}
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<T> T getValue(Field<T> field, T defaultValue) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this Record, providing a field.
|
||||
* <p>
|
||||
@ -1463,28 +1448,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<T> T getValue(Field<?> field, Class<? extends T> type) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field.
|
||||
* <p>
|
||||
* The {@link Converter} that is provided by
|
||||
* {@link Configuration#converterProvider()} will be used to convert the
|
||||
* value to <code>U</code>
|
||||
*
|
||||
* @param <U> The conversion type parameter
|
||||
* @param field The field
|
||||
* @param type The conversion type
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field contained in this record, or defaultValue,
|
||||
* if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument field is not contained
|
||||
* in {@link #fieldsRow()}
|
||||
* @throws DataTypeException wrapping any data type conversion exception
|
||||
* that might have occurred
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<U> U getValue(Field<?> field, Class<? extends U> type, U defaultValue) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this Record, providing a field.
|
||||
* <p>
|
||||
@ -1495,25 +1458,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<T, U> U getValue(Field<T> field, Converter<? super T, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field.
|
||||
*
|
||||
* @param <T> The database type parameter
|
||||
* @param <U> The conversion type parameter
|
||||
* @param field The field
|
||||
* @param converter The data type converter
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field contained in this record, or defaultValue,
|
||||
* if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument field is not contained
|
||||
* in {@link #fieldsRow()}
|
||||
* @throws DataTypeException wrapping any data type conversion exception
|
||||
* that might have occurred
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<T, U> U getValue(Field<T> field, Converter<? super T, ? extends U> converter, U defaultValue) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a value from this Record, providing a field name.
|
||||
* <p>
|
||||
@ -1524,20 +1468,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
Object getValue(String fieldName) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Get a value from this record, providing a field name.
|
||||
*
|
||||
* @param fieldName The field's name
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field's name contained in this record, or
|
||||
* defaultValue, if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument fieldName is not
|
||||
* contained in the record
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
Object getValue(String fieldName, Object defaultValue) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this Record, providing a field name.
|
||||
* <p>
|
||||
@ -1548,28 +1478,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<T> T getValue(String fieldName, Class<? extends T> type) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field name.
|
||||
* <p>
|
||||
* The {@link Converter} that is provided by
|
||||
* {@link Configuration#converterProvider()} will be used to convert the
|
||||
* value to <code>U</code>
|
||||
*
|
||||
* @param <U> The conversion type parameter
|
||||
* @param fieldName The field's name
|
||||
* @param type The conversion type
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field's name contained in this record, or
|
||||
* defaultValue, if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument fieldName is not
|
||||
* contained in the record
|
||||
* @throws DataTypeException wrapping any data type conversion exception
|
||||
* that might have occurred
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<U> U getValue(String fieldName, Class<? extends U> type, U defaultValue) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this Record, providing a field name.
|
||||
* <p>
|
||||
@ -1580,24 +1488,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<U> U getValue(String fieldName, Converter<?, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field name.
|
||||
*
|
||||
* @param <U> The conversion type parameter
|
||||
* @param fieldName The field's name
|
||||
* @param converter The data type converter
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field's name contained in this record, or
|
||||
* defaultValue, if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument fieldName is not
|
||||
* contained in the record
|
||||
* @throws DataTypeException wrapping any data type conversion exception
|
||||
* that might have occurred
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<U> U getValue(String fieldName, Converter<?, ? extends U> converter, U defaultValue) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a value from this Record, providing a field name.
|
||||
* <p>
|
||||
@ -1639,20 +1529,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
Object getValue(int index) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Get a value from this record, providing a field index.
|
||||
*
|
||||
* @param index The 0-based field index in this record.
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field's index contained in this record, or
|
||||
* defaultValue, if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument index is not contained
|
||||
* in the record
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
Object getValue(int index, Object defaultValue) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field index.
|
||||
* <p>
|
||||
@ -1664,28 +1540,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<T> T getValue(int index, Class<? extends T> type) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field index.
|
||||
* <p>
|
||||
* The {@link Converter} that is provided by
|
||||
* {@link Configuration#converterProvider()} will be used to convert the
|
||||
* value to <code>U</code>
|
||||
*
|
||||
* @param <U> The conversion type parameter
|
||||
* @param index The 0-based field index in this record.
|
||||
* @param type The conversion type
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field's index contained in this record, or
|
||||
* defaultValue, if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument index is not contained
|
||||
* in the record
|
||||
* @throws DataTypeException wrapping data type conversion exception that
|
||||
* might have occurred
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<U> U getValue(int index, Class<? extends U> type, U defaultValue) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field index.
|
||||
* <p>
|
||||
@ -1697,24 +1551,6 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
|
||||
*/
|
||||
<U> U getValue(int index, Converter<?, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Get a converted value from this record, providing a field index.
|
||||
*
|
||||
* @param <U> The conversion type parameter
|
||||
* @param index The 0-based field index in this record.
|
||||
* @param converter The data type converter
|
||||
* @param defaultValue The default value instead of <code>null</code>
|
||||
* @return The value of a field's index contained in this record, or
|
||||
* defaultValue, if <code>null</code>
|
||||
* @throws IllegalArgumentException If the argument index is not contained
|
||||
* in the record
|
||||
* @throws DataTypeException wrapping data type conversion exception that
|
||||
* might have occurred
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<U> U getValue(int index, Converter<?, ? extends U> converter, U defaultValue) throws IllegalArgumentException, DataTypeException;
|
||||
|
||||
/**
|
||||
* Set a value into this record.
|
||||
* <p>
|
||||
|
||||
@ -37,10 +37,6 @@
|
||||
*/
|
||||
package org.jooq;
|
||||
|
||||
import org.jooq.conf.ParamType;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* The render context is used for rendering {@link QueryPart}'s to SQL.
|
||||
* <p>
|
||||
@ -52,58 +48,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public interface RenderContext extends Context<RenderContext> {
|
||||
|
||||
/**
|
||||
* Recurse rendering.
|
||||
*
|
||||
* @deprecated - 3.2.0 - [#2666] - Use {@link #visit(QueryPart)} instead
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
RenderContext sql(QueryPart part);
|
||||
|
||||
/**
|
||||
* Whether bind variables should be inlined, rather than rendered as
|
||||
* <code>'?'</code>.
|
||||
*
|
||||
* @deprecated - 3.1.0 - [#2414] - This method should no longer be used. Use
|
||||
* {@link #paramType()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean inline();
|
||||
|
||||
/**
|
||||
* Set the new context value for {@link #inline()}.
|
||||
*
|
||||
* @deprecated - 3.1.0 - [#2414] - This method should no longer be used. Use
|
||||
* {@link #paramType(ParamType)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
RenderContext inline(boolean inline);
|
||||
|
||||
/**
|
||||
* Whether bind variables should be rendered as named parameters:<br/>
|
||||
* <code>  :1, :2, :custom_name</code>
|
||||
* <p>
|
||||
* or as JDBC bind variables <br/>
|
||||
* <code>  ?</code>
|
||||
*
|
||||
* @deprecated - 3.1.0 - [#2414] - This method should no longer be used. Use
|
||||
* {@link #paramType()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean namedParams();
|
||||
|
||||
/**
|
||||
* Set the new context value for {@link #namedParams()}.
|
||||
*
|
||||
* @deprecated - 3.1.0 - [#2414] - This method should no longer be used. Use
|
||||
* {@link #paramType(ParamType)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
RenderContext namedParams(boolean renderNamedParams);
|
||||
|
||||
/**
|
||||
* The cast mode for bind values.
|
||||
*
|
||||
@ -121,16 +65,6 @@ public interface RenderContext extends Context<RenderContext> {
|
||||
*/
|
||||
NEVER,
|
||||
|
||||
/**
|
||||
* Cast bind values only in some dialects. The specified dialects assume
|
||||
* {@link #ALWAYS} behaviour, all the other dialects assume
|
||||
* {@link #NEVER}.
|
||||
*
|
||||
* @deprecated - [#3703] - 3.5.0 - Do not use this any longer
|
||||
*/
|
||||
@Deprecated
|
||||
SOME,
|
||||
|
||||
/**
|
||||
* Cast when needed. This is the default mode if not specified
|
||||
* otherwise.
|
||||
|
||||
@ -82,23 +82,6 @@ public interface Result<R extends Record> extends Fields, List<R>, Attachable, F
|
||||
*/
|
||||
<T> T getValue(int index, Field<T> field) throws IndexOutOfBoundsException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Convenience method to fetch a value at a given position in the result.
|
||||
*
|
||||
* @param <T> The value's field's generic type parameter
|
||||
* @param index The record's 0-based index in the record list
|
||||
* @param field The value's field
|
||||
* @param defaultValue The default value if the value was <code>null</code>
|
||||
* @return The value
|
||||
* @throws IndexOutOfBoundsException if the index is out of range (
|
||||
* <tt>index < 0 || index >= size()</tt>)
|
||||
* @throws IllegalArgumentException If the argument field is not contained
|
||||
* in {@link #fieldsRow()}
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
<T> T getValue(int index, Field<T> field, T defaultValue) throws IndexOutOfBoundsException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Convenience method to fetch a value at a given position in the result.
|
||||
*
|
||||
@ -113,23 +96,6 @@ public interface Result<R extends Record> extends Fields, List<R>, Attachable, F
|
||||
@Nullable
|
||||
Object getValue(int index, int fieldIndex) throws IndexOutOfBoundsException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Convenience method to fetch a value at a given position in the result.
|
||||
*
|
||||
* @param index The record's 0-based index in the record list
|
||||
* @param fieldIndex The value's field index
|
||||
* @param defaultValue The default value if the value was <code>null</code>
|
||||
* @return The value
|
||||
* @throws IndexOutOfBoundsException if the index is out of range (
|
||||
* <tt>index < 0 || index >= size()</tt>)
|
||||
* @throws IllegalArgumentException If the argument fieldIndex is not
|
||||
* contained in {@link #fieldsRow()}
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Object getValue(int index, int fieldIndex, Object defaultValue) throws IndexOutOfBoundsException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Convenience method to fetch a value at a given position in the result.
|
||||
*
|
||||
@ -144,23 +110,6 @@ public interface Result<R extends Record> extends Fields, List<R>, Attachable, F
|
||||
@Nullable
|
||||
Object getValue(int index, String fieldName) throws IndexOutOfBoundsException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Convenience method to fetch a value at a given position in the result.
|
||||
*
|
||||
* @param index The record's 0-based index in the record list
|
||||
* @param fieldName The value's field name
|
||||
* @param defaultValue The default value if the value was <code>null</code>
|
||||
* @return The value
|
||||
* @throws IndexOutOfBoundsException if the index is out of range (
|
||||
* <tt>index < 0 || index >= size()</tt>)
|
||||
* @throws IllegalArgumentException If the argument fieldName is not
|
||||
* contained in {@link #fieldsRow()}
|
||||
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Object getValue(int index, String fieldName, Object defaultValue) throws IndexOutOfBoundsException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Convenience method to fetch all values for a given field. This is
|
||||
* especially useful, when selecting only a single field.
|
||||
|
||||
@ -174,36 +174,4 @@ public interface Select<R extends Record> extends ResultQuery<R>, TableLike<R>,
|
||||
*/
|
||||
@NotNull
|
||||
List<Field<?>> getSelect();
|
||||
|
||||
/**
|
||||
* Execute this query in the context of its attached executor and return a
|
||||
* <code>COUNT(*)</code> value.
|
||||
* <p>
|
||||
* This wraps a pre-existing <code>SELECT</code> query in another one to
|
||||
* calculate the <code>COUNT(*)</code> value, without modifying the original
|
||||
* <code>SELECT</code>. An example: <code><pre>
|
||||
* -- Original query:
|
||||
* SELECT id, title FROM book WHERE title LIKE '%a%'
|
||||
*
|
||||
* -- Wrapped query:
|
||||
* SELECT count(*) FROM (
|
||||
* SELECT id, title FROM book WHERE title LIKE '%a%'
|
||||
* )
|
||||
* </pre></code> This is particularly useful for those databases that do not
|
||||
* support the <code>COUNT(*) OVER()</code> window function to calculate
|
||||
* total results in paged queries.
|
||||
*
|
||||
* @return The <code>COUNT(*)</code> result
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @deprecated - 3.5.0 - [#3356] - This method is being removed as it is
|
||||
* confusingly different from all the other types of
|
||||
* {@link #fetch()} methods, in that it modifies the original
|
||||
* {@link Select} statement by wrapping it. In particular, this
|
||||
* method can be easily confused with {@link #fetch(Field)}, or
|
||||
* more concretely <code>fetch(count())</code>, which has an
|
||||
* entirely different semantics. Use
|
||||
* {@link DSLContext#fetchCount(Select)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
int fetchCount() throws DataAccessException;
|
||||
}
|
||||
|
||||
@ -67,59 +67,11 @@ abstract class AbstractBindContext extends AbstractContext<BindContext> implemen
|
||||
// BindContext API
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final BindContext bind(Collection<? extends QueryPart> parts) {
|
||||
return visitAll(this, parts);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final BindContext bind(QueryPart[] parts) {
|
||||
return visitAll(this, parts);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final BindContext bind(QueryPart part) {
|
||||
return visit(part);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void visit0(QueryPartInternal internal) {
|
||||
bindInternal(internal);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final BindContext bindValues(Object... values) {
|
||||
|
||||
// [#724] When values is null, this is probably due to API-misuse
|
||||
// The user probably meant new Object[] { null }
|
||||
if (values == null) {
|
||||
bindValues(new Object[] { null });
|
||||
}
|
||||
else {
|
||||
for (Object value : values) {
|
||||
Class<?> type = (value == null) ? Object.class : value.getClass();
|
||||
bindValue(value, DSL.val(value, type));
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final BindContext bindValue(Object value, Class<?> type) {
|
||||
try {
|
||||
return bindValue0(value, DSL.val(value, type));
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw Tools.translate(null, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final BindContext bindValue(Object value, Field<?> field) throws DataAccessException {
|
||||
try {
|
||||
|
||||
@ -903,25 +903,6 @@ abstract class AbstractContext<C extends Context<C>> extends AbstractScope imple
|
||||
return (C) this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final Boolean cast() {
|
||||
switch (castMode) {
|
||||
case ALWAYS:
|
||||
return true;
|
||||
case NEVER:
|
||||
return false;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final C castModeSome(SQLDialect... dialects) {
|
||||
return (C) this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// XXX BindContext API
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@ -96,12 +96,6 @@ abstract class AbstractDelegatingQuery<R extends Record, Q extends Query>
|
||||
return delegate.getSQL();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final String getSQL(boolean inline) {
|
||||
return delegate.getSQL(inline);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSQL(ParamType paramType) {
|
||||
return delegate.getSQL(paramType);
|
||||
|
||||
@ -613,10 +613,4 @@ abstract class AbstractQuery<R extends Record> extends AbstractFetchable<R> impl
|
||||
|
||||
throw new IllegalArgumentException("ParamType not supported: " + paramType);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final String getSQL(boolean inline) {
|
||||
return getSQL(inline ? INLINED : INDEXED);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,22 +75,6 @@ abstract class AbstractQueryPart implements QueryPartInternal {
|
||||
// Deprecated API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @deprecated - 3.4.0 - [#2694] - Use
|
||||
* {@link QueryPartInternal#accept(Context)} instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public final void toSQL(RenderContext context) {}
|
||||
|
||||
/**
|
||||
* @deprecated - 3.4.0 - [#2694] - Use
|
||||
* {@link QueryPartInternal#accept(Context)} instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public final void bind(BindContext context) throws DataAccessException {}
|
||||
|
||||
/**
|
||||
* @deprecated - 3.11.0 - [#8179] - This functionality will be removed in
|
||||
* the future.
|
||||
|
||||
@ -1257,108 +1257,46 @@ abstract class AbstractRecord extends AbstractStore implements Record {
|
||||
return get(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <T> T getValue(Field<T> field, T defaultValue) {
|
||||
T result = getValue(field);
|
||||
return result != null ? result : defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T> T getValue(Field<?> field, Class<? extends T> type) {
|
||||
return get(field, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <T> T getValue(Field<?> field, Class<? extends T> type, T defaultValue) {
|
||||
final T result = get(field, type);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T, U> U getValue(Field<T> field, Converter<? super T, ? extends U> converter) {
|
||||
return get(field, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <T, U> U getValue(Field<T> field, Converter<? super T, ? extends U> converter, U defaultValue) {
|
||||
final U result = get(field, converter);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object getValue(int index) {
|
||||
return get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final Object getValue(int index, Object defaultValue) {
|
||||
final Object result = get(index);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T> T getValue(int index, Class<? extends T> type) {
|
||||
return get(index, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <T> T getValue(int index, Class<? extends T> type, T defaultValue) {
|
||||
final T result = get(index, type);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <U> U getValue(int index, Converter<?, ? extends U> converter) {
|
||||
return get(index, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <U> U getValue(int index, Converter<?, ? extends U> converter, U defaultValue) {
|
||||
final U result = get(index, converter);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object getValue(String fieldName) {
|
||||
return get(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final Object getValue(String fieldName, Object defaultValue) {
|
||||
return getValue(indexOrFail(fields, fieldName), defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T> T getValue(String fieldName, Class<? extends T> type) {
|
||||
return get(fieldName, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <T> T getValue(String fieldName, Class<? extends T> type, T defaultValue) {
|
||||
final T result = get(fieldName, type);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <U> U getValue(String fieldName, Converter<?, ? extends U> converter) {
|
||||
return get(fieldName, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <U> U getValue(String fieldName, Converter<?, ? extends U> converter, U defaultValue) {
|
||||
final U result = get(fieldName, converter);
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object getValue(Name fieldName) {
|
||||
return get(fieldName);
|
||||
|
||||
@ -402,73 +402,6 @@ package org.jooq.impl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -540,12 +540,6 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
|
||||
return new DefaultBindContext(configuration(), stmt);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int bind(QueryPart part, PreparedStatement stmt) {
|
||||
return bindContext(stmt).visit(part).peekIndex();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX Attachable and Serializable API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -618,12 +618,6 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final RenderContext sql(QueryPart part) {
|
||||
return visit(part);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void visit0(QueryPartInternal internal) {
|
||||
int before = bindValues.size();
|
||||
@ -695,32 +689,6 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
|
||||
throw new ForceInlineSignal();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final boolean inline() {
|
||||
return paramType == INLINED;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final boolean namedParams() {
|
||||
return paramType == NAMED;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final RenderContext inline(boolean i) {
|
||||
this.paramType = i ? INLINED : INDEXED;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final RenderContext namedParams(boolean r) {
|
||||
this.paramType = r ? NAMED : INDEXED;
|
||||
return this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Object API
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@ -7537,7 +7537,7 @@ final class ParserContext {
|
||||
|| parseFunctionNameIf("DEGREE")
|
||||
|| parseFunctionNameIf("DEG"))
|
||||
return deg((Field) parseFieldNumericOpParenthesised());
|
||||
else if (parseFunctionNameIf("DATA_LENGTH"))
|
||||
else if (parseFunctionNameIf("DATALENGTH"))
|
||||
return octetLength((Field) parseFieldParenthesised(S));
|
||||
|
||||
if ((field = parseFieldDecodeIf()) != null)
|
||||
|
||||
@ -166,34 +166,16 @@ final class ResultImpl<R extends Record> extends AbstractResult<R> implements Re
|
||||
return get(index).get(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final <T> T getValue(int index, Field<T> field, T defaultValue) {
|
||||
return get(index).getValue(field, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object getValue(int index, int fieldIndex) {
|
||||
return get(index).get(fieldIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final Object getValue(int index, int fieldIndex, Object defaultValue) {
|
||||
return get(index).getValue(fieldIndex, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object getValue(int index, String fieldName) {
|
||||
return get(index).get(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final Object getValue(int index, String fieldName, Object defaultValue) {
|
||||
return get(index).getValue(fieldName, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T> List<T> getValues(Field<T> field) {
|
||||
return (List<T>) getValues(indexOrFail(fieldsRow(), field));
|
||||
|
||||
@ -44,12 +44,10 @@ import static org.jooq.impl.Keywords.K_WITH;
|
||||
import static org.jooq.impl.Tools.increment;
|
||||
import static org.jooq.impl.Tools.DataKey.DATA_TOP_LEVEL_CTE;
|
||||
|
||||
import org.jooq.BindContext;
|
||||
import org.jooq.Clause;
|
||||
import org.jooq.Context;
|
||||
// ...
|
||||
import org.jooq.QueryPartInternal;
|
||||
import org.jooq.RenderContext;
|
||||
import org.jooq.Statement;
|
||||
import org.jooq.impl.AbstractContext.ScopeStackElement;
|
||||
import org.jooq.impl.Tools.DataExtendedKey;
|
||||
@ -192,12 +190,6 @@ enum ScopeMarker {
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {}
|
||||
|
||||
@Override
|
||||
public final void toSQL(RenderContext ctx) {}
|
||||
|
||||
@Override
|
||||
public final void bind(BindContext ctx) {}
|
||||
|
||||
@Override
|
||||
public final Clause[] clauses(Context<?> ctx) {
|
||||
return null;
|
||||
|
||||
@ -279,12 +279,6 @@ final class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
|
||||
return (SelectQuery<R>) getDelegate();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public final int fetchCount() {
|
||||
return getDelegate().fetchCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method must be able to return both incompatible types
|
||||
* SelectSelectStep<Record> and SelectSelectStep<R>
|
||||
|
||||
@ -257,8 +257,6 @@ import org.jooq.tools.Convert;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
import org.jooq.tools.StringUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A sub-select is a <code>SELECT</code> statement that can be combined with
|
||||
* other <code>SELECT</code> statement in <code>UNION</code>s and similar
|
||||
@ -469,11 +467,6 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int fetchCount() throws DataAccessException {
|
||||
return DSL.using(configuration()).fetchCount(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public final <T> Field<T> asField() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user