Class SqlSelector

java.lang.Object
org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
org.litebridgedb.orm.api.sql.SqlSelector
All Implemented Interfaces:
org.litebridgedb.orm.api.select.SelectTerminal<Row>

public final class SqlSelector extends org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
  • Constructor Details

  • Method Details

    • select

      public SqlFromClause select(String... columns)
    • select

      public SqlFromClause select(Aliased... columns)
    • oneOrNull

      public @Nullable Row oneOrNull()
      Description copied from interface: org.litebridgedb.orm.api.select.SelectTerminal
      Executes the query and expects exactly one result.
      Specified by:
      oneOrNull in interface org.litebridgedb.orm.api.select.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: org.litebridgedb.orm.api.select.SelectTerminal
      Executes the query and returns the first row if present.
      Specified by:
      firstOrNull in interface org.litebridgedb.orm.api.select.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: org.litebridgedb.orm.api.select.SelectTerminal
      Executes the query and materializes all results into a List.
      Specified by:
      list in interface org.litebridgedb.orm.api.select.SelectTerminal<Row>
      Specified by:
      list in class org.litebridgedb.orm.api.select.impl.AbstractSelector<Row,SqlSelectSpec>
      Returns:
      list of all matching results (possibly empty)