Class SqlSelector

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>
  • Constructor Details

  • Method Details

    • select

      public SqlFromClause select(ExpressionSpec... expressionSpecs)
    • oneOrNull

      public @Nullable Row oneOrNull()
      Description copied from interface: SelectTerminal
      Executes the query and expects exactly one result.
      Specified by:
      oneOrNull in interface SelectTerminal<Row>
      Specified by:
      oneOrNull in class org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
      Returns:
      the single result, or null when no row matches
    • firstOrNull

      public @Nullable Row firstOrNull()
      Description copied from interface: SelectTerminal
      Executes the query and returns the first row if present.
      Specified by:
      firstOrNull in interface SelectTerminal<Row>
      Specified by:
      firstOrNull in class org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
      Returns:
      the first result, or null when no row matches
    • list

      public List<Row> list()
      Description copied from interface: SelectTerminal
      Executes the query and materializes all results into a List.
      Specified by:
      list in interface SelectTerminal<Row>
      Specified by:
      list in class org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
      Returns:
      list of all matching results (possibly empty)
    • executeQuery

      protected List<Row> executeQuery()
      Overrides:
      executeQuery in class org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>