Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15194] BlackBerry: Database.getRowsAffected() not implemented

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2013-09-19T15:12:31.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.2.0
ComponentsBlackBerry
Labelsblackberry, database, qe-testadded
ReporterGertjan Smits
AssigneePedro Enrique
Created2013-09-13T10:50:14.000+0000
Updated2014-02-20T00:59:47.000+0000

Description

The Database.getRowsAffected() method is not implemented. Function does not exists.

Comments

  1. Pedro Enrique 2013-09-16

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/172 Code to test:
       var win = Titanium.UI.createWindow({
           title : 'Test Window'
       });
       
       win.open();
       
       var db = Ti.Database.open('my_db');
       db.execute('CREATE TABLE IF NOT EXISTS people (name TEXT, phone_number TEXT, city TEXT)');
       db.execute('DELETE FROM people');
       
       var thisName = 'Arthur';
       var thisPhoneNo = '1-617-000-0000';
       var thisCity = 'Mountain View';
       db.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', thisName, thisPhoneNo, thisCity);
       
       var personArray = ['Paul','020 7000 0000', 'London'];
       db.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', personArray);
       // Should log "1"
       Ti.API.info(db.rowsAffected);
       
       db.execute('SELECT * FROM people');
       // Should log "2"
       Ti.API.info(db.rowsAffected);
       
       db.close();
       
  2. Samuel Dowse 2013-11-13

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311122225 Titanium SDK, build: 3.2.0.v20131113094843 CLI: 3.2.0 Alloy: 1.3.0 BlackBerry Simulator: 10.2.0.1791 Test case provided by Pedro works as expected logging the correct outputs. Closing.

JSON Source