jgilfelt/android-sqlite-asset-helper — pull request #18 by kevinchai (2013-06-28 16:35:42+00:00)
Title: Added splitSqlScript function to parse SQL DB upgrade scripts

DB upgrade scripts that contain semicolons in strings for inserts / updates are not parsed correctly. e.g.

1: CREATE TABLE temp (a TEXT);
2: INSERT INTO temp VALUES ("this;that");

was previously parsed as:

2: INSERT INTO temp VALUES ("this;
3: that");

I have added a splitSqlScript function which I have taken from http://www.michenux.net/android-database-sqlite-creation-upgrade-245.html (search for splitSqlScript).

Note: I have modified the code on Line 345 to check for a double quote character rather than the single quote character used in the linked page. This is to align with the example-v2 code which uses double quotes in SQL scripts.

I have tested this for my project and it is correctly handling semicolons. I have also generated a new .jar but it has doubled the size of the .jar (12kb -> 23kb).