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
Constructors -
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 anOptionalobject.Retrieves a single result from the query.protected abstract RowMapping<V>protected MapperConfigquery()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, waitMethods inherited from interface de.chojo.sadu.queries.api.base.QueryProvider
callConnection, configuration, source
-
Constructor Details
-
ReaderImpl
-
-
Method Details
-
firstResult
Description copied from interface:ReaderRetrieves a single result from the query.See
Reader.first()for direct access- Specified by:
firstResultin interfaceReader<V>- Returns:
- the result of the query
-
allResults
Description copied from interface:ReaderRetrieves all the results of the query.See
Reader.all()for direct access- Specified by:
allResultsin interfaceReader<V>- Returns:
- a Result object containing a List of results
-
storeOneAndAppend
Description copied from interface:ReaderStores a query result and allows to create a new query.- Specified by:
storeOneAndAppendin 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:ReaderStores all query results and allows to create a new query.- Specified by:
storeAllAndAppendin 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:ReaderRetrieves all elements from the Reader. -
sql
-
call
-
query
- Specified by:
queryin interfaceQueryProvider
-