Class ReaderImpl<V>
java.lang.Object
de.chojo.sadu.queries.execution.reading.ReaderImpl<V>
- All Implemented Interfaces:
DataSourceProvider
,ConnectionProvider
,QueryProvider
,Reader<V>
- Direct Known Subclasses:
AutoMappedQuery
,MappedQuery
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionall()
Retrieves all elements from the Reader.Retrieves all the results of the query.call()
first()
Retrieves the first value from the query result and wraps it in anOptional
object.Retrieves a single result from the query.protected abstract RowMapping<V>
protected MapperConfig
query()
sql()
storeAllAndAppend
(String key) Stores all query results and allows to create a new query.storeOneAndAppend
(String key) Stores a query result and allows to create a new query.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.chojo.sadu.queries.api.base.QueryProvider
callConnection, configuration, source
-
Constructor Details
-
ReaderImpl
-
-
Method Details
-
firstResult
Description copied from interface:Reader
Retrieves a single result from the query.See
Reader.first()
for direct access- Specified by:
firstResult
in interfaceReader<V>
- Returns:
- the result of the query
-
allResults
Description copied from interface:Reader
Retrieves all the results of the query.See
Reader.all()
for direct access- Specified by:
allResults
in interfaceReader<V>
- Returns:
- a Result object containing a List of results
-
storeOneAndAppend
Description copied from interface:Reader
Stores a query result and allows to create a new query.- Specified by:
storeOneAndAppend
in interfaceReader<V>
- Parameters:
key
- the key used to identify the stored result- Returns:
- an AppendedQuery object that can execute another query with the same chain
-
storeAllAndAppend
Description copied from interface:Reader
Stores all query results and allows to create a new query.- Specified by:
storeAllAndAppend
in interfaceReader<V>
- Parameters:
key
- the key used to identify the stored result- Returns:
- an AppendedQuery object that can execute another query with the same chain
-
mapper
- Throws:
SQLException
-
mapperConfig
-
first
Description copied from interface:Reader
-
all
Description copied from interface:Reader
Retrieves all elements from the Reader. -
sql
-
call
-
query
- Specified by:
query
in interfaceQueryProvider
-