Search in sources :

Example 1 with SQLBridge

use of org.apache.jena.sdb.store.SQLBridge in project jena by apache.

the class TransformSDB method doBridge.

// See QueryCompilerMain.SqlNodesFinisher.visit(OpExt op)
// Be careful about being done twice.
// XXX SHARE CODE!
private static OpSQL doBridge(SDBRequest request, OpSQL opSQL, List<Var> projectVars, Op original) {
    SqlNode sqlNode = opSQL.getSqlNode();
    SQLBridgeFactory f = request.getStore().getSQLBridgeFactory();
    SQLBridge bridge = f.create(request, sqlNode, projectVars);
    bridge.build();
    sqlNode = bridge.getSqlNode();
    opSQL = new OpSQL(sqlNode, original, request);
    opSQL.setBridge(bridge);
    // New is better?
    opSQL.resetSqlNode(sqlNode);
    return opSQL;
}
Also used : SQLBridgeFactory(org.apache.jena.sdb.store.SQLBridgeFactory) SQLBridge(org.apache.jena.sdb.store.SQLBridge) SqlNode(org.apache.jena.sdb.core.sqlnode.SqlNode)

Aggregations

SqlNode (org.apache.jena.sdb.core.sqlnode.SqlNode)1 SQLBridge (org.apache.jena.sdb.store.SQLBridge)1 SQLBridgeFactory (org.apache.jena.sdb.store.SQLBridgeFactory)1