summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2009-05-13 22:48:13 +0100
committerBjorn Bringert <bringert@android.com>2009-05-15 12:05:40 +0100
commitf1fe07249249ca74178a75fe5198058b501f9944 (patch)
treedd52843aaac10dc7fa767dfcbf1a7b739301e5d5 /src
parente5b045de0d72577c347c96d57d1f7460cb2b9613 (diff)
downloadApplicationsProvider-f1fe07249249ca74178a75fe5198058b501f9944.tar.gz
ApplicationsProvider changes for new _TOKENIZE.
A token_index column has been added to the _TOKENIZE result. This commit changes the ApplicationsProvider to use this new column.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/providers/applications/ApplicationsProvider.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/providers/applications/ApplicationsProvider.java b/src/com/android/providers/applications/ApplicationsProvider.java
index 11e5d4a..7d2d343 100644
--- a/src/com/android/providers/applications/ApplicationsProvider.java
+++ b/src/com/android/providers/applications/ApplicationsProvider.java
@@ -120,7 +120,8 @@ public class ApplicationsProvider extends ContentProvider {
// Maps token from the app name to records in the applications table
mDb.execSQL("CREATE TABLE applicationsLookup (" +
"token TEXT," +
- "source INTEGER REFERENCES " + APPLICATIONS_TABLE + "(" + _ID + ")" +
+ "source INTEGER REFERENCES " + APPLICATIONS_TABLE + "(" + _ID + ")," +
+ "token_index INTEGER" +
");");
mDb.execSQL("CREATE INDEX applicationsLookupIndex ON applicationsLookup (" +
"token," +
@@ -131,12 +132,12 @@ public class ApplicationsProvider extends ContentProvider {
APPLICATIONS_TABLE + " " +
"BEGIN " +
"DELETE FROM applicationsLookup WHERE source = new." + _ID + ";" +
- "SELECT _TOKENIZE('applicationsLookup', new." + _ID + ", new." + NAME + ", ' ');" +
+ "SELECT _TOKENIZE('applicationsLookup', new." + _ID + ", new." + NAME + ", ' ', 1);" +
"END");
mDb.execSQL("CREATE TRIGGER applicationsLookup_insert AFTER INSERT ON " +
APPLICATIONS_TABLE + " " +
"BEGIN " +
- "SELECT _TOKENIZE('applicationsLookup', new." + _ID + ", new." + NAME + ", ' ');" +
+ "SELECT _TOKENIZE('applicationsLookup', new." + _ID + ", new." + NAME + ", ' ', 1);" +
"END");
mDb.execSQL("CREATE TRIGGER applicationsLookup_delete DELETE ON " +
APPLICATIONS_TABLE + " " +