1

I couldn't find a way to use FTS3 with ormlite because, I have problems creating a virtual table. I need to run something like this in native sqlite:

CREATE VIRTUAL TABLE enrondata1 USING fts3(content TEXT);

But ORMLite calls the below method for creating a simple table

TableUtils.createTable(ConnectionSource connectionSource, Class<T> dataClass);

In this answer for the question: FTS3 searches in ORMLite?, written about using ORMLite's raw query interface, unfortunately, I could not find a way to create a table with it.

How can I use FTS3 with ormlite?

Community
  • 1
  • 1
Sardor Dushamov
  • 1,665
  • 3
  • 17
  • 44

1 Answers1

3

The queryRaw function is only for SELECT queries. To execute other commands, use raw execute statements.

For example:

dao.executeRaw("CREATE VIRTUAL TABLE enrondata1 USING fts3(content TEXT);");
Gray
  • 115,027
  • 24
  • 293
  • 354
CL.
  • 173,858
  • 17
  • 217
  • 259