Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12941] BlackBerry: If no values have been inserted in to the table select * from table will fail

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-07-26T04:20:59.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 15 API, 2013 Sprint 15, Release 3.1.2, Release 3.2.0
ComponentsBlackBerry
Labelsn/a
ReporterRussell McMahon
AssigneePedro Enrique
Created2013-03-04T23:06:13.000+0000
Updated2014-06-19T12:44:37.000+0000

Description

rows will be undefined, expected result would be 0 rows

Comments

  1. Russell McMahon 2013-06-18

    happens in database object
  2. Pedro Enrique 2013-07-26

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/137
  3. Pedro Enrique 2013-07-26

    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();
       
  4. Lokesh Choudhary 2013-08-10

    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
  5. Federico Casali 2013-08-10

    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.

JSON Source