daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.sql.*;
  2.  
  3. import SQLite.Callback;
  4. import SQLite.Database;
  5. import SQLite.JDBC2y.JDBCConnection;
  6.  
  7. public class Main {
  8.  
  9.   public static void main( String[] args ) throws Exception {
  10.  
  11.     Class.forName( "SQLite.JDBCDriver");
  12.     Connection cx = DriverManager.getConnection("jdbc:sqlite:/foo");
  13.     JDBCConnection ncx = (JDBCConnection) cx;
  14.     Database db = ncx.getSQLiteDatabase();
  15.  
  16.     //String s = new String( "libspatialite.so");
  17.  
  18.     Callback cb = new Callback(){
  19.  
  20.             public void columns(String[] arg0) {
  21.             }
  22.  
  23.             public boolean newrow(String[] arg0) {
  24.  
  25.        return false;
  26.             }
  27.  
  28.             public void types(String[] arg0) {
  29.             }
  30.  
  31.         };
  32.  
  33.     db.exec("SELECT load_extension('libspatialite.so')",cb);
  34.     db.exec("SELECT InitSpatialMetaData()",cb);
  35.   }
  36.  
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top