Package org.jooq.impl

Class DefaultDSLContext

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable, DSLContext, Scope

    public class DefaultDSLContext
    extends java.lang.Object
    implements DSLContext, java.io.Serializable
    A default implementation for DSLContext.

    You may use this as a base implementation for custom DSLContext subtypes preventing potential API breakage when upgrading jOOQ, or to delegate DSL method calls to your custom implementations.

    Author:
    Lukas Eder
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultDSLContext

        public DefaultDSLContext​(SQLDialect dialect)
      • DefaultDSLContext

        public DefaultDSLContext​(java.sql.Connection connection,
                                 SQLDialect dialect)
      • DefaultDSLContext

        public DefaultDSLContext​(java.sql.Connection connection,
                                 SQLDialect dialect,
                                 Settings settings)
      • DefaultDSLContext

        public DefaultDSLContext​(javax.sql.DataSource datasource,
                                 SQLDialect dialect)
      • DefaultDSLContext

        public DefaultDSLContext​(javax.sql.DataSource datasource,
                                 SQLDialect dialect,
                                 Settings settings)
      • DefaultDSLContext

        public DefaultDSLContext​(Configuration configuration)
    • Method Detail

      • map

        public Schema map​(Schema schema)
        Description copied from interface: DSLContext
        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.

        Specified by:
        map in interface DSLContext
        Parameters:
        schema - A schema
        Returns:
        The mapped schema
      • map

        public <R extends RecordTable<R> map​(Table<R> table)
        Description copied from interface: DSLContext
        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.

        Specified by:
        map in interface DSLContext
        Parameters:
        table - A table
        Returns:
        The mapped table
      • parser

        public Parser parser()
        Description copied from interface: DSLContext
        Access the parser API.

        This is experimental functionality.

        Specified by:
        parser in interface DSLContext
      • diagnosticsConnection

        public java.sql.Connection diagnosticsConnection()
        Description copied from interface: DSLContext
        A JDBC connection that proxies the underlying connection to run the jOOQ Diagnostics Pack on executed queries.

        This is experimental functionality.

        Specified by:
        diagnosticsConnection in interface DSLContext
      • meta

        public Meta meta​(java.sql.DatabaseMetaData meta)
        Description copied from interface: DSLContext
        Access the database meta data from an explicit JDBC DatabaseMetaData.
        Specified by:
        meta in interface DSLContext
      • explain

        public Explain explain​(Query query)
        Description copied from interface: DSLContext
        Run an EXPLAIN statement in the database to estimate the cardinality of the query.
        Specified by:
        explain in interface DSLContext
      • render

        public java.lang.String render​(QueryPart part)
        Description copied from interface: DSLContext
        Render a QueryPart in the context of this DSLContext.

        This is the same as calling renderContext().render(part)

        Specified by:
        render in interface DSLContext
        Parameters:
        part - The QueryPart to be rendered
        Returns:
        The rendered SQL
      • renderNamedParams

        public java.lang.String renderNamedParams​(QueryPart part)
        Description copied from interface: DSLContext
        Render a QueryPart in the context of this DSLContext, rendering bind variables as named parameters.

        This is the same as calling renderContext().paramType(NAMED).render(part)

        Specified by:
        renderNamedParams in interface DSLContext
        Parameters:
        part - The QueryPart to be rendered
        Returns:
        The rendered SQL
      • renderNamedOrInlinedParams

        public java.lang.String renderNamedOrInlinedParams​(QueryPart part)
        Description copied from interface: DSLContext
        Render a QueryPart in the context of this DSLContext, rendering bind variables as named parameters, or inlined parameters if they have no name.

        This is the same as calling renderContext().paramType(NAMED_OR_INLINED).render(part)

        Specified by:
        renderNamedOrInlinedParams in interface DSLContext
        Parameters:
        part - The QueryPart to be rendered
        Returns:
        The rendered SQL
      • renderInlined

        public java.lang.String renderInlined​(QueryPart part)
        Description copied from interface: DSLContext
        Render a QueryPart in the context of this DSLContext, inlining all bind variables.

        This is the same as calling renderContext().inline(true).render(part)

        Specified by:
        renderInlined in interface DSLContext
        Parameters:
        part - The QueryPart to be rendered
        Returns:
        The rendered SQL
      • bind

        @Deprecated
        public int bind​(QueryPart part,
                        java.sql.PreparedStatement stmt)
        Deprecated.
        Specified by:
        bind in interface DSLContext
      • query

        public RowCountQuery query​(SQL sql)
        Description copied from interface: DSLContext
        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!

        Specified by:
        query in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        A query wrapping the plain SQL
        See Also:
        SQL
      • query

        public RowCountQuery query​(java.lang.String sql)
        Description copied from interface: DSLContext
        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!

        Specified by:
        query in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        A query wrapping the plain SQL
        See Also:
        SQL
      • query

        public RowCountQuery query​(java.lang.String sql,
                                   java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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!

        Specified by:
        query in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        A query wrapping the plain SQL
        See Also:
        SQL, DSL.sql(String, Object...)
      • query

        public RowCountQuery query​(java.lang.String sql,
                                   QueryPart... parts)
        Description copied from interface: DSLContext
        Create a new query holding plain SQL.

        Unlike DSLContext.query(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        query in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        A query wrapping the plain SQL
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetch

        public Result<Record> fetch​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetch in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query. This will never be null.
        See Also:
        SQL
      • fetch

        public Result<Record> fetch​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetch in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query. This will never be null.
        See Also:
        SQL
      • fetch

        public Result<Record> fetch​(java.lang.String sql,
                                    java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetch in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The results from the executed query. This will never be null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetch

        public Result<Record> fetch​(java.lang.String sql,
                                    QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetch(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetch in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The results from the executed query. This will never be null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchLazy

        public Cursor<Record> fetchLazy​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL and "lazily" return the generated result.

        The returned Cursor holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The cursor. This will never be null.
        See Also:
        SQL
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL and "lazily" return the generated result.

        The returned Cursor holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The cursor. This will never be null.
        See Also:
        SQL
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.lang.String sql,
                                        java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 Cursor holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The cursor. This will never be null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.lang.String sql,
                                        QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL and "lazily" return the generated result.

        The returned Cursor holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Unlike DSLContext.fetchLazy(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The cursor. This will never be null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(SQL sql)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.lang.String sql)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.lang.String sql,
                                                                               java.lang.Object... bindings)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        There must be as many bind variables contained in the SQL, as passed in the bindings parameter

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.lang.String sql,
                                                                               QueryPart... parts)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        Unlike DSLContext.fetchLazy(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               SQL sql)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchAsync in interface DSLContext
        sql - The SQL
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.lang.String sql)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchAsync in interface DSLContext
        sql - The SQL
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.lang.String sql,
                                                                               java.lang.Object... bindings)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        There must be as many bind variables contained in the SQL, as passed in the bindings parameter

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchAsync in interface DSLContext
        sql - The SQL
        bindings - The bindings
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.lang.String sql,
                                                                               QueryPart... parts)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        Unlike DSLContext.fetchLazy(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchAsync in interface DSLContext
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The completion stage. The completed result will never be null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchStream

        public java.util.stream.Stream<Record> fetchStream​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL and "lazily" return the generated result.

        The returned Stream holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchStream in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query. This is never null, even if the database returns no ResultSet
        See Also:
        SQL
      • fetchStream

        public java.util.stream.Stream<Record> fetchStream​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL and "lazily" return the generated result.

        The returned Stream holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchStream in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query. This is never null, even if the database returns no ResultSet
        See Also:
        SQL
      • fetchStream

        public java.util.stream.Stream<Record> fetchStream​(java.lang.String sql,
                                                           java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 Stream holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchStream in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The results from the executed query. This is never null, even if the database returns no ResultSet
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchStream

        public java.util.stream.Stream<Record> fetchStream​(java.lang.String sql,
                                                           QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL and "lazily" return the generated result.

        The returned Stream holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Unlike DSLContext.fetchStream(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchStream in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The results from the executed query. This is never null, even if the database returns no ResultSet
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchMany

        public Results fetchMany​(SQL sql)
        Description copied from interface: DSLContext
        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!

        Specified by:
        fetchMany in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results. This will never be null.
        See Also:
        SQL
      • fetchMany

        public Results fetchMany​(java.lang.String sql)
        Description copied from interface: DSLContext
        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!

        Specified by:
        fetchMany in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results. This will never be null.
        See Also:
        SQL
      • fetchMany

        public Results fetchMany​(java.lang.String sql,
                                 java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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!

        Specified by:
        fetchMany in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The results. This will never be null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchMany

        public Results fetchMany​(java.lang.String sql,
                                 QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL, possibly returning several result sets.

        Unlike DSLContext.fetchMany(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchMany in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The results. This will never be null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchOne

        public Record fetchOne​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The record or null, if no record was found.
        See Also:
        SQL
      • fetchOne

        public Record fetchOne​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The record or null, if no record was found.
        See Also:
        SQL
      • fetchOne

        public Record fetchOne​(java.lang.String sql,
                               java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The record or null, if no record was found.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchOne

        public Record fetchOne​(java.lang.String sql,
                               QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetchOne(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The record or null, if no record was found.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchSingle

        public Record fetchSingle​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The record. This is never null.
        See Also:
        SQL
      • fetchSingle

        public Record fetchSingle​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The record. This is never null.
        See Also:
        SQL
      • fetchSingle

        public Record fetchSingle​(java.lang.String sql,
                                  java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The record. This is never null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchSingle

        public Record fetchSingle​(java.lang.String sql,
                                  QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetchOne(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The record. This is never null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query
        See Also:
        SQL
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query
        See Also:
        SQL
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.lang.String sql,
                                                        java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The results from the executed query
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.lang.String sql,
                                                        QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetchOne(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The results from the executed query
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchValue

        public java.lang.Object fetchValue​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The value or null, if no record was found.
        See Also:
        SQL
      • fetchValue

        public java.lang.Object fetchValue​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The value or null, if no record was found.
        See Also:
        SQL
      • fetchValue

        public java.lang.Object fetchValue​(java.lang.String sql,
                                           java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The value or null, if no record was found.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchValue

        public java.lang.Object fetchValue​(java.lang.String sql,
                                           QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetchValue(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The value or null, if no record was found.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchOptionalValue

        public java.util.Optional<?> fetchOptionalValue​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The result value from the executed query
        See Also:
        SQL
      • fetchOptionalValue

        public java.util.Optional<?> fetchOptionalValue​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The result value from the executed query
        See Also:
        SQL
      • fetchOptionalValue

        public java.util.Optional<?> fetchOptionalValue​(java.lang.String sql,
                                                        java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The results from the executed query
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchOptionalValue

        public java.util.Optional<?> fetchOptionalValue​(java.lang.String sql,
                                                        QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetchValue(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The results from the executed query
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetchValues

        public java.util.List<?> fetchValues​(SQL sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The values. This will never be null.
        See Also:
        SQL
      • fetchValues

        public java.util.List<?> fetchValues​(java.lang.String sql)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The values. This will never be null.
        See Also:
        SQL
      • fetchValues

        public java.util.List<?> fetchValues​(java.lang.String sql,
                                             java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 \"<unnamed cursor 1>\"";
        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!

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The values. This will never be null.
        See Also:
        SQL, DSL.sql(String, Object...)
      • fetchValues

        public java.util.List<?> fetchValues​(java.lang.String sql,
                                             QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.fetchValue(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The values. This will never be null.
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • execute

        public int execute​(SQL sql)
        Description copied from interface: DSLContext
        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!

        Specified by:
        execute in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query
        See Also:
        SQL
      • execute

        public int execute​(java.lang.String sql)
        Description copied from interface: DSLContext
        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!

        Specified by:
        execute in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        The results from the executed query
        See Also:
        SQL
      • execute

        public int execute​(java.lang.String sql,
                           java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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!

        Specified by:
        execute in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        The results from the executed query
        See Also:
        SQL, DSL.sql(String, Object...)
      • execute

        public int execute​(java.lang.String sql,
                           QueryPart... parts)
        Description copied from interface: DSLContext
        Execute a new query holding plain SQL.

        Unlike DSLContext.execute(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        execute in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        The results from the executed query
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • resultQuery

        public ResultQuery<Record> resultQuery​(SQL sql)
        Description copied from interface: DSLContext
        Create a new query holding plain SQL.

        There must not be any bind variables contained in the SQL

        Use this method, when you want to take advantage of the many ways to fetch results in jOOQ, using ResultQuery. Some examples:

        ResultQuery.fetchLazy() Open a cursor and fetch records one by one
        ResultQuery.fetchInto(Class) Fetch records into a custom POJO (optionally annotated with JPA annotations)
        ResultQuery.fetchInto(RecordHandler) Fetch records into a custom callback (similar to Spring's RowMapper)

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        resultQuery in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        An executable query
        See Also:
        SQL
      • resultQuery

        public ResultQuery<Record> resultQuery​(java.lang.String sql)
        Description copied from interface: DSLContext
        Create a new query holding plain SQL.

        There must not be any bind variables contained in the SQL

        Use this method, when you want to take advantage of the many ways to fetch results in jOOQ, using ResultQuery. Some examples:

        ResultQuery.fetchLazy() Open a cursor and fetch records one by one
        ResultQuery.fetchInto(Class) Fetch records into a custom POJO (optionally annotated with JPA annotations)
        ResultQuery.fetchInto(RecordHandler) Fetch records into a custom callback (similar to Spring's RowMapper)

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        resultQuery in interface DSLContext
        Parameters:
        sql - The SQL
        Returns:
        An executable query
        See Also:
        SQL
      • resultQuery

        public ResultQuery<Record> resultQuery​(java.lang.String sql,
                                               java.lang.Object... bindings)
        Description copied from interface: DSLContext
        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 ResultQuery. Some examples:

        ResultQuery.fetchLazy() Open a cursor and fetch records one by one
        ResultQuery.fetchInto(Class) Fetch records into a custom POJO (optionally annotated with JPA annotations)
        ResultQuery.fetchInto(RecordHandler) Fetch records into a custom callback (similar to Spring's RowMapper)

        Example (Postgres):

         String sql = "FETCH ALL IN \"<unnamed cursor 1>\"";
        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!

        Specified by:
        resultQuery in interface DSLContext
        Parameters:
        sql - The SQL
        bindings - The bindings
        Returns:
        A query wrapping the plain SQL
        See Also:
        SQL, DSL.sql(String, Object...)
      • resultQuery

        public ResultQuery<Record> resultQuery​(java.lang.String sql,
                                               QueryPart... parts)
        Description copied from interface: DSLContext
        Create a new query holding plain SQL.

        Unlike DSLContext.resultQuery(String, Object...), the SQL passed to this method should not contain any bind variables. Instead, you can pass 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 by default, using SQLDialect.ORACLE:
         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 DSL.name(String...) and similar methods

        Specified by:
        resultQuery in interface DSLContext
        Parameters:
        sql - The SQL clause, containing {numbered placeholders} where query parts can be injected
        parts - The QueryPart objects that are rendered at the {numbered placeholder} locations
        Returns:
        A query wrapping the plain SQL
        See Also:
        SQL, DSL.sql(String, QueryPart...)
      • fetch

        public Result<Record> fetch​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch all data from a JDBC ResultSet and transform it to a jOOQ Result.

        After fetching all data, the JDBC ResultSet will be closed.

        Use DSLContext.fetchLazy(ResultSet), to fetch one Record at a time, instead of load the entire ResultSet into a jOOQ Result at once.

        Specified by:
        fetch in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The resulting jOOQ Result. This will never be null.
      • fetch

        public Result<Record> fetch​(java.sql.ResultSet rs,
                                    Field<?>... fields)
        Description copied from interface: DSLContext
        Fetch all data from a JDBC ResultSet and transform it to a jOOQ Result.

        After fetching all data, the JDBC ResultSet will be closed.

        Use DSLContext.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

        Specified by:
        fetch in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The resulting jOOQ Result. This will never be null.
      • fetch

        public Result<Record> fetch​(java.sql.ResultSet rs,
                                    DataType<?>... types)
        Description copied from interface: DSLContext
        Fetch all data from a JDBC ResultSet and transform it to a jOOQ Result.

        After fetching all data, the JDBC ResultSet will be closed.

        Use DSLContext.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

        Specified by:
        fetch in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The resulting jOOQ Result. This will never be null.
      • fetch

        public Result<Record> fetch​(java.sql.ResultSet rs,
                                    java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Fetch all data from a JDBC ResultSet and transform it to a jOOQ Result.

        After fetching all data, the JDBC ResultSet will be closed.

        Use DSLContext.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

        Specified by:
        fetch in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The resulting jOOQ Result. This will never be null.
      • fetchOne

        public Record fetchOne​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ Record.

        This will internally fetch all records and throw an exception if there was more than one resulting record.

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The record or null, if no record was found.
      • fetchOne

        public Record fetchOne​(java.sql.ResultSet rs,
                               Field<?>... fields)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The record or null, if no record was found.
      • fetchOne

        public Record fetchOne​(java.sql.ResultSet rs,
                               DataType<?>... types)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The record or null, if no record was found.
      • fetchOne

        public Record fetchOne​(java.sql.ResultSet rs,
                               java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchOne in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The record. This is never null.
      • fetchSingle

        public Record fetchSingle​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ Record.

        This will internally fetch all records and throw an exception if there was more than one resulting record.

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The record or null, if no record was found.
      • fetchSingle

        public Record fetchSingle​(java.sql.ResultSet rs,
                                  Field<?>... fields)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The record. This is never null.
      • fetchSingle

        public Record fetchSingle​(java.sql.ResultSet rs,
                                  DataType<?>... types)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The record. This is never null.
      • fetchSingle

        public Record fetchSingle​(java.sql.ResultSet rs,
                                  java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchSingle in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The record. This is never null.
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ Record.

        This will internally fetch all records and throw an exception if there was more than one resulting record.

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The resulting jOOQ record
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.sql.ResultSet rs,
                                                        Field<?>... fields)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The resulting jOOQ record
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.sql.ResultSet rs,
                                                        DataType<?>... types)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The resulting jOOQ record
      • fetchOptional

        public java.util.Optional<Record> fetchOptional​(java.sql.ResultSet rs,
                                                        java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC ResultSet and transform it to a jOOQ 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

        Specified by:
        fetchOptional in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The resulting jOOQ record
      • fetchValue

        public java.lang.Object fetchValue​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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.

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The value or null, if no record was found.
      • fetchValue

        public <T> T fetchValue​(java.sql.ResultSet rs,
                                Field<T> field)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        field - The field to use in the desired output
        Returns:
        The value or null, if no record was found.
      • fetchValue

        public <T> T fetchValue​(java.sql.ResultSet rs,
                                DataType<T> type)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        type - The data type to use in the desired output
        Returns:
        The value or null, if no record was found.
      • fetchValue

        public <T> T fetchValue​(java.sql.ResultSet rs,
                                java.lang.Class<T> type)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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

        Specified by:
        fetchValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        type - The data types to use in the desired output
        Returns:
        The value or null, if no record was found.
      • fetchOptionalValue

        public java.util.Optional<?> fetchOptionalValue​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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.

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The resulting value
      • fetchOptionalValue

        public <T> java.util.Optional<T> fetchOptionalValue​(java.sql.ResultSet rs,
                                                            Field<T> field)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        field - The field to use in the desired output
        Returns:
        The resulting value
      • fetchOptionalValue

        public <T> java.util.Optional<T> fetchOptionalValue​(java.sql.ResultSet rs,
                                                            DataType<T> type)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        type - The data type to use in the desired output
        Returns:
        The resulting value
      • fetchOptionalValue

        public <T> java.util.Optional<T> fetchOptionalValue​(java.sql.ResultSet rs,
                                                            java.lang.Class<T> type)
        Description copied from interface: DSLContext
        Fetch a record from a JDBC 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

        Specified by:
        fetchOptionalValue in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        type - The data types to use in the desired output
        Returns:
        The resulting value
      • fetchValues

        public java.util.List<?> fetchValues​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch a result from a JDBC ResultSet and return the only contained column's values.
        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The values. This will never be null.
      • fetchValues

        public <T> java.util.List<T> fetchValues​(java.sql.ResultSet rs,
                                                 Field<T> field)
        Description copied from interface: DSLContext
        Fetch a result from a JDBC ResultSet and return the only contained column's values.

        The additional field argument is used by jOOQ to coerce field names and data types to the desired output

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        field - The field to use in the desired output
        Returns:
        The values. This will never be null.
      • fetchValues

        public <T> java.util.List<T> fetchValues​(java.sql.ResultSet rs,
                                                 DataType<T> type)
        Description copied from interface: DSLContext
        Fetch a result from a JDBC ResultSet and return the only contained column's values.

        The additional type argument is used by jOOQ to coerce data types to the desired output

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        type - The data type to use in the desired output
        Returns:
        The values. This will never be null.
      • fetchValues

        public <T> java.util.List<T> fetchValues​(java.sql.ResultSet rs,
                                                 java.lang.Class<T> type)
        Description copied from interface: DSLContext
        Fetch a result from a JDBC ResultSet and return the only contained column's values.

        The additional type argument is used by jOOQ to coerce data types to the desired output

        Specified by:
        fetchValues in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        type - The data types to use in the desired output
        Returns:
        The values. This will never be null.
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Wrap a JDBC ResultSet into a jOOQ Cursor.

        Use DSLContext.fetch(ResultSet), to load the entire ResultSet into a jOOQ Result at once.

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The cursor. This will never be null.
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.sql.ResultSet rs,
                                        Field<?>... fields)
        Description copied from interface: DSLContext
        Wrap a JDBC ResultSet into a jOOQ Cursor.

        Use DSLContext.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

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The cursor. This will never be null.
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.sql.ResultSet rs,
                                        DataType<?>... types)
        Description copied from interface: DSLContext
        Wrap a JDBC ResultSet into a jOOQ Cursor.

        Use DSLContext.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

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The cursor. This will never be null.
      • fetchLazy

        public Cursor<Record> fetchLazy​(java.sql.ResultSet rs,
                                        java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Wrap a JDBC ResultSet into a jOOQ Cursor.

        Use DSLContext.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

        Specified by:
        fetchLazy in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The cursor. This will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.sql.ResultSet rs,
                                                                               Field<?>... fields)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        The additional fields argument is used by jOOQ to coerce field names and data types to the desired output

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.sql.ResultSet rs,
                                                                               DataType<?>... types)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        The additional types argument is used by jOOQ to coerce data types to the desired output

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.sql.ResultSet rs,
                                                                               java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the Scope.configuration()'s Configuration.executorProvider().

        The additional types argument is used by jOOQ to coerce data types to the desired output

        Specified by:
        fetchAsync in interface DSLContext
        Parameters:
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.sql.ResultSet rs)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.
        Specified by:
        fetchAsync in interface DSLContext
        rs - The JDBC ResultSet to fetch data from
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.sql.ResultSet rs,
                                                                               Field<?>... fields)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        The additional fields argument is used by jOOQ to coerce field names and data types to the desired output

        Specified by:
        fetchAsync in interface DSLContext
        rs - The JDBC ResultSet to fetch data from
        fields - The fields to use in the desired output
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.sql.ResultSet rs,
                                                                               DataType<?>... types)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        The additional types argument is used by jOOQ to coerce data types to the desired output

        Specified by:
        fetchAsync in interface DSLContext
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        public java.util.concurrent.CompletionStage<Result<Record>> fetchAsync​(java.util.concurrent.Executor executor,
                                                                               java.sql.ResultSet rs,
                                                                               java.lang.Class<?>... types)
        Description copied from interface: DSLContext
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.

        The additional types argument is used by jOOQ to coerce data types to the desired output

        Specified by:
        fetchAsync in interface DSLContext
        rs - The JDBC ResultSet to fetch data from
        types - The data types to use in the desired output
        Returns:
        The completion stage. The completed result will ne