[TIMOB-2235] Ti.Database.ResultSet.fieldName() mangles the database column names
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | Low | 
| Status | Closed | 
| Resolution | Fixed | 
| Resolution Date | 2011-04-17T01:58:29.000+0000 | 
| Affected Version/s | n/a | 
| Fix Version/s | Release 1.5.0 M04 | 
| Components | iOS | 
| Labels | database, defect, ios, iphone | 
| Reporter | Nathaniel McCallum | 
| Assignee | Reggie Seagraves | 
| Created | 2011-04-15T03:14:23.000+0000 | 
| Updated | 2011-04-17T01:58:29.000+0000 | 
Description
CREATE TABLE foo (myColumn INT);
var rs = db.execute("SELECT myColumn FROM foo");
alert(rs.fieldName(0));
On android, the output is 'myColumn'.
On iphone, the output is 'mycolumn'. This is wrong.
The root cause is logic which provides case-insensitive matching for rs.fieldByName('mycolumn'). This behavior is correct, but the rs.fieldName(0) behavior is not (on iphone only).
I've already fixed this in my titanium branch. I've created a merge request here: http://github.com/appcelerator/titanium_mobile/pull/11">http://github.com/appcelerator/titanium_mobile/pull/11
(from [555db6980b222bb3a24074e4d1fad28564f3c885]) [#2235 state:open] (Requires test before sending to QA) don't mange sql column names for ResultSet.fieldName(), but still preserve case insensitive search for ResultSet.fieldByName()
http://github.com/appcelerator/titanium_mobile/commit/555db6980b222bb3a24074e4d1fad28564f3c885"> http://github.com/appcelerator/titanium_mobile/commit/555db6980b222...
Merge complete. Assigning to Blain for test.
Didn't we fix this? Shouldn't it be fixed-in-qa?
yup.
iPod 3GT 4.2.1, 1.5.0.a899d42