[TIMOB-15194] BlackBerry: Database.getRowsAffected() not implemented
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-09-19T15:12:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 3.2.0 |
| Components | BlackBerry |
| Labels | blackberry, database, qe-testadded |
| Reporter | Gertjan Smits |
| Assignee | Pedro Enrique |
| Created | 2013-09-13T10:50:14.000+0000 |
| Updated | 2014-02-20T00:59:47.000+0000 |
Description
The Database.getRowsAffected() method is not implemented. Function does not exists.
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();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.