summaryrefslogtreecommitdiff
path: root/src/lib/create_table
diff options
context:
space:
mode:
authorLouie Shprung <lshprung@scu.edu>2023-06-09 11:26:54 -0700
committerLouie Shprung <lshprung@scu.edu>2023-06-09 11:26:54 -0700
commita4784bbacc356d381ff833e1c181b75c30f776c6 (patch)
tree431af41591d4407546548f2f01c76b0bc5af5bd7 /src/lib/create_table
parente397123c70d2ad564753f8aad1e1ac82276234f0 (diff)
Clean up, base more on dash-docset-template, dumb down entry types for name-index (consider all of these directives)
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);"
+}
+