Package de.chojo.sqlutil.wrapper.stage
Interface RetrievalStage<T>
- Type Parameters:
T- type of RetrievalStage
- All Known Implementing Classes:
QueryBuilder
public interface RetrievalStage<T>
Represents a RetrievalStage of a
QueryBuilder.
A RetrievalStage is used to retrieve the actual data from the database.
The RetrievalStage defines in which way the results should be retreived.
-
Method Summary
Modifier and TypeMethodDescriptionall()Retrieve all results async as a listRetrieve all results async as a listallSync()Retrieve all results synced as a listfirst()Retrieve the first result from the results set asyncRetrieve the first result from the results set asyncRetrieve the first result from the results set syncedkeysSync()Retrieve all created keys as a list
-
Method Details
-
all
CompletableFuture<List<T>> all()Retrieve all results async as a list- Returns:
- A
CompletableFutureto retrieve the data. - Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-
all
Retrieve all results async as a list- Parameters:
executor- the executor used for async call- Returns:
- A
CompletableFutureto retrieve the data. - Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-
allSync
Retrieve all results synced as a list- Returns:
- results as list
- Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-
keysSync
Retrieve all created keys as a list- Returns:
- results as list
- Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-
first
CompletableFuture<Optional<T>> first()Retrieve the first result from the results set async- Returns:
- A
CompletableFutureto retrieve the data. - Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-
first
Retrieve the first result from the results set async- Parameters:
executor- the executor used for async call- Returns:
- A
CompletableFutureto retrieve the data. - Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-
firstSync
Retrieve the first result from the results set synced- Returns:
- result wrapped into an optional
- Throws:
WrappedQueryExecutionException- ifQueryBuilderConfig.isThrowing()is set totrueand a exceptions occurs during query building or execution
-