package io.github.programminglife2016.pl1_2016.parser.metadata;

/**
 * Created by ravishivam on 8-5-16.
 */
public class MetaDatabase {
}

@@ -62,78 +62,1208 @@
 a;%0A%0A
-/**%0A * Created by ravishivam on 8-5-16.%0A */%0Apublic class MetaDatabase %7B
+import java.sql.Connection;%0Aimport java.sql.DriverManager;%0Aimport java.sql.SQLException;%0A%0A/**%0A * Created by ravishivam on 8-5-16.%0A */%0Apublic class MetaDatabase %7B%0A%0A    private static final String DATABASE_DRIVER = %22org.postgresql.Driver%22;%0A%0A    private static final String HOST = %22jdbc:postgresql://127.0.0.1:5432/PL1%22;%0A%0A    private static final String ROLL = %22postgres%22;%0A%0A    private static final String PASSWORD = %22visual%22;%0A%0A    private Connection connection;%0A%0A    public MetaDatabase() %7B%0A        connectDatabase();%0A    %7D%0A%0A    /**%0A     * Sets up the driver and creates a connection with database with given host and rolls.%0A     */%0A    private void connectDatabase() %7B%0A        try %7B%0A            Class.forName(DATABASE_DRIVER);%0A        %7D catch (ClassNotFoundException e) %7B%0A            System.out.println(%22Driver not included in dependencies. Update Maven!%22);%0A            e.printStackTrace();%0A        %7D%0A        Connection connection = null;%0A        try %7B%0A            connection = DriverManager.getConnection(HOST, ROLL, PASSWORD);%0A        %7D catch (SQLException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        this.connection = connection;%0A    %7D%0A%0A    public static void main(String%5B%5D argv) %7B%0A    %7D
 %0A%7D%0A

Create connection with database