Clovertech
› Clovertech Forums › Cloverleaf › sqlite3-regex.so
Hi everyone,
I am guessing this needed to do regex with sqlite. So far I keep getting that sqlite3 is not a column. Does anyone have a suggestion?
db eval “SELECT load_extension (‘sqlite3-regex.so’)”
Hi Rick,
I found I needed to do this command. “db enable_load_extension 1” before calling the load extension. Hope this works for you.
John Mercogliano Sentara Healthcare Hampton Roads, VA
If on Linux and using “load sqlite3-regex.so” do we still need to enable the load option?
Not that I found. You have the ability to create a .sqliterc in the users home directory, I added .load “sqlite3-regex.so” To the file so its there when I need it from the command line.
Can you share the contents of that file?
Would the sqliterc be used by a tcl script?
No, only for the unix command line tool. You will still need to do enable load extension to use regexp in tcl.
As far as the rc file, that one line I listed above is the only statement in the file.
fwiw, in tcl, we use the following to enable regexp within tcl proc:
DBCMD function regexp regexp