Package org.sqlite

Examples of org.sqlite.SQLiteConfig$PragmaValue


      try
      {
         String strUrlDatabase = "jdbc:sqlite:" + strPathDatabase;
        

         SQLiteConfig config = new SQLiteConfig();
         config.enableLoadExtension(true);


          con = DriverManager.getConnection(
                 strUrlDatabase,
                 config.toProperties());

         stt = con.createStatement();
         stt.executeUpdate("PRAGMA foreign_keys = ON;");
         int intRes = stt.executeUpdate(strCommand);
        
View Full Code Here


    /**
     * Default constructor.
     */
    public SQLiteDataSource() {
        this.config = new SQLiteConfig(); // default configuration
    }
View Full Code Here

    protected CoreConnection(String url, String fileName, Properties prop) throws SQLException
    {
        this.url = url;
        this.fileName = fileName;

        SQLiteConfig config = new SQLiteConfig(prop);
        this.dateClass = config.dateClass;
        this.dateMultiplier = config.dateMultiplier;
        this.dateFormat = new SimpleDateFormat(config.dateStringFormat);
        this.datePrecision = config.datePrecision;
        this.transactionMode = config.getTransactionMode();
        this.openModeFlags = config.getOpenModeFlags();

        open(openModeFlags, config.busyTimeout);

        if (fileName.startsWith("file:") && !fileName.contains("cache="))
        {   // URI cache overrides flags
            db.shared_cache(config.isEnabledSharedCache());
        }
        db.enable_load_extension(config.isEnabledLoadExtension());

        // set pragmas
        config.apply((Connection)this);
    }
View Full Code Here

        dataStore.setDatabaseSchema(null);
        return dataStore;
    }

    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

        dataStore.setDatabaseSchema(null);
        return dataStore;
    }

    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

        /**
         * connect to DB to get counts
         */
        try {
            Class.forName("org.sqlite.JDBC");
            SQLiteConfig config = new SQLiteConfig();
            config.setReadOnly(true);
            config.setSharedCache(true);
            config.setReadUncommited(true);
            conn = DriverManager.getConnection("jdbc:sqlite:" + dbfile, config.toProperties());

           
            ps = conn.prepareStatement("SELECT b.ccs_id_outer AS ccs_id_outer, "
                    + "b.ccs_id_inner AS ccs_id_inner, "
                    + "b.count_yes AS count_yes, "
View Full Code Here

TOP

Related Classes of org.sqlite.SQLiteConfig$PragmaValue

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.