/**
* Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
* choose jOOQ License
*
* For more information, please visit http://www.jooq.org/licenses
*
* Apache Software License 2.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.
*
* jOOQ License and Maintenance Agreement:
* -----------------------------------------------------------------------------
* Data Geekery grants the Customer the non-exclusive, timely limited and
* non-transferable license to install and use the Software under the terms of
* the jOOQ License and Maintenance Agreement.
*
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
*/
package org.jooq;
// ...
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
import static org.jooq.SQLDialect.HSQLDB;
// ...
import static org.jooq.SQLDialect.MARIADB;
import static org.jooq.SQLDialect.MYSQL;
// ...
import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
import java.math.BigInteger;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import org.jooq.api.annotation.State;
import org.jooq.api.annotation.Transition;
import org.jooq.conf.ParamType;
import org.jooq.conf.Settings;
import org.jooq.conf.StatementType;
import org.jooq.exception.DataAccessException;
import org.jooq.exception.InvalidResultException;
import org.jooq.exception.MappingException;
import org.jooq.impl.DSL;
/**
* A contextual DSL providing "attached" implementations to the
* org.jooq interfaces.
*
* Apart from the {@link DSL}, this contextual DSL is the main entry point
* for client code, to access jOOQ classes and functionality that are related to
* {@link Query} execution. Unlike objects created through the
* DSL type, objects created from a DSLContext will be
* "attached" to the DSLContext's {@link #configuration()}, such
* that they can be executed immediately in a fluent style. An example is given
* here:
*
*
* DSLContext create = DSL.using(connection, dialect);
*
* // Immediately fetch results after constructing a query
* create.selectFrom(MY_TABLE).where(MY_TABLE.ID.eq(1)).fetch();
*
* // The above is equivalent to this "non-fluent" style
* create.fetch(DSL.selectFrom(MY_TABLE).where(MY_TABLE.ID.eq(1)));
*
*
* The DSL provides convenient constructors to create a
* {@link Configuration}, which will be shared among all Query
* objects thus created. Optionally, you can pass a reusable
* Configuration to the {@link DSL#using(Configuration)}
* constructor. Please consider thread-safety concerns documented in
* {@link Configuration}, should you want to reuse the same
* Configuration instance in various threads and / or transactions.
*
* @see DSL
* @see Configuration
* @author Lukas Eder
*/
@State(terminal = true)
public interface DSLContext {
// -------------------------------------------------------------------------
// XXX Configuration API
// -------------------------------------------------------------------------
/**
* The Configuration referenced from this
* DSLContext.
*/
Configuration configuration();
/**
* Map a schema to another one.
*
* This will map a schema onto another one, depending on configured schema
* mapping in this DSLContext. If no applicable schema mapping
* can be found, the schema itself is returned.
*
* @param schema A schema
* @return The mapped schema
*/
Schema map(Schema schema);
/**
* Map a table to another one.
*
* This will map a table onto another one, depending on configured table
* mapping in this DSLContext. If no applicable table mapping can
* be found, the table itself is returned.
*
* @param table A table
* @return The mapped table
*/
Table map(Table table);
// -------------------------------------------------------------------------
// XXX Convenience methods accessing the underlying Connection
// -------------------------------------------------------------------------
/**
* Access the database meta data.
*
* This method returns a wrapper type that gives access to your JDBC
* connection's database meta data.
*/
Meta meta();
// -------------------------------------------------------------------------
// XXX RenderContext and BindContext accessors
// -------------------------------------------------------------------------
/**
* Get a new {@link RenderContext} for the context of this DSLContext.
*
* This will return an initialised render context as such:
*
*
* {@link RenderContext#castMode()} == {@link org.jooq.RenderContext.CastMode#DEFAULT DEFAULT}
*
* {@link RenderContext#declareFields()} == false
* {@link RenderContext#declareTables()} == false
* {@link RenderContext#format()} == false
* {@link RenderContext#paramType()} == {@link ParamType#INDEXED}
* {@link RenderContext#qualify()} == true
* {@link RenderContext#subquery()} == false
*
*/
RenderContext renderContext();
/**
* Render a QueryPart in the context of this DSLContext.
*
* This is the same as calling renderContext().render(part)
*
* @param part The {@link QueryPart} to be rendered
* @return The rendered SQL
*/
String render(QueryPart part);
/**
* Render a QueryPart in the context of this DSLContext, rendering bind
* variables as named parameters.
*
* This is the same as calling
* renderContext().namedParams(true).render(part)
*
* @param part The {@link QueryPart} to be rendered
* @return The rendered SQL
*/
String renderNamedParams(QueryPart part);
/**
* Render a QueryPart in the context of this DSLContext, inlining all bind
* variables.
*
* This is the same as calling
* renderContext().inline(true).render(part)
*
* @param part The {@link QueryPart} to be rendered
* @return The rendered SQL
*/
String renderInlined(QueryPart part);
/**
* Retrieve the bind values that will be bound by a given
* QueryPart.
*
* The returned List is immutable. To modify bind values, use
* {@link #extractParams(QueryPart)} instead.
*/
List extractBindValues(QueryPart part);
/**
* Get a Map of named parameters.
*
* The Map itself is immutable, but the {@link Param} elements
* allow for modifying bind values on an existing {@link Query} (or any
* other {@link QueryPart}).
*
* Bind values created with {@link DSL#val(Object)} will have their bind
* index as name.
*
* @see Param
* @see DSL#param(String, Object)
*/
Map> extractParams(QueryPart part);
/**
* Get a named parameter from a {@link QueryPart}, provided its name.
*
* Bind values created with {@link DSL#val(Object)} will have their bind
* index as name.
*
* @see Param
* @see DSL#param(String, Object)
*/
Param> extractParam(QueryPart part, String name);
/**
* Get a new {@link BindContext} for the context of this DSLContext.
*
* This will return an initialised bind context as such:
*
* {@link RenderContext#declareFields()} == false
* {@link RenderContext#declareTables()} == false
*
*
* BindContext for JOOQ INTERNAL USE only. Avoid referencing it directly
*/
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
// -------------------------------------------------------------------------
/**
* Attach this DSLContext's underlying {@link #configuration()}
* to some attachables.
*/
void attach(Attachable... attachables);
/**
* Attach this DSLContext's underlying {@link #configuration()}
* to some attachables.
*/
void attach(Collection extends Attachable> attachables);
// -------------------------------------------------------------------------
// XXX Access to the loader API
// -------------------------------------------------------------------------
/**
* Create a new Loader object to load data from a CSV or XML
* source.
*/
@Support
> LoaderOptionsStep loadInto(Table table);
// -------------------------------------------------------------------------
// XXX Plain SQL API
// -------------------------------------------------------------------------
/**
* Create a new query holding plain SQL. There must not be any binding
* variables contained in the SQL.
*
* Example:
*
*
* String sql = "SET SCHEMA 'abc'";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return A query wrapping the plain SQL
*/
@Support
Query query(String sql);
/**
* Create a new query holding plain SQL. There must be as many bind
* variables contained in the SQL, as passed in the bindings parameter.
*
* Example:
*
*
* String sql = "SET SCHEMA 'abc'";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return A query wrapping the plain SQL
*/
@Support
Query query(String sql, Object... bindings);
/**
* Create a new query holding plain SQL.
*
* Unlike {@link #query(String, Object...)}, the SQL passed to this method
* should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* query("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will render this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return A query wrapping the plain SQL
*/
@Support
Query query(String sql, QueryPart... parts);
/**
* Execute a new query holding plain SQL.
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return The results from the executed query. This is never
* null, even if the database returns no
* {@link ResultSet}
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(String sql) throws DataAccessException;
/**
* Execute a new query holding plain SQL.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return The results from the executed query. This is never
* null, even if the database returns no
* {@link ResultSet}
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(String sql, Object... bindings) throws DataAccessException;
/**
* Execute a new query holding plain SQL.
*
* Unlike {@link #fetch(String, Object...)}, the SQL passed to this method
* should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* fetch("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will execute this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return The results from the executed query
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(String sql, QueryPart... parts) throws DataAccessException;
/**
* Execute a new query holding plain SQL and "lazily" return the generated
* result.
*
* The returned {@link Cursor} holds a reference to the executed
* {@link PreparedStatement} and the associated {@link ResultSet}. Data can
* be fetched (or iterated over) lazily, fetching records from the
* {@link ResultSet} one by one.
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return The results from the executed query. This is never
* null, even if the database returns no
* {@link ResultSet}
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(String sql) throws DataAccessException;
/**
* Execute a new query holding plain SQL and "lazily" return the generated
* result.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* The returned {@link Cursor} holds a reference to the executed
* {@link PreparedStatement} and the associated {@link ResultSet}. Data can
* be fetched (or iterated over) lazily, fetching records from the
* {@link ResultSet} one by one.
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return The results from the executed query. This is never
* null, even if the database returns no
* {@link ResultSet}
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(String sql, Object... bindings) throws DataAccessException;
/**
* Execute a new query holding plain SQL and "lazily" return the generated
* result.
*
* The returned {@link Cursor} holds a reference to the executed
* {@link PreparedStatement} and the associated {@link ResultSet}. Data can
* be fetched (or iterated over) lazily, fetching records from the
* {@link ResultSet} one by one.
*
* Unlike {@link #fetchLazy(String, Object...)}, the SQL passed to this
* method should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* fetchLazy("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will execute this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return The results from the executed query
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(String sql, QueryPart... parts) throws DataAccessException;
/**
* Execute a new query holding plain SQL, possibly returning several result
* sets.
*
* Example (Sybase ASE):
*
*
* String sql = "sp_help 'my_table'";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return The results from the executed query. This is never
* null, even if the database returns no
* {@link ResultSet}
* @throws DataAccessException if something went wrong executing the query
*/
@Support
List> fetchMany(String sql) throws DataAccessException;
/**
* Execute a new query holding plain SQL, possibly returning several result
* sets.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* Example (Sybase ASE):
*
*
* String sql = "sp_help 'my_table'";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return The results from the executed query. This is never
* null, even if the database returns no
* {@link ResultSet}
* @throws DataAccessException if something went wrong executing the query
*/
@Support
List> fetchMany(String sql, Object... bindings) throws DataAccessException;
/**
* Execute a new query holding plain SQL, possibly returning several result
* sets.
*
* Unlike {@link #fetchMany(String, Object...)}, the SQL passed to this
* method should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* fetchMany("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will execute this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return The results from the executed query
* @throws DataAccessException if something went wrong executing the query
*/
@Support
List> fetchMany(String sql, QueryPart... parts) throws DataAccessException;
/**
* Execute a new query holding plain SQL.
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return The results from the executed query.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(String sql) throws DataAccessException, InvalidResultException;
/**
* Execute a new query holding plain SQL.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return The results from the executed query. This may be
* null if the database returned no records
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(String sql, Object... bindings) throws DataAccessException, InvalidResultException;
/**
* Execute a new query holding plain SQL.
*
* Unlike {@link #fetchOne(String, Object...)}, the SQL passed to this
* method should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* fetchOne("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will execute this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return The results from the executed query. This may be
* null if the database returned no records
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(String sql, QueryPart... parts) throws DataAccessException, InvalidResultException;
/**
* Execute a new query holding plain SQL.
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return The result value from the executed query. This may be
* null if the database returned no records
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
* or a record with more than one value.
*/
@Support
Object fetchValue(String sql) throws DataAccessException, InvalidResultException;
/**
* Execute a new query holding plain SQL.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return The results from the executed query. This may be
* null if the database returned no records
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
* or a record with more than one value.
*/
@Support
Object fetchValue(String sql, Object... bindings) throws DataAccessException, InvalidResultException;
/**
* Execute a new query holding plain SQL.
*
* Unlike {@link #fetchValue(String, Object...)}, the SQL passed to this
* method should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* fetchOne("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will execute this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return The results from the executed query. This may be
* null if the database returned no records
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record or a record with more than one value.
*/
@Support
Object fetchValue(String sql, QueryPart... parts) throws DataAccessException, InvalidResultException;
/**
* Execute a query holding plain SQL.
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return The results from the executed query
* @throws DataAccessException if something went wrong executing the query
*/
@Support
int execute(String sql) throws DataAccessException;
/**
* Execute a new query holding plain SQL.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return The results from the executed query
* @throws DataAccessException if something went wrong executing the query
*/
@Support
int execute(String sql, Object... bindings) throws DataAccessException;
/**
* Execute a new query holding plain SQL.
*
* Unlike {@link #execute(String, Object...)}, the SQL passed to this method
* should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* execute("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will execute this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return The results from the executed query
* @throws DataAccessException if something went wrong executing the query
*/
@Support
int execute(String sql, QueryPart... parts) throws DataAccessException;
/**
* Create a new query holding plain SQL.
*
* There must not be any binding variables contained in the SQL
*
* Use this method, when you want to take advantage of the many ways to
* fetch results in jOOQ, using {@link ResultQuery}. Some examples:
*
*
*
* {@link ResultQuery#fetchLazy()}
* Open a cursor and fetch records one by one
*
*
* {@link ResultQuery#fetchInto(Class)}
* Fetch records into a custom POJO (optionally annotated with JPA
* annotations)
*
*
* {@link ResultQuery#fetchInto(RecordHandler)}
* Fetch records into a custom callback (similar to Spring's RowMapper)
*
*
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @return An executable query
*/
@Support
ResultQuery resultQuery(String sql);
/**
* Create a new query holding plain SQL.
*
* There must be as many bind variables contained in the SQL, as passed in
* the bindings parameter
*
* Use this method, when you want to take advantage of the many ways to
* fetch results in jOOQ, using {@link ResultQuery}. Some examples:
*
*
*
* {@link ResultQuery#fetchLazy()}
* Open a cursor and fetch records one by one
*
*
* {@link ResultQuery#fetchInto(Class)}
* Fetch records into a custom POJO (optionally annotated with JPA
* annotations)
*
*
* {@link ResultQuery#fetchInto(RecordHandler)}
* Fetch records into a custom callback (similar to Spring's RowMapper)
*
*
*
* Example (Postgres):
*
*
* String sql = "FETCH ALL IN \"\""; Example
* (SQLite):
*
*
* String sql = "pragma table_info('my_table')";
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses!
*
* @param sql The SQL
* @param bindings The bindings
* @return A query wrapping the plain SQL
*/
@Support
ResultQuery resultQuery(String sql, Object... bindings);
/**
* Create a new query holding plain SQL.
*
* Unlike {@link #resultQuery(String, Object...)}, the SQL passed to this
* method should not contain any bind variables. Instead, you can pass
* {@link QueryPart} objects to the method which will be rendered at indexed
* locations of your SQL string as such:
* // The following query
* resultQuery("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
*
* // Will render this SQL on an Oracle database with RenderNameStyle.QUOTED:
* select ?, 'test' from "DUAL"
*
*
* NOTE : When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
* malicious SQL injection. Be sure to properly use bind variables and/or
* escape literals when concatenated into SQL clauses! One way to escape
* literals is to use {@link DSL#name(String...)} and similar methods
*
* @param sql The SQL clause, containing {numbered placeholders} where query
* parts can be injected
* @param parts The {@link QueryPart} objects that are rendered at the
* {numbered placeholder} locations
* @return A query wrapping the plain SQL
*/
@Support
ResultQuery resultQuery(String sql, QueryPart... parts);
// -------------------------------------------------------------------------
// XXX JDBC convenience methods
// -------------------------------------------------------------------------
/**
* Fetch all data from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Result}.
*
* After fetching all data, the JDBC ResultSet will be closed.
*
* Use {@link #fetchLazy(ResultSet)}, to fetch one Record at a
* time, instead of load the entire ResultSet into a jOOQ
* Result at once.
*
* @param rs The JDBC ResultSet to fetch data from
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(ResultSet rs) throws DataAccessException;
/**
* Fetch all data from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Result}.
*
* After fetching all data, the JDBC ResultSet will be closed.
*
* Use {@link #fetchLazy(ResultSet)}, to fetch one Record at a
* time, instead of load the entire ResultSet into a jOOQ
* Result at once.
*
* The additional fields argument is used by jOOQ to coerce
* field names and data types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param fields The fields to use in the desired output
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(ResultSet rs, Field>... fields) throws DataAccessException;
/**
* Fetch all data from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Result}.
*
* After fetching all data, the JDBC ResultSet will be closed.
*
* Use {@link #fetchLazy(ResultSet)}, to fetch one Record at a
* time, instead of load the entire ResultSet into a jOOQ
* Result at once.
*
* The additional types argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param types The data types to use in the desired output
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(ResultSet rs, DataType>... types) throws DataAccessException;
/**
* Fetch all data from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Result}.
*
* After fetching all data, the JDBC ResultSet will be closed.
*
* Use {@link #fetchLazy(ResultSet)}, to fetch one Record at a
* time, instead of load the entire ResultSet into a jOOQ
* Result at once.
*
* The additional types argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param types The data types to use in the desired output
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Result fetch(ResultSet rs, Class>... types) throws DataAccessException;
/**
* Fetch a record from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Record}.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* @param rs The JDBC ResultSet to fetch data from
* @return The resulting jOOQ record
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(ResultSet rs) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Record}.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* The additional fields argument is used by jOOQ to coerce
* field names and data types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param fields The fields to use in the desired output
* @return The resulting jOOQ record
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(ResultSet rs, Field>... fields) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Record}.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* The additional types argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param types The data types to use in the desired output
* @return The resulting jOOQ record
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(ResultSet rs, DataType>... types) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Record}.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* The additional types argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param types The data types to use in the desired output
* @return The resulting jOOQ record
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
*/
@Support
Record fetchOne(ResultSet rs, Class>... types) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and return the only
* contained value.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* @param rs The JDBC ResultSet to fetch data from
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
* or a record with more than one value.
*/
@Support
Object fetchValue(ResultSet rs) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and return the only
* contained value.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* The additional field argument is used by jOOQ to coerce
* field names and data types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param field The field to use in the desired output
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
* or a record with more than one value.
*/
@Support
T fetchValue(ResultSet rs, Field field) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and return the only
* contained value.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* The additional type argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param type The data type to use in the desired output
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
* or a record with more than one value.
*/
@Support
T fetchValue(ResultSet rs, DataType type) throws DataAccessException, InvalidResultException;
/**
* Fetch a record from a JDBC {@link ResultSet} and return the only
* contained value.
*
* This will internally fetch all records and throw an exception if there
* was more than one resulting record.
*
* The additional type argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param type The data types to use in the desired output
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the query returned more than one record
* or a record with more than one value.
*/
@Support
T fetchValue(ResultSet rs, Class type) throws DataAccessException, InvalidResultException;
/**
* Wrap a JDBC {@link ResultSet} into a jOOQ {@link Cursor}.
*
* Use {@link #fetch(ResultSet)}, to load the entire ResultSet
* into a jOOQ Result at once.
*
* @param rs The JDBC ResultSet to fetch data from
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(ResultSet rs) throws DataAccessException;
/**
* Wrap a JDBC {@link ResultSet} into a jOOQ {@link Cursor}.
*
* Use {@link #fetch(ResultSet)}, to load the entire ResultSet
* into a jOOQ Result at once.
*
* The additional fields argument is used by jOOQ to coerce
* field names and data types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param fields The fields to use in the desired output
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(ResultSet rs, Field>... fields) throws DataAccessException;
/**
* Wrap a JDBC {@link ResultSet} into a jOOQ {@link Cursor}.
*
* Use {@link #fetch(ResultSet)}, to load the entire ResultSet
* into a jOOQ Result at once.
*
* The additional types argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param types The data types to use in the desired output
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(ResultSet rs, DataType>... types) throws DataAccessException;
/**
* Wrap a JDBC {@link ResultSet} into a jOOQ {@link Cursor}.
*
* Use {@link #fetch(ResultSet)}, to load the entire ResultSet
* into a jOOQ Result at once.
*
* The additional types argument is used by jOOQ to coerce data
* types to the desired output
*
* @param rs The JDBC ResultSet to fetch data from
* @param types The data types to use in the desired output
* @return The resulting jOOQ Result
* @throws DataAccessException if something went wrong executing the query
*/
@Support
Cursor fetchLazy(ResultSet rs, Class>... types) throws DataAccessException;
/**
* Fetch all data from a formatted string.
*
* The supplied string is supposed to be formatted in a human-readable way.
* This is the same as calling fetchFromTXT(string, "{null}")
*
* @param string The formatted string
* @return The transformed result
* @see #fetchFromTXT(String, String)
* @throws DataAccessException If the supplied string does not adhere to the
* above format rules.
*/
@Support
Result fetchFromTXT(String string) throws DataAccessException;
/**
* Fetch all data from a formatted string.
*
* This method supports parsing results from two types of human-readable
* formats:
*
The jOOQ {@link Result#format()}
*
* This format is recognised by the fact that the first line starts with a
* "plus" sign:
* +-----+-----+--------------------------+
* |COL1 |COL2 |COL3 containing whitespace|
* +-----+-----+--------------------------+
* |val1 |1 |some text |
* |val2 | 2 | more text |
* +-----+-----+--------------------------+
* This method will decode the above formatted string
* according to the following rules:
*
* The number of columns is defined by the number of dash groups in the
* first line. Groups are separated by exactly one "plus" sign
* The column types are VARCHAR(N) where
* N = number of dashes per dash group
* The column names are defined by the trimmed text contained in the
* second row
* The data is defined by the trimmed text contained in the subsequent
* rows
*
* The H2 database test data format
*
* The supplied string is supposed to be formatted in the following,
* human-readable way:
* COL1 COL2 COL3 containing whitespace
* ----- ---- --------------------------
* val1 1 some text
* val2 2 more text
* This method will decode the above formatted string
* according to the following rules:
*
* The number of columns is defined by the number of dash groups in the
* second line. Groups are separated by space(s)
* The column types are VARCHAR(N) where
* N = number of dashes per dash group
* The column names are defined by the trimmed text contained in the
* first row
* The data is defined by the trimmed text contained in the subsequent
* rows
*
* Both parsing methods
*
* Both parsing methods make no assumption about the resulting data types.
* Instead, all data is string-based.
*
* @param string The formatted string
* @param nullLiteral The string literal to be used as null
* value.
* @return The transformed result
* @throws DataAccessException If the supplied string does not adhere to the
* above format rules.
*/
@Support
Result fetchFromTXT(String string, String nullLiteral) throws DataAccessException;
/**
* Fetch all data from a CSV string.
*
* This is the same as calling fetchFromCSV(string, ',') and
* the inverse of calling {@link Result#formatCSV()}. The first row of the
* CSV data is required to hold field name information. Subsequent rows may
* contain data, which is interpreted as {@link String}. Use the various
* conversion methods to retrieve other data types from the
* Result:
*
* {@link Result#getValues(Field, Class)}
* {@link Result#getValues(int, Class)}
* {@link Result#getValues(String, Class)}
* {@link Result#getValues(Field, Converter)}
* {@link Result#getValues(int, Converter)}
* {@link Result#getValues(String, Converter)}
*
*
* Missing values result in null. Empty values result in empty
* Strings
*
* @param string The CSV string
* @return The transformed result
* @throws DataAccessException If anything went wrong parsing the CSV file
* @see #fetchFromCSV(String, char)
*/
@Support
Result fetchFromCSV(String string) throws DataAccessException;
/**
* Fetch all data from a CSV string.
*
* This is inverse of calling {@link Result#formatCSV(char)}. The first row
* of the CSV data is required to hold field name information. Subsequent
* rows may contain data, which is interpreted as {@link String}. Use the
* various conversion methods to retrieve other data types from the
* Result:
*
* {@link Result#getValues(Field, Class)}
* {@link Result#getValues(int, Class)}
* {@link Result#getValues(String, Class)}
* {@link Result#getValues(Field, Converter)}
* {@link Result#getValues(int, Converter)}
* {@link Result#getValues(String, Converter)}
*
*
* Missing values result in null. Empty values result in empty
* Strings
*
* @param string The CSV string
* @param delimiter The delimiter to expect between records
* @return The transformed result
* @throws DataAccessException If anything went wrong parsing the CSV file
* @see #fetchFromCSV(String)
* @see #fetchFromStringData(List)
*/
@Support
Result fetchFromCSV(String string, char delimiter) throws DataAccessException;
/**
* Fetch all data from a JSON string.
*
* This is the inverse of calling {@link Result#formatJSON()}. Use the
* various conversion methods to retrieve other data types from the
* Result:
*
* {@link Result#getValues(Field, Class)}
* {@link Result#getValues(int, Class)}
* {@link Result#getValues(String, Class)}
* {@link Result#getValues(Field, Converter)}
* {@link Result#getValues(int, Converter)}
* {@link Result#getValues(String, Converter)}
*
*
* Missing values result in null. Empty values result in empty
* Strings
*
* @param string The JSON string
* @return The transformed result
* @throws DataAccessException If anything went wrong parsing the JSON file
*/
@Support
Result fetchFromJSON(String string);
/**
* Fetch all data from a list of strings.
*
* This is used by methods such as
*
* {@link #fetchFromCSV(String)}
* {@link #fetchFromTXT(String)}
*
* The first element of the argument list should contain column names.
* Subsequent elements contain actual data. The degree of all arrays
* contained in the argument should be the same, although this is not a
* requirement. jOOQ will ignore excess data, and fill missing data with
* null.
*
* @param data The data to be transformed into a Result
* @return The transformed result
* @see #fetchFromStringData(List)
*/
Result fetchFromStringData(String[]... data);
/**
* Fetch all data from a list of strings.
*
* This is used by methods such as
*
* {@link #fetchFromCSV(String)}
* {@link #fetchFromTXT(String)}
*
* The first element of the argument list should contain column names.
* Subsequent elements contain actual data. The degree of all arrays
* contained in the argument should be the same, although this is not a
* requirement. jOOQ will ignore excess data, and fill missing data with
* null.
*
* @param data The data to be transformed into a Result
* @return The transformed result
*/
Result fetchFromStringData(List data);
// -------------------------------------------------------------------------
// XXX Global Query factory
// -------------------------------------------------------------------------
/**
* Create a new DSL select statement.
*
* Example:
* SELECT * FROM [table] WHERE [conditions] ORDER BY [ordering] LIMIT [limit clause]
*
*/
@Support
SelectWhereStep selectFrom(Table table);
/**
* Create a new DSL select statement.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Collection)} instead.
*
* Example:
* DSLContext create = DSL.using(configuration);
*
* create.select(fields)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#select(Collection)
*/
@Support
SelectSelectStep select(Collection extends Field>> fields);
/**
* Create a new DSL select statement.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field...)} instead.
*
* Example:
* DSLContext create = DSL.using(configuration);
*
* create.select(field1, field2)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2)
* .execute();
*
*
* @see DSL#select(Field...)
*/
@Support
SelectSelectStep select(Field>... fields);
// [jooq-tools] START [select]
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Field#in(Select)}, {@link Field#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field)} instead.
*
* Example:
* using(configuration)
* .select(field1)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row2#in(Select)}, {@link Row2#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row3#in(Select)}, {@link Row3#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row4#in(Select)}, {@link Row4#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, field4)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row5#in(Select)}, {@link Row5#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, field4, field5)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row6#in(Select)}, {@link Row6#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field5, field6)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row7#in(Select)}, {@link Row7#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field6, field7)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row8#in(Select)}, {@link Row8#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field7, field8)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row9#in(Select)}, {@link Row9#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field8, field9)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row10#in(Select)}, {@link Row10#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field9, field10)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row11#in(Select)}, {@link Row11#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field10, field11)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row12#in(Select)}, {@link Row12#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field11, field12)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row13#in(Select)}, {@link Row13#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field12, field13)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row14#in(Select)}, {@link Row14#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field13, field14)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row15#in(Select)}, {@link Row15#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field14, field15)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15);
/**
* Create a new DSL select statement.
*
* This is the same as {@link #select(Field...)}, except that it
* declares additional record-level typesafety, which is needed by
* {@link Row16#in(Select)}, {@link Row16#equal(Select)} and other predicate
* building methods taking subselect arguments.
*
* This creates an attached, renderable and executable SELECT
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
* {@link DSL#select(Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)} instead.
*
* Example:
* using(configuration)
* .select(field1, field2, field3, .., field15, field16)
* .from(table1)
* .join(table2).on(field1.equal(field2))
* .where(field1.greaterThan(100))
* .orderBy(field2);
*
*
* @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
@Generated("This method was generated using jOOQ-tools")
@Support
@Transition(
name = "SELECT",
args = "Field+"
)
SelectSelectStep> select(Field