Package de.chojo.sqlutil.wrapper.stage
Interface ResultStage<T>
- Type Parameters:
T- type of ResultStage
- All Known Implementing Classes:
QueryBuilder
public interface ResultStage<T>
Represents a ResultStage of a
QueryBuilder.
A ResultStage is used to read the result set, perform updates or append another query.
-
Method Summary
Modifier and TypeMethodDescriptionappend()Append another query to the query builder.default UpdateStagedelete()Mark this query as deletion query.insert()Insert data into a table.readRow(ThrowingFunction<T, ResultSet, SQLException> mapper) Extract results from a results set.update()Mark this query as update query.
-
Method Details
-
readRow
Extract results from a results set.This function should not loop through the results set.
It should only transform the current row to the requested object.
- Parameters:
mapper- mapper to map the current row.- Returns:
- The
QueryBuilderin aRetrievalStageto retrieve the row/s.
-
update
UpdateStage update()Mark this query as update query.- Returns:
- The
QueryBuilderin aUpdateStageto update the data.
-
delete
Mark this query as deletion query. Alias forupdate()- Returns:
- The
QueryBuilderin aUpdateStageto update the data.
-
insert
InsertStage insert()Insert data into a table. Alias forupdate()- Returns:
- The
QueryBuilderin aInsertStageto update the data.
-
append
QueryStage<T> append()Append another query to the query builder.- Returns:
- The
QueryBuilderin aQueryStage
-