Interface DbResult

All Superinterfaces:
Iterable<DbResultValue<?>>

public interface DbResult extends Iterable<DbResultValue<?>>
A DbResult represents a single result (row) from a database (typically of a SelectStatement). It is an abstraction of a JDBC ResultSet.
Since:
1.0.0
See Also:
  • Method Details

    • getValue

      <V> V getValue(int i)
      Type Parameters:
      V - type of the value.
      Parameters:
      i - the index of the requested value. Has to be in the range from 0 to size-1.
      Returns:
      the requested result value.
    • getName

      String getName(int i)
      Parameters:
      i - the index of the requested name. Has to be in the range from 0 to size-1.
      Returns:
      the requested database name (e.g. column name, alias, selection).
    • getDeclaration

      default String getDeclaration(int i)
      Parameters:
      i - the index of the requested declaration. Has to be in the range from 0 to size-1.
      Returns:
      the requested declaration. Will be empty if not available.
    • getSize

      int getSize()
      Returns:
      the number of values.
    • iterator

      default Iterator<DbResultValue<?>> iterator()
      Specified by:
      iterator in interface Iterable<DbResultValue<?>>