summaryrefslogtreecommitdiff
path: root/src/lib/create_table
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-10-18 18:08:59 -0400
committerLouie S <louie@example.com>2023-10-18 18:08:59 -0400
commitb21d0424ad6bf3cec141abe7e1bb624744c12fc6 (patch)
tree82e2fd408075ba531431a183d9b3435b1699d170 /src/lib/create_table
parent857c316881e6fede7dfe12daf2eecec539e0179c (diff)
Rewrite to base off template; index more terms
Diffstat (limited to 'src/lib/create_table')
-rw-r--r--src/lib/create_table7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/create_table b/src/lib/create_table
new file mode 100644
index 0000000..a783c50
--- /dev/null
+++ b/src/lib/create_table
@@ -0,0 +1,7 @@
+create_table() {
+ DB_PATH="$1"
+
+ sqlite3 "$DB_PATH" "CREATE TABLE IF NOT EXISTS searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);"
+ sqlite3 "$DB_PATH" "CREATE UNIQUE INDEX IF NOT EXISTS anchor ON searchIndex (name, type, path);"
+}
+