Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3519] Android: Extend DB ResultSet to Return Typed Values

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-27T14:53:39.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-16
ComponentsAndroid
Labelsandroid, feature, release-1.7.0
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T03:46:12.000+0000
Updated2011-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.

Comments

  1. Don Thorp 2011-04-22

    Documentation updated and verified by visual inspection.

JSON Source