java.lang.Object
org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
org.litebridgedb.orm.api.sql.SqlSelector
- All Implemented Interfaces:
SelectTerminal<Row>
public final class SqlSelector
extends org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
-
Field Summary
Fields inherited from class org.litebridgedb.orm.api.select.impl.AbstractSelector
databaseProvider, dtoClass, litebridgeContext, selectSpec -
Constructor Summary
ConstructorsConstructorDescriptionSqlSelector(TransactionalDatabaseProvider databaseProvider, TableRegistry tableRegistry, LitebridgeContext litebridgeContext) -
Method Summary
Methods inherited from class org.litebridgedb.orm.api.select.impl.AbstractSelector
executeQuery, first, firstOrThrow, firstOrThrow, litebridgeContext, one, oneOrThrow, oneOrThrow, selectSpec, stream, toSql
-
Constructor Details
-
SqlSelector
public SqlSelector(TransactionalDatabaseProvider databaseProvider, TableRegistry tableRegistry, LitebridgeContext litebridgeContext)
-
-
Method Details
-
select
-
oneOrNull
Description copied from interface:SelectTerminalExecutes the query and expects exactly one result.- Specified by:
oneOrNullin interfaceSelectTerminal<Row>- Specified by:
oneOrNullin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec> - Returns:
- the single result, or
nullwhen no row matches
-
firstOrNull
Description copied from interface:SelectTerminalExecutes the query and returns the first row if present.- Specified by:
firstOrNullin interfaceSelectTerminal<Row>- Specified by:
firstOrNullin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec> - Returns:
- the first result, or
nullwhen no row matches
-
list
Description copied from interface:SelectTerminalExecutes the query and materializes all results into aList.- Specified by:
listin interfaceSelectTerminal<Row>- Specified by:
listin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec> - Returns:
- list of all matching results (possibly empty)
-
executeQuery
- Overrides:
executeQueryin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
-