MonoTouch + SQLite + SQLite.Net ORM: full text indexing

I use the SQLite.NET ORM wrapper for SQLite on MonoTouch to create a database based on business objects. It works great.

I want to run SQLite full text indexing command to create a full text virtual table. However, SQLite.Net ORM does not support this directly. Is there a way to create an index using other commands in MonoTouch?

SQL to create a full-text index:

 CREATE VIRTUAL TABLE "Term" USING FTS3 ( "Id" INTEGER PRIMARY KEY, "Word" integer, "Definition" TEXT ); insert into Term(Id,Word,Definition) Select Id,Word,Definition from SomeOtherTable; drop table SomeOtherTable; 
+4
source share
1 answer

I believe that SQLite.NET does not support the creation of full-text indexes, but supports the creation of regular indexes.

In any case, you can try to execute any custom SQL code with:

 <YOUR_SUBCLASS_OF_SQLiteConnection>.Execute(<YOUR_SQL_CODE>); 

Example:

 public class LocalDatabase: SQLiteConnection { ... public LocalDatabase (string path) : base(path) { ... Execute("CREATE VIRTUAL TABLE \"MyTable\" USING FTS3 ..."); ... } ... } 
+1
source

All Articles