Package com.Acrobot.Breeze.Database

Examples of com.Acrobot.Breeze.Database.Database


        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            ChestShop.getBukkitLogger().severe("You haven't got any SQLite JDBC installed!");
        }

        Database database = new Database("jdbc:sqlite:" + ChestShop.loadFile("items.db").getAbsolutePath());
        yaml = new Yaml(new YamlConstructor(), new YamlRepresenter(), new DumperOptions());

        try {
            Statement statement = database.getConnection().createStatement();
            statement.executeUpdate("PRAGMA user_version = 1"); //We'll be able to change it later if we need to
            statement.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }

        try {
            table = database.getTable("items");
            table.create("id INTEGER PRIMARY KEY, code VARCHAR UNIQUE ON CONFLICT IGNORE");
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of com.Acrobot.Breeze.Database.Database

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.