Question about amalgalite and fts3

  • Thread starter Jesús Gabriel y Galán
  • Start date
J

Jesús Gabriel y Galán

Hi,

I was happily using a script that used Sequel and Amalgalite to read a
sqlite database (the one generated by gnome-hamster-applet), until I
upgraded to Ubuntu 10.10.
Now, my script fails with:

/home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/statement.rb:33:in
`prepare': Amalgalite::SQLite3::Error: Failure to prepare statement
PRAGMA table_info('fact_index') : [SQLITE_ERROR 1] : no such module:
fts3 (Sequel::DatabaseError)
from /home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/statement.rb:33:in
`send'
from /home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/statement.rb:33:in
`initialize'
from /home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/database.rb:265:in
`new'
[*snip many more lines*]

I've read that fts3 is a SQLite extension module that can be enabled
or disabled when compiling sqlite. So, my question is, is there
something I can do to enable this module in Amalgalite?

Thanks,

Jesus.
 
J

Jeremy Hinegardner

Hi,

Apologies for not replying sooner, I do not read ruby-talk every day.

Hi,

I was happily using a script that used Sequel and Amalgalite to read a
sqlite database (the one generated by gnome-hamster-applet), until I
upgraded to Ubuntu 10.10.
Now, my script fails with:

/home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/statement.rb:33:in
`prepare': Amalgalite::SQLite3::Error: Failure to prepare statement
PRAGMA table_info('fact_index') : [SQLITE_ERROR 1] : no such module:
fts3 (Sequel::DatabaseError)
from /home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/statement.rb:33:in
`send'
from /home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/statement.rb:33:in
`initialize'
from /home/jesus/.rvm/gems/ruby-1.8.7-p334/gems/amalgalite-1.0.0/lib/amalgalite/database.rb:265:in
`new'
[*snip many more lines*]

I've read that fts3 is a SQLite extension module that can be enabled
or disabled when compiling sqlite. So, my question is, is there
something I can do to enable this module in Amalgalite?

I've done a little digging, and it looks like last July hamster-applet updated
their sqlite database schema to use the FTS3 module in sqlite. They are able to
do this because the pysqlite library, on which hamster-applet depends, builds
sqlite with SQLITE_ENABLE_FTS3=1.

When you upgraded to Ubuntu 10.10 hamster-applet was probably updated, which in
turn updated the schema in the sqlite database that backs hamster-applet to
utilize fts3.

Currently amalgalite doesn't enable fts3 at compile time, but I have no problem
turning that feature on and will be happy to build and release a new version of
amalgalite with that feature enabled.

Look for a new release before next week.

https://github.com/copiousfreetime/amalgalite/issues/#issue/10

enjoy,

-jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top