{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client/issues/232","repository_url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client","labels_url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client/issues/232/comments","events_url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client/issues/232/events","html_url":"https://github.com/Azure/azure-mobile-apps-js-client/issues/232","id":191779869,"number":232,"title":"Purge local table => Delete statement parameter limit","user":{"login":"andreujuanc","id":360052,"avatar_url":"https://avatars.githubusercontent.com/u/360052?v=3","gravatar_id":"","url":"https://api.github.com/users/andreujuanc","html_url":"https://github.com/andreujuanc","followers_url":"https://api.github.com/users/andreujuanc/followers","following_url":"https://api.github.com/users/andreujuanc/following{/other_user}","gists_url":"https://api.github.com/users/andreujuanc/gists{/gist_id}","starred_url":"https://api.github.com/users/andreujuanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreujuanc/subscriptions","organizations_url":"https://api.github.com/users/andreujuanc/orgs","repos_url":"https://api.github.com/users/andreujuanc/repos","events_url":"https://api.github.com/users/andreujuanc/events{/privacy}","received_events_url":"https://api.github.com/users/andreujuanc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-26T01:20:42Z","updated_at":"2016-11-26T01:31:18Z","closed_at":null,"body":"If purge a table with more rows than the maximum amount of variables a statement can have there the purge fails with this error: \"too many SQL variables\". \r\n\r\nI think that if a purge should delete all rows. Maybe i'm missing something but doing reading all records and then deleting them with DELETE FROM table WHERE ID IN (<ids here>) wont work for medium sized and big applications.\r\n\r\nRight now i need to sync 4857 rows, they will stay there, no much updating , but they are essential data for my logic.\r\n\r\nTwo options:\r\n\r\n1.- when purging delete without WHERE. (risky?)\r\n2.- doing this:  sqlite3_limit(db,SQLITE_LIMIT_SQL_LENGTH,size) ?? \r\n\r\nWill try to see if i can implement number 2 in client configuration.\r\n\r\nCheers\r\n "},"comment":{"url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client/issues/comments/263037607","html_url":"https://github.com/Azure/azure-mobile-apps-js-client/issues/232#issuecomment-263037607","issue_url":"https://api.github.com/repos/Azure/azure-mobile-apps-js-client/issues/232","id":263037607,"user":{"login":"andreujuanc","id":360052,"avatar_url":"https://avatars.githubusercontent.com/u/360052?v=3","gravatar_id":"","url":"https://api.github.com/users/andreujuanc","html_url":"https://github.com/andreujuanc","followers_url":"https://api.github.com/users/andreujuanc/followers","following_url":"https://api.github.com/users/andreujuanc/following{/other_user}","gists_url":"https://api.github.com/users/andreujuanc/gists{/gist_id}","starred_url":"https://api.github.com/users/andreujuanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreujuanc/subscriptions","organizations_url":"https://api.github.com/users/andreujuanc/orgs","repos_url":"https://api.github.com/users/andreujuanc/repos","events_url":"https://api.github.com/users/andreujuanc/events{/privacy}","received_events_url":"https://api.github.com/users/andreujuanc/received_events","type":"User","site_admin":false},"created_at":"2016-11-26T01:31:18Z","updated_at":"2016-11-26T01:31:18Z","body":"@adrianhall Sure:\r\n\r\n`syncContext.purge(new azure.Query('assets'))`\r\n\r\nData is already sync.\r\n\r\nI literally followed the execution until here:\r\n```\r\n        var deleteStatement = _.format(\"DELETE FROM {0} WHERE {1} in ({2})\", tableName, idPropertyName, deleteExpressions.join());\r\n        if (this._editStatement) { // test hook\r\n            deleteStatement = this._editStatement(deleteStatement);\r\n        }\r\n        transaction.executeSql(deleteStatement, deleteParams);\r\n```\r\n\r\nOn my scenario, having 4000+ id's to delete exceeded the maximum statement size. "}}
{"actor":{"display_login":"andreujuanc"}}