[TIMOB-2917] API doc, db.execute
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:26.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | iOS |
Labels | database, execute, feature, ios, release-1.7.0, reported-1.5.1 |
Reporter | Kevin Whinnery |
Assignee | Don Thorp |
Created | 2011-04-15T03:32:52.000+0000 |
Updated | 2011-04-17T02:00:26.000+0000 |
Description
The API docs state that Ti.Database.execute takes an array for replacement values, like:
db.execute(mysqlString,[arg1, arg2, arg3]);
But this only works on Android - the proper way to do this is:
db.execute(mysqlString, arg1, arg2, arg3);
Until this feature is added for iOS, the docs need to be updated:
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Database.DB.execute-method.html"> http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Dat...
Yes, please change the implementation to db.execute(mysqlString,[arg1, arg2, arg3]); as this is more flexible.
Also note that db.execute takes varargs only for select statements. It won't work for ALTER, PRAGMA, and probably others. See my helpdesk ticket http://developer.appcelerator.com/helpdesk/view/53061">http://developer.appcelerator.com/helpdesk/view/53061
This is not an API doc issue, this is a feature parity issue because there's no reason for iOS to not support this.
Duplicate of another bug as well.
fixing tabs, slotting into the milestone where it's being worked.
Tested with Titanium SDK version: 1.7.0 (03/17/11 10:02 630a276) on
iOS 4.0.2 testDatabaseLH2917 true 160 Success
Emulator 2.1 testDatabaseLH2917 true 160 Success
rollback wrong update