147148149150151152153
protected void exec(String sqlStmt) { try { connection().exec(sqlStmt) ; } catch (SQLException ex) { throw new SDBExceptionSQL(ex) ; } }
155156157158159160161162
private SqlConstant ensureNode(Node node) { try { return insertNode(node) ; } catch (SQLException ex){ throw new SDBExceptionSQL("PatternTableLoader.prepareNode", ex) ; } }
164165166167168169170171
private SqlConstant refNode(Node node) { try { return getRefForNode(node) ; } catch (SQLException ex){ throw new SDBExceptionSQL("PatternTableLoader.getRefForNode", ex) ; } }
57585960616263
" o BIGINT NOT NULL", ")" )) ; connection().exec(sqlStr("ALTER TABLE "+tname+" ADD PRIMARY KEY (s, p, o)")) ; } catch (SQLException ex) { throw new SDBExceptionSQL("SQLException formatting table '"+TableDescTriples.name()+"'",ex) ; } }
76777879808182
" o BIGINT NOT NULL", ")" )) ; connection().exec(sqlStr("ALTER TABLE "+tname+" ADD PRIMARY KEY (g, s, p, o)")) ; } catch (SQLException ex) { throw new SDBExceptionSQL("SQLException formatting table '"+TableDescTriples.name()+"'",ex) ; } }
102103104105106107108109
")" )) ; connection().exec(sqlStr ("ALTER TABLE "+tname+" ADD PRIMARY KEY (hash)")) ; } catch (SQLException ex) { throw new SDBExceptionSQL("SQLException formatting table '"+TableDescNodes.name()+"'",ex) ; } }
121122123124125126127128
")" )) ; connection().exec(sqlStr("ALTER TABLE "+tname+" ADD CONSTRAINT "+tname+"_PK PRIMARY KEY (prefix)")) ; } catch (SQLException ex) { throw new SDBExceptionSQL("SQLException resetting table '"+TablePrefixes.name()+"'",ex) ; } }
180181182183184185186187188189190
{ hasNext = jdbcResultSet.get().next() ; } catch (SQLException ex) { closeIterator() ; throw new SDBExceptionSQL(ex) ; } ready = true ; } return hasNext ; }
143144145146147148149150151152153
String v = rs.getString("uri") ; // Load in-memory copy. super.set(p, v) ; } } catch (SQLException ex) { throw new SDBExceptionSQL("Failed to get prefixes", ex) ; } finally { RS.close(rsx) ; } }
171172173174175176177178
log.warn("Multiple prefix mappings for '"+prefix+"'") ; break ; } return uri ; } catch (SQLException ex) { throw new SDBExceptionSQL(format("Failed to read prefix (%s)", prefix), ex) ; } finally { RS.close(rsx) ; } }