Examples of enableSpatiaLite()


Examples of org.spatialite.SQLiteConfig.enableSpatiaLite()

        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) {
View Full Code Here

Examples of org.spatialite.SQLiteConfig.enableSpatiaLite()

   
    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
Copyright © 2018 www.massapi.com. 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.