How to create virtual table for FTS3 with ORMLite
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?
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);");
链接地址: http://www.djcxy.com/p/19190.html
上一篇: 正常表vs虚拟表SQLite数据库
下一篇: 如何用ORMLite为FTS3创建虚拟表