Interface Row

All Known Subinterfaces:
RowExt

public interface Row

The Row interface is returned by com.codename1.db.Cursor#getRow() to provide access to the content of an individual row.

Column indexes are zero-based. A SQL NULL reads back as null from #getString(int) and #getBlob(int), and as 0 from the numeric getters; use RowExt#wasNull() to tell a stored zero from a NULL.

while (cur.next()) {
    Row row = cur.getRow();
    int id = row.getInteger(0);
    String body = row.getString(1);
    System.out.println(id + ": " + body);
}

See the com.codename1.db package documentation for the full contract.

  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    getBlob(int index)
    Gets column value by index.
    double
    getDouble(int index)
    Gets column value by index.
    float
    getFloat(int index)
    Gets column value by index.
    int
    getInteger(int index)
    Gets column value by index.
    long
    getLong(int index)
    Gets column value by index.
    short
    getShort(int index)
    Gets column value by index.
    getString(int index)
    Gets column value by index.
  • Method Details

    • getBlob

      byte[] getBlob(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      byte [] data

      Throws
      • IOException
      Throws:
      IOException
    • getDouble

      double getDouble(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      a double data from the database

      Throws
      • IOException
      Throws:
      IOException
    • getFloat

      float getFloat(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      a float data from the database

      Throws
      • IOException
      Throws:
      IOException
    • getInteger

      int getInteger(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      a int data from the database

      Throws
      • IOException
      Throws:
      IOException
    • getLong

      long getLong(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      a long data from the database

      Throws
      • IOException
      Throws:
      IOException
    • getShort

      short getShort(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      a short data from the database

      Throws
      • IOException
      Throws:
      IOException
    • getString

      String getString(int index) throws IOException

      Gets column value by index.

      Parameters
      • index: starts with zero
      Returns

      a String data from the database

      Throws
      • IOException
      Throws:
      IOException