public interface Row
Known subtypesRowExt
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.
Methods
Method details
getBlob
public abstract byte[] getBlob(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
byte [] data
Throws
getDouble
public abstract double getDouble(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
a double data from the database
Throws
getFloat
public abstract float getFloat(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
a float data from the database
Throws
getInteger
public abstract int getInteger(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
a int data from the database
Throws
getLong
public abstract long getLong(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
a long data from the database
Throws
getShort
public abstract short getShort(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
a short data from the database
Throws
getString
public abstract String getString(int index)
throws IOExceptionGets column value by index.
Parameters
indexint- starts with zero
Returns
a String data from the database