Skip to content

executeSql crashes in PhoneGap 1.3.0 #3

Open

Description

@vstirbu

Using the SQLitePlugin with the latest PhoneGap 1.3.0 crashes the application every time an executeSql call that returns JSON data is executed.

It seems that the problem is related to the JSONKit library that does not have JSONRepresentation. Changing returned serialization to JSONString fixed the problem. The code is available here.

Activity

  1. davibe commented on Jan 10, 2012

    @davibe
    Owner

    does it still work with older jsonkit libraries ?
    if so could you make a pull request ?

  2. brody2consult commented on Mar 21, 2012

    @brody2consult
    Contributor

    I issued pull request #18 for Issue #17 to fix README.md. For PG 1.3, you must also adapt PGSQLitePlugin.m:

    --- a/Plugins/PGSQLitePlugin.m
    +++ b/Plugins/PGSQLitePlugin.m
    @@ -219,7 +219,7 @@
             if (hasInsertId) {
                 [resultSet setObject:insertId forKey:@"insertId"];
             }
    -        [self respond:callback withString:[resultSet JSONRepresentation] withType:@"success"];
    +        [self respond:callback withString:[resultSet JSONString] withType:@"success"];
         }
     }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions