INNER CODE UNIT · Java

BusinessDataRepository

righettod/poc-graphql · src/main/java/eu/righettod/graphqlpoc/repository/BusinessDataRepository.java:23

public class BusinessDataRepository {

    private Connection storageConnection;

    /**
     * Constructor in charge of made the DB connection available
     *
     * @throws Exception If DB connection cannot be opened
     */
    public BusinessDataRepository() throws Exception {
        //Load the SQLite driver
        Class.forName("org.sqlite.JDBC");
        File dbLocation = new File("target/poc.db");
        File dbSQLLocation = new File("target/db.sql");
        if(!dbLocation.getParentFile().exists()){
            dbLocation.getParentFile().mkdirs();
        }
        String url = "jdbc:sqlite:" + dbLocation.getAbsolutePath().replace('\\', '/');

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…