According to an answer to another question, in sqlite the Levenshtein distance is implemented in a SQL function called editdist3
. (Compare also the documentation)
Now when I try to use it, all I get is an error that it doesn’t exist:
╰┄┄> sqlite3
SQLite version 3.11.1 2016-03-03 16:17:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE test (col1 TEXT);
sqlite> INSERT INTO test VALUES ('foobar');
sqlite> SELECT * FROM test WHERE editdist3(col1, 'f00bar') < 3;
Error: no such function: editdist3
I’m using sqlite-3.11.1 on Gentoo Linux with (default) USE flags icu
, readline
and secure-delete
.
fatal error: sqlite3ext.h: No such file or directory
: which library should I install first?apt-get install unzip build-essentials
of course, but what else? I've searchedlibsqlite
but there are dozains of such packages. Thanks in advance @Brachypterous – Bayer