use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FormatterSimplePGSQL method dropIndexes.
@Override
public void dropIndexes() {
try {
connection().exec("DROP INDEX IF EXISTS PredObj");
connection().exec("DROP INDEX IF EXISTS ObjSubj");
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException dropping indexes for table 'Triples'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FormatterSimpleSAP method dropIndexes.
@Override
public void dropIndexes() {
try {
connection().exec("DROP INDEX IF EXISTS PredObj");
connection().exec("DROP INDEX IF EXISTS ObjSubj");
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException dropping indexes for table 'Triples'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FormatterSimple method dropIndexes.
@Override
public void dropIndexes() {
try {
connection().exec("DROP INDEX PredObj");
connection().exec("DROP INDEX ObjSubj");
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException dropping indexes for table 'Triples'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FormatterSimpleDB2 method dropIndexes.
@Override
public void dropIndexes() {
try {
connection().exec("DROP INDEX " + TableDescSPO.name() + ".SubjPred");
connection().exec("DROP INDEX " + TableDescSPO.name() + ".PredObj");
connection().exec("DROP INDEX " + TableDescSPO.name() + ".ObjSubj");
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException dropping indexes for table 'Triples'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class TupleLoaderOne method entryExists.
protected boolean entryExists(String[] vals) {
String rowValues = whereRow(vals);
String selectTemplate = "SELECT count(*) FROM %s WHERE %s\n";
String sqlStmt = String.format(selectTemplate, getTableName(), rowValues);
ResultSetJDBC rs = null;
try {
rs = connection().execQuery(sqlStmt);
rs.get().next();
int count = rs.get().getInt(1);
if (count > 0) {
log.debug("Duplicate tuple detected: count=" + count + " :: " + vals);
return true;
}
// Otherwise deos not exist
return false;
} catch (SQLException ex) {
throw new SDBExceptionSQL(ex);
} finally {
RS.close(rs);
}
}
Aggregations