- All Superinterfaces:
- Attachable,- AttachableQueryPart,- AutoCloseable,- QueryPart,- Serializable,- Statement
- All Known Subinterfaces:
- AlterDatabaseFinalStep,- AlterDomainDropConstraintCascadeStep,- AlterDomainFinalStep,- AlterIndexFinalStep,- AlterSchemaFinalStep,- AlterSequenceFinalStep,- AlterSequenceFlagsStep<T>,- AlterSequenceStep<T>,- AlterTableAddStep,- AlterTableDropStep,- AlterTableFinalStep,- AlterTableUsingIndexStep,- AlterTypeFinalStep,- AlterViewFinalStep,- Block,- CallArgsStep,- CommentOnFinalStep,- CreateDatabaseFinalStep,- CreateDomainConstraintStep,- CreateDomainDefaultStep<T>,- CreateDomainFinalStep,- CreateIndexFinalStep,- CreateIndexIncludeStep,- CreateIndexWhereStep,- CreateSchemaFinalStep,- CreateSequenceFinalStep,- CreateSequenceFlagsStep,- CreateTableColumnStep,- CreateTableCommentStep,- CreateTableConstraintStep,- CreateTableFinalStep,- CreateTableIndexStep,- CreateTableOnCommitStep,- CreateTableStorageStep,- CreateTableWithDataStep,- CreateTypeFinalStep,- CreateViewFinalStep,- DDLQuery,- Delete<R>,- DeleteConditionStep<R>,- DeleteFinalStep<R>,- DeleteLimitStep<R>,- DeleteOrderByStep<R>,- DeleteQuery<R>,- DeleteResultStep<R>,- DeleteReturningStep<R>,- DeleteUsingStep<R>,- DeleteWhereStep<R>,- DropDatabaseFinalStep,- DropDomainCascadeStep,- DropDomainFinalStep,- DropIndexCascadeStep,- DropIndexFinalStep,- DropIndexOnStep,- DropSchemaFinalStep,- DropSchemaStep,- DropSequenceFinalStep,- DropTableFinalStep,- DropTableStep,- DropTypeFinalStep,- DropTypeStep,- DropViewFinalStep,- GrantFinalStep,- GrantWithGrantOptionStep,- Insert<R>,- InsertFinalStep<R>,- InsertOnConflictConditionStep<R>,- InsertOnConflictWhereStep<R>,- InsertOnDuplicateSetMoreStep<R>,- InsertOnDuplicateStep<R>,- InsertQuery<R>,- InsertResultStep<R>,- InsertReturningStep<R>,- InsertSetMoreStep<R>,- InsertValuesStep1<R,T1>,- InsertValuesStep10<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>,- InsertValuesStep11<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>,- InsertValuesStep12<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>,- InsertValuesStep13<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>,- InsertValuesStep14<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>,- InsertValuesStep15<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>,- InsertValuesStep16<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>,- InsertValuesStep17<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>,- InsertValuesStep18<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>,- InsertValuesStep19<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>,- InsertValuesStep2<R,T1,T2>,- InsertValuesStep20<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>,- InsertValuesStep21<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>,- InsertValuesStep22<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>,- InsertValuesStep3<R,T1,T2,T3>,- InsertValuesStep4<R,T1,T2,T3,T4>,- InsertValuesStep5<R,T1,T2,T3,T4,T5>,- InsertValuesStep6<R,T1,T2,T3,T4,T5,T6>,- InsertValuesStep7<R,T1,T2,T3,T4,T5,T6,T7>,- InsertValuesStep8<R,T1,T2,T3,T4,T5,T6,T7,T8>,- InsertValuesStep9<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,- InsertValuesStepN<R>,- Merge<R>,- MergeFinalStep<R>,- MergeMatchedDeleteStep<R>,- MergeMatchedSetMoreStep<R>,- MergeMatchedStep<R>,- MergeMatchedWhereStep<R>,- MergeNotMatchedSetMoreStep<R>,- MergeNotMatchedStep<R>,- MergeNotMatchedWhereStep<R>,- MergeOnConditionStep<R>,- ResultQuery<R>,- RevokeFinalStep,- RowCountQuery,- Select<R>,- SelectConditionStep<R>,- SelectConnectByAfterStartWithConditionStep<R>,- SelectConnectByConditionStep<R>,- SelectConnectByStep<R>,- SelectCorrelatedSubqueryStep<R>,- SelectDistinctOnStep<R>,- SelectFinalStep<R>,- SelectForJSONCommonDirectivesStep<R>,- SelectForStep<R>,- SelectForUpdateOfStep<R>,- SelectForUpdateStep<R>,- SelectForUpdateWaitStep<R>,- SelectForXMLCommonDirectivesStep<R>,- SelectForXMLPathDirectivesStep<R>,- SelectForXMLRawDirectivesStep<R>,- SelectFromStep<R>,- SelectGroupByStep<R>,- SelectHavingConditionStep<R>,- SelectHavingStep<R>,- SelectIntoStep<R>,- SelectJoinStep<R>,- SelectLimitAfterOffsetStep<R>,- SelectLimitPercentAfterOffsetStep<R>,- SelectLimitPercentStep<R>,- SelectLimitStep<R>,- SelectOffsetStep<R>,- SelectOnConditionStep<R>,- SelectOptionalOnStep<R>,- SelectOptionStep<R>,- SelectOrderByStep<R>,- SelectQualifyConditionStep<R>,- SelectQualifyStep<R>,- SelectQuery<R>,- SelectSeekLimitStep<R>,- SelectSeekStep1<R,T1>,- SelectSeekStep10<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>,- SelectSeekStep11<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>,- SelectSeekStep12<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>,- SelectSeekStep13<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>,- SelectSeekStep14<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>,- SelectSeekStep15<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>,- SelectSeekStep16<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>,- SelectSeekStep17<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>,- SelectSeekStep18<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>,- SelectSeekStep19<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>,- SelectSeekStep2<R,T1,T2>,- SelectSeekStep20<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>,- SelectSeekStep21<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>,- SelectSeekStep22<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>,- SelectSeekStep3<R,T1,T2,T3>,- SelectSeekStep4<R,T1,T2,T3,T4>,- SelectSeekStep5<R,T1,T2,T3,T4,T5>,- SelectSeekStep6<R,T1,T2,T3,T4,T5,T6>,- SelectSeekStep7<R,T1,T2,T3,T4,T5,T6,T7>,- SelectSeekStep8<R,T1,T2,T3,T4,T5,T6,T7,T8>,- SelectSeekStep9<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>,- SelectSeekStepN<R>,- SelectSelectStep<R>,- SelectStartWithStep<R>,- SelectUnionStep<R>,- SelectWhereStep<R>,- SelectWindowStep<R>,- SelectWithTiesAfterOffsetStep<R>,- SelectWithTiesStep<R>,- StoreQuery<R>,- Truncate<R>,- TruncateCascadeStep<R>,- TruncateFinalStep<R>,- TruncateIdentityStep<R>,- Update<R>,- UpdateConditionStep<R>,- UpdateFinalStep<R>,- UpdateFromStep<R>,- UpdateLimitStep<R>,- UpdateOrderByStep<R>,- UpdateQuery<R>,- UpdateResultStep<R>,- UpdateReturningStep<R>,- UpdateSetMoreStep<R>,- UpdateWhereStep<R>
 Instances can be created using DSL.query(String) and overloads,
 or by creating a subtype.
- Author:
- Lukas Eder
- 
Method SummaryModifier and TypeMethodDescription@NotNull QueryBind a new value to an indexed parameter.@NotNull QueryBind a new value to a named parameter.voidcancel()Cancel the underlying statement.voidclose()Close the underlying statement.intexecute()Execute the query, if it has been created with a proper configuration.@NotNull CompletionStage<Integer>Execute the query in a newCompletionStage.@NotNull CompletionStage<Integer>executeAsync(Executor executor)Execute the query in a newCompletionStagethat is asynchronously completed by a task running in the given executor.booleanWhether this query is executable in its current state.@NotNull QuerykeepStatement(boolean keepStatement)Keep the query's underlying statement open after execution.@NotNull Querypoolable(boolean poolable)Specify whether any JDBCStatementcreated by this query should beStatement.setPoolable(boolean).@NotNull QueryqueryTimeout(int seconds)Specify the query timeout in number of seconds for the underlying JDBCStatement.Methods inherited from interface org.jooq.Attachableattach, configuration, detachMethods inherited from interface org.jooq.AttachableQueryPartgetBindValues, getParam, getParams, getSQL, getSQL
- 
Method Details- 
executeExecute the query, if it has been created with a proper configuration.- Returns:
- A result value, depending on the concrete implementation of
         Query:
- Throws:
- DataAccessException- If anything goes wrong in the database
 
- 
executeAsyncExecute the query in a newCompletionStage.The result is asynchronously completed by a task running in an Executorprovided by the underlyingConfiguration.executorProvider().- Returns:
- A result value, depending on the concrete implementation of
         Query:
 
- 
executeAsyncExecute the query in a newCompletionStagethat is asynchronously completed by a task running in the given executor.- Returns:
- A result value, depending on the concrete implementation of
         Query:
 
- 
isExecutableboolean isExecutable()Whether this query is executable in its current state.DML queries may be incomplete in structure and thus not executable. Calling execute()on such queries has no effect, but beware thatAttachableQueryPart.getSQL()may not render valid SQL!
- 
bind@NotNull @NotNull Query bind(String param, Object value) throws IllegalArgumentException, DataTypeExceptionBind a new value to a named parameter.[#1886] If the bind value with name paramis inlined (Param.isInline()) or if this query was created withStatementType.STATIC_STATEMENTand there is an underlyingPreparedStatementkept open because ofkeepStatement(boolean), the underlyingPreparedStatementwill be closed automatically in order for new bind values to have an effect.- Parameters:
- param- The named parameter name. If this is a number, then this is the same as calling- bind(int, Object)
- value- The new bind value.
- Throws:
- IllegalArgumentException- if there is no parameter by the given parameter name or index.
- DataTypeException- if- valuecannot be converted into the parameter's data type
 
- 
bind@NotNull @NotNull Query bind(int index, Object value) throws IllegalArgumentException, DataTypeExceptionBind a new value to an indexed parameter.[#1886] If the bind value at indexis inlined (Param.isInline()) or if this query was created withStatementType.STATIC_STATEMENTand there is an underlyingPreparedStatementkept open because ofkeepStatement(boolean), the underlyingPreparedStatementwill be closed automatically in order for new bind values to have an effect.- Parameters:
- index- The parameter index, starting with 1
- value- The new bind value.
- Throws:
- IllegalArgumentException- if there is no parameter by the given parameter index.
- DataTypeException- if- valuecannot be converted into the parameter's data type
 
- 
poolableSpecify whether any JDBCStatementcreated by this query should beStatement.setPoolable(boolean).If this method is not called on jOOQ types, then jOOQ will not specify the flag on JDBC either, resulting in JDBC's default behaviour. - See Also:
- Statement.setPoolable(boolean)
 
- 
queryTimeoutSpecify the query timeout in number of seconds for the underlying JDBCStatement.- See Also:
- Statement.setQueryTimeout(int)
 
- 
keepStatementKeep the query's underlying statement open after execution.This indicates to jOOQ that the query's underlying StatementorPreparedStatementshould be kept open after execution. If it is kept open, client code is responsible for properly closing it usingclose()- Parameters:
- keepStatement- Whether to keep the underlying statement open
 
- 
closeClose the underlying statement.This closes the query's underlying StatementorPreparedStatementif a previous call tokeepStatement(boolean)indicated that jOOQ should keep statements open after query execution. If there is no underlying open statement, this call is simply ignored.- Specified by:
- closein interface- AutoCloseable
- Throws:
- DataAccessException- If something went wrong closing the statement
- See Also:
- Statement.close()
 
- 
cancelCancel the underlying statement.This cancels the query's underlying StatementorPreparedStatement. If there is no underlying open and running statement, this call is simply ignored.- Throws:
- DataAccessException- If something went wrong cancelling the statement
- See Also:
- Statement.cancel()
 
 
-