{ "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?

{html}", "attachment": [], "flagged": false, "summary": "ResultSet should not point to the first row", "creator": { "name": "hwerglmir", "key": "hwerglmir", "displayName": "Hwerglmir", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hwerglmir", "key": "hwerglmir", "displayName": "Hwerglmir", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124393", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

We modeled this after the Google Gears DB API (see http://code.google.com/apis/gears/api_database.html#ResultSet).

\n

The 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
\n

This effectively is the same as JDBC as long as you're using\nisValidRow() as your loop condition.

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:39:43.000+0000", "updated": "2011-04-15T02:39:43.000+0000" }, { "id": "410547", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T21:22:44.000+0000", "updated": "2017-03-09T21:22:44.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }