Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
yogeshwarp
Posts: 30
Registered: ‎11-09-2012
My Device: Dev Alpha A

Full text suppport in SQLite engine for Cascades App

Does anybody knows if Qt SQL engine in BB10 supports Full text search? I am unable to locate any docs on this so far

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Full text suppport in SQLite engine for Cascades App

Assuming no special support is required at the Qt level, the libsqlite used in the system does appear to support FTS3 and FTS4.

 

Using the on-board Python 3.2 (as I don't have a "sqlite3" command line utility for the platform), I executed "create virtual table data using fts3()" and it executed. Also same with fts4(). When I tried the made-up module fts5() I got an error.

 

The result looks like this:

sqlite> select * from sqlite_master;
type|name|tbl_name|rootpage|sql
table|data|data|0|CREATE VIRTUAL TABLE data using fts3()
table|data_content|data_content|2|CREATE TABLE 'data_content'(docid INTEGER PRIMARY KEY, 'c0content')
table|data_segments|data_segments|3|CREATE TABLE 'data_segments'(blockid INTEGER PRIMARY KEY, block BLOB)
table|data_segdir|data_segdir|4|CREATE TABLE 'data_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_bloc
k INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx))
index|sqlite_autoindex_data_segdir_1|data_segdir|5|
table|data2|data2|0|CREATE VIRTUAL TABLE data2 using fts4()
table|data2_content|data2_content|6|CREATE TABLE 'data2_content'(docid INTEGER PRIMARY KEY, 'c0content')
table|data2_segments|data2_segments|7|CREATE TABLE 'data2_segments'(blockid INTEGER PRIMARY KEY, block BLOB)
table|data2_segdir|data2_segdir|8|CREATE TABLE 'data2_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_b
lock INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx))
index|sqlite_autoindex_data2_segdir_1|data2_segdir|9|
table|data2_docsize|data2_docsize|10|CREATE TABLE 'data2_docsize'(docid INTEGER PRIMARY KEY, size BLOB)
table|data2_stat|data2_stat|11|CREATE TABLE 'data2_stat'(id INTEGER PRIMARY KEY, value BLOB)

I'll assume if you know how the FTS stuff works, that you can interpret that to confirm whether full text search should work or not... I've never used it yet myself.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
yogeshwarp
Posts: 30
Registered: ‎11-09-2012
My Device: Dev Alpha A

Re: Full text suppport in SQLite engine for Cascades App

Great

Will try it out, coming from Nokia where they had used Qt compiled without FTS support its good to know that Blackberry one seems to have turned FTS on by default