public static ArrayList<Edge> getEdges(ArrayList<Node> nodes, SQLiteConnection db) {
        ArrayList<Edge> edges = new ArrayList<>();
        try{
            SQLiteStatement st = db.prepare("SELECT * FROM edge");
            while(st.step()){
                Node a = null;
                Node b = null;
                for(Node current: nodes){
                    if(current.id == st.columnInt(1)) a = current;
                    else if(current.id == st.columnInt(2)) b = current;
                }
                edges.add(new Edge(st.columnInt(0), a, b));
            }
        }catch(Exception e){
            e.printStackTrace();
        }
        return edges;
    }