OSDN Git Service

confirmed the feature enable_load_extension works correctly
authorleo <leo@ae02f08e-27ec-0310-ae8c-8ba02fe2eafd>
Thu, 9 Apr 2009 00:22:29 +0000 (00:22 +0000)
committerleo <leo@ae02f08e-27ec-0310-ae8c-8ba02fe2eafd>
Thu, 9 Apr 2009 00:22:29 +0000 (00:22 +0000)
git-svn-id: http://www.xerial.org/svn/project/XerialJ/trunk/sqlite-jdbc@3183 ae02f08e-27ec-0310-ae8c-8ba02fe2eafd

ef.dll [new file with mode: 0644]
extension-function.dll [new file with mode: 0644]
src/test/java/org/sqlite/JDBCTest.java

diff --git a/ef.dll b/ef.dll
new file mode 100644 (file)
index 0000000..1168cda
Binary files /dev/null and b/ef.dll differ
diff --git a/extension-function.dll b/extension-function.dll
new file mode 100644 (file)
index 0000000..749383b
Binary files /dev/null and b/extension-function.dll differ
index 1d04ccf..fffd38c 100644 (file)
@@ -11,10 +11,12 @@ package org.sqlite;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
+import java.sql.ResultSet;
 import java.sql.Statement;
 import java.util.Properties;
 
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class JDBCTest
@@ -25,8 +27,9 @@ public class JDBCTest
         Class.forName("org.sqlite.JDBC");
     }
 
+    @Ignore
     @Test
-    public void enableLoadExtensionTest() throws Exception
+    public void enableLoadExtensionTestForWin() throws Exception
     {
         Properties prop = new Properties();
         prop.setProperty("enable_load_extension", "true");
@@ -36,7 +39,10 @@ public class JDBCTest
         {
             conn = DriverManager.getConnection("jdbc:sqlite:", prop);
             Statement stat = conn.createStatement();
-            stat.executeQuery("select load_extension('')");
+            stat.executeQuery("select load_extension('extension-function.dll')");
+
+            ResultSet rs = stat.executeQuery("select sqrt(4)");
+            System.out.println(rs.getDouble(1));
 
         }
         finally