Package org.spatialite

Examples of org.spatialite.SQLiteConfig


        Connection connection = null;
        Throwable thrown = null;

        try {
            Class.forName("org.spatialite.JDBC");
            SQLiteConfig config = new SQLiteConfig();
            config.enableSpatiaLite(true);
            connection = DriverManager.getConnection("jdbc:spatialite::memory:",
                    config.toProperties());
            Statement statement = connection.createStatement();
            statement.execute("SELECT InitSpatialMetaData();");
        } catch (SQLException e) {
            thrown = e;
            thrown.printStackTrace();
View Full Code Here


       
        return dataSource;
    }
   
    static void addConnectionProperties(BasicDataSource dataSource) {
        SQLiteConfig config = new SQLiteConfig();
        config.setSharedCache(true);
        config.enableLoadExtension(true);
        config.enableSpatiaLite(true);
       
        for (Map.Entry e : config.toProperties().entrySet()) {
            dataSource.addConnectionProperty((String)e.getKey(), (String)e.getValue());
        }
    }
View Full Code Here

TOP

Related Classes of org.spatialite.SQLiteConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.