use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FmtLayout2HashH2 method formatTableNodes.
@Override
protected void formatTableNodes() {
String tname = TableDescNodes.name();
dropTable(tname);
try {
connection().exec(sqlStr("CREATE TABLE " + tname + " (", " hash BIGINT NOT NULL,", " lex CLOB NOT NULL,", " lang varchar NOT NULL default E'',", " datatype varchar(" + TableDescNodes.DatatypeUriLength + ") NOT NULL default '',", " type integer NOT NULL default E'0',", " PRIMARY KEY (hash)", ")"));
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException formatting table '" + TableDescNodes.name() + "'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FmtLayout2HashPGSQL method formatTablePrefixes.
@Override
protected void formatTablePrefixes() {
String tname = TablePrefixes.name();
dropTable(tname);
try {
connection().exec(sqlStr("CREATE TABLE " + tname + " (", " prefix VARCHAR(" + TablePrefixes.prefixColWidth + ") NOT NULL ,", " uri VARCHAR(" + TablePrefixes.uriColWidth + ") NOT NULL ,", " CONSTRAINT " + tname + "_PK PRIMARY KEY (prefix)", ")"));
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException resetting table '" + TablePrefixes.name() + "'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FormatterSimpleSQLServer method dropIndexes.
@Override
public void dropIndexes() {
try {
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 FmtLayout2HashPGSQL method formatTableTriples.
@Override
protected void formatTableTriples() {
String tname = TableDescTriples.name();
dropTable(tname);
try {
connection().exec(sqlStr("CREATE TABLE " + tname + " (", " s BIGINT NOT NULL,", " p BIGINT NOT NULL,", " o BIGINT NOT NULL,", " PRIMARY KEY (s, p, o)", ")"));
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException formatting table '" + TableDescTriples.name() + "'", ex);
}
}
use of org.apache.jena.sdb.sql.SDBExceptionSQL in project jena by apache.
the class FmtLayout2HashPGSQL method formatTableNodes.
@Override
protected void formatTableNodes() {
String tname = TableDescNodes.name();
dropTable(tname);
try {
connection().exec(sqlStr("CREATE TABLE " + tname + " (", " hash BIGINT NOT NULL,", " lex TEXT NOT NULL,", " lang varchar NOT NULL default E'',", " datatype varchar(" + TableDescNodes.DatatypeUriLength + ") NOT NULL default '',", " type integer NOT NULL default E'0',", " PRIMARY KEY (hash)", ")"));
} catch (SQLException ex) {
throw new SDBExceptionSQL("SQLException formatting table '" + TableDescNodes.name() + "'", ex);
}
}
Aggregations