Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2917] API doc, db.execute

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:26.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsiOS
Labelsdatabase, execute, feature, ios, release-1.7.0, reported-1.5.1
ReporterKevin Whinnery
AssigneeDon Thorp
Created2011-04-15T03:32:52.000+0000
Updated2011-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...

Comments

  1. Mick Staugaard 2011-04-15

    Yes, please change the implementation to db.execute(mysqlString,[arg1, arg2, arg3]); as this is more flexible.

  2. skypanther 2011-04-15

    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

  3. Stephen Tramer 2011-04-15

    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.

  4. Don Thorp 2011-04-15

    fixing tabs, slotting into the milestone where it's being worked.

  5. Natalie Huynh 2011-04-15

    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

  6. Nikolai Derzhak 2011-04-15

    rollback wrong update

JSON Source