use of catdata.fql.decl.SigExp.Const in project fql by CategoricalData.
the class JDBCBridge method gatherSubstInv2.
private static void gatherSubstInv2(FQLProgram prog, Map<String, Set<Map<Object, Object>>> ret, Statement Stmt, String k, InstExp v) throws SQLException {
Const t = v.type(prog).toConst(prog);
for (String n : t.nodes) {
ResultSet RS = Stmt.executeQuery("SELECT c0,c1 FROM " + k + "_" + n + "_subst_inv");
Set<Map<Object, Object>> ms = new HashSet<>();
while (RS.next()) {
Map<Object, Object> m = new HashMap<>();
m.put("c0", RS.getObject("c0").toString());
m.put("c1", RS.getObject("c1").toString());
ms.add(m);
}
RS.close();
ret.put(k + "_" + n + "_subst_inv", ms);
}
}
use of catdata.fql.decl.SigExp.Const in project fql by CategoricalData.
the class JDBCBridge method gatherSubstInv.
private static void gatherSubstInv(FQLProgram prog, Map<String, Set<Map<Object, Object>>> ret, Statement Stmt, String k, InstExp v) throws SQLException {
Const t = v.type(prog).toConst(prog);
for (String n : t.nodes) {
ResultSet RS = Stmt.executeQuery("SELECT c0,c1 FROM " + k + "_" + n + "_subst_inv");
Set<Map<Object, Object>> ms = new HashSet<>();
while (RS.next()) {
Map<Object, Object> m = new HashMap<>();
m.put("c0", Integer.parseInt(RS.getObject("c0").toString()));
m.put("c1", Integer.parseInt(RS.getObject("c1").toString()));
ms.add(m);
}
RS.close();
ret.put(k + "_" + n + "_subst_inv", ms);
}
}
Aggregations