{ "id": "61572", "key": "TIMOB-940", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T02:39:43.000+0000", "created": "2011-04-15T02:39:42.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "resultset" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T21:22:44.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
If I execute a SELECT it returns a ResultSet which is already\npointing to the first row. So a while(rs.next()) loop is always\nskipping the first row. with a do while I'm eventually accessing an\ninvalid row (if I don't check with isValidRow). Wouldn't it be\nbetter to point the ResultSet pointer to the \"beforeFirst\" row ,\nlike the ResultSet in java?
We modeled this after the Google Gears DB API (see http://code.google.com/apis/gears/api_database.html#ResultSet).
\nThe code should be something like:
\n\nvar rows = db.execute('SELECT * FROM DATABASETEST');\nwhile (rows.isValidRow())\n{\n Titanium.API.info('ID: ' + rows.field(0) + ' NAME: ' + rows.fieldByName('name'));\n rows.next();\n}\nrows.close();
\n
\nThis effectively is the same as JDBC as long as you're using\nisValidRow() as your loop condition.