[TIMOB-12941] BlackBerry: If no values have been inserted in to the table select * from table will fail
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-07-26T04:20:59.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 15 API, 2013 Sprint 15, Release 3.1.2, Release 3.2.0 |
| Components | BlackBerry |
| Labels | n/a |
| Reporter | Russell McMahon |
| Assignee | Pedro Enrique |
| Created | 2013-03-04T23:06:13.000+0000 |
| Updated | 2014-06-19T12:44:37.000+0000 |
Description
rows will be undefined, expected result would be 0 rows
happens in database object
PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/137
Test code:
var win = Ti.UI.createWindow({ }); var btn = Ti.UI.createButton(); win.add(btn); btn.addEventListener('click', function(e){ var db = Ti.Database.open('empty'); db.execute('CREATE TABLE IF NOT EXISTS people (name TEXT, phone_number TEXT, city TEXT)'); var res = db.execute('SELECT * FROM people'); alert(res.rowCount); }); win.open();Verified the fix . we get a return value is '0' & it does not fail. Thus closing. Environment: Appcel Studio : 3.1.2.201308082014 Ti SDK : 3.1.2.v20130808180613 Mac OSX : 10.8.4 Alloy : 1.2.0-alpha6 CLI - 3.1.2-alpha win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88
Verified fixed. Titanium SDK 3.1.2.v20130808180613 Alloy 1.2.0-alpha6 Appcelerator Studio 3.1.2.201308082014 CLI 3.1.2-alpha Node 0.10.13 Closing.