[TIMOB-3519] Android: Extend DB ResultSet to Return Typed Values
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-04-27T14:53:39.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 1.7.0, Sprint 2011-16 |
| Components | Android |
| Labels | android, feature, release-1.7.0 |
| Reporter | Don Thorp |
| Assignee | Don Thorp |
| Created | 2011-04-15T03:46:12.000+0000 |
| Updated | 2011-04-27T21:59:13.000+0000 |
Description
ResultSet should allow for retrieving the underlying data from
the DB if the author knows what type of data was stored. Get
methods for int, float,
double, string should be added and they
should accept a column index or a column name.
Add constants to Ti.Database
FIELD_TYPE_UNKNOWN = 0
FIELD_TYPE_STRING = 0;
FIELD_TYPE_INT = 1;
FIELD_TYPE_FLOAT = 2;
FIELD_TYPE_DOUBLE = 3;
Extend field, getField, fieldByName, and getFieldByName to take an optional second parameter which is one of the type constants above.
e.g. rs.field(1, Ti.Database.FIELD_TYPE_INT);
Drillbit tests and APIDoc must be added as well.
Documentation updated and verified by visual inspection.