From fc508d169860d149af32acd64c6a7eab0440c1a6 Mon Sep 17 00:00:00 2001
From: ac <andrew.r.cohen@drexel.edu>
Date: Thu, 8 Aug 2024 14:41:32 -0400
Subject: [PATCH] addsqlitetopath

---
 src/MATLAB/AddSQLiteToPath.m | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 src/MATLAB/AddSQLiteToPath.m

diff --git a/src/MATLAB/AddSQLiteToPath.m b/src/MATLAB/AddSQLiteToPath.m
new file mode 100644
index 0000000..9f696ff
--- /dev/null
+++ b/src/MATLAB/AddSQLiteToPath.m
@@ -0,0 +1,26 @@
+function AddSQLiteToPath()
+    %CHECKJARPATH Summary of this function goes here
+    %   Detailed explanation goes here
+    
+    if isdeployed()
+        return
+    end
+    %% ensure that the sqlite jar file is on the path
+    dynamicPaths = javaclasspath('-dynamic');
+    bfIsLoaded = false;
+    if (~isempty(dynamicPaths))
+        for i=1:length(dynamicPaths)
+            [~,name,~] = fileparts(dynamicPaths{i});
+            if (strcmpi('sqlite-jdbc-3.21.0',name))
+                bfIsLoaded = true;
+                break
+            end
+        end
+    end
+
+    if (~bfIsLoaded)
+        curPath = mfilename('fullpath');
+        [pathstr,~,~] = fileparts(curPath);
+        javaaddpath(fullfile(pathstr,'sqlite-jdbc-3.21.0.jar'),'-end');
+    end
+end
\ No newline at end of file
-- 
GitLab