aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
m---------database/SQLiteFuzzySearch0
-rw-r--r--database/makefile20
4 files changed, 24 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 0bd72f9..cc2cc17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@ ENV/
# database
database/*.db
database/*.db-journal
+database/*.sqlext
# node / ts
*.js
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..7844f37
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "database/SQLiteFuzzySearch"]
+ path = database/SQLiteFuzzySearch
+ url = https://github.com/igorski89/SQLiteFuzzySearch
diff --git a/database/SQLiteFuzzySearch b/database/SQLiteFuzzySearch
new file mode 160000
+Subproject 8f1d82a7c92a090d1a68b802464486b74f5a0e9
diff --git a/database/makefile b/database/makefile
new file mode 100644
index 0000000..70b89ce
--- /dev/null
+++ b/database/makefile
@@ -0,0 +1,20 @@
+CC=gcc
+FZ=./SQLiteFuzzySearch
+FLAGS=-shared -fPIC -Isqlite3
+
+all: levenshtein damerau_levenshtein metaphone soundex map
+
+levenshtein: $(FZ)/levenshtein.c
+ $(CC) $(FLAGS) -o levenshtein.sqlext $(FZ)/levenshtein.c
+
+damerau_levenshtein: $(FZ)/damerau_levenshtein.c
+ $(CC) $(FLAGS) -o damerau_levenshtein.sqlext $(FZ)/damerau_levenshtein.c
+
+metaphone: $(FZ)/metaphone.c
+ $(CC) $(FLAGS) -o metaphone.sqlext $(FZ)/metaphone.c
+
+soundex: $(FZ)/soundex.c
+ $(CC) $(FLAGS) -o soundex.sqlext $(FZ)/soundex.c
+
+map: $(FZ)/map.c
+ $(CC) $(FLAGS) -o map.sqlext $(FZ)/map.c