Package com.hp.hpl.jena.sdb.core.sqlnode

Examples of com.hp.hpl.jena.sdb.core.sqlnode.SqlNode


        // Derby does not support DISTINCT on CLOBS
        if ( ! request.DistinctTranslation )
            return super.transform(opDistinct, subOp) ;
       
        OpSQL opSubSQL = (OpSQL)subOp ;
        SqlNode sqlSubOp = opSubSQL.getSqlNode() ;
        SqlNode n = SqlSelectBlock.distinct(request, sqlSubOp) ;
        OpSQL opSQL = new OpSQL(n, opDistinct, request) ;
        // Pull up bridge, if any
        opSQL.setBridge(opSubSQL.getBridge()) ;
        return opSQL ;
    }
View Full Code Here


    // See QueryCompilerMain.SqlNodesFinisher.visit(OpExt op)
    // Be careful about being done twice.
    // XXX SHARE CODE!
    static private 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) ;
View Full Code Here

        // Inner SELECT SQL: (SELECT DISTINCT g FROM Quads)
        TableDescQuads quads = request.getStore().getQuadTableDesc() ;
        SqlTable sqlTableQ = new SqlTable(quads.getTableName()) ;
        sqlTableQ.setIdColumnForVar(v, new SqlColumn(sqlTableQ, quads.getGraphColName())) ;
        SqlNode sqlNodeQ = SqlSelectBlock.distinct(request, sqlTableQ) ;
       
        // Will have the value left join added later.
        return new OpSQL(sqlNodeQ, opDatasetNames, request) ;
    }
View Full Code Here

    }

    public static String toSqlString(OpSQL opSQL,
                                     SDBRequest request)
    {
        SqlNode sqlNode = opSQL.getSqlNode() ;
        String sqlStmt = request.getStore().getSQLGenerator().generateSQL(request, sqlNode) ;
        return sqlStmt ;
    }
View Full Code Here

    }
   
    @Override
    protected void buildValues()
    {
        SqlNode sqlNode = getSqlNode() ;
        for ( Var v : getProject() )
            sqlNode = insertValueGetter(request, sqlNode, v) ;
        setSqlNode(sqlNode) ;
    }
View Full Code Here

        nTable.setValueColumnForVar(var, c2) ;
        // Condition for value: triple table column = node table id/hash
        nTable.addNote("Var: "+var) ;

        SqlExpr cond = new S_Equal(c1, c2) ;
        SqlNode n = SqlBuilder.leftJoin(request, sqlNode, nTable, cond) ;
        return n ;
    }
View Full Code Here

        return ;
    }

    protected SqlNode insertConstantAccesses(Collection<Node> constants)
    {
        SqlNode sqlNode = null ;
        for ( Node n : constants )
        {
            long hash = NodeLayout2.hash(n);
            SqlConstant hashValue = new SqlConstant(hash) ;
View Full Code Here

        @Override
        public Op transform(OpFilter opFilter, Op op)
        {
            if ( ! SDB_QC.isOpSQL(op) )
                return super.transform(opFilter, op) ;
            SqlNode sqlNode = ((OpSQL)op).getSqlNode() ;
            if ( ! sqlNode.isSelectBlock() )
                return super.transform(opFilter, op) ;
           
            SqlSelectBlock ssb = sqlNode.asSelectBlock() ;
           
            ExprList exprs = opFilter.getExprs() ;
            ExprList exprs2 =  new ExprList() ;

            for ( Object obj : exprs.getList() )
View Full Code Here

    }
   
    @Override
    protected void buildValues()
    {
        SqlNode sqlNode = getSqlNode() ;
        for ( Var v : getProject() )
            sqlNode = insertValueGetter(request, sqlNode, v) ;
        setSqlNode(sqlNode) ;
    }
View Full Code Here

        nTable.setValueColumnForVar(var, c2) ;
        // Condition for value: triple table column = node table id/hash
        nTable.addNote("Var: "+var) ;

        SqlExpr cond = new S_Equal(c1, c2) ;
        SqlNode n = SqlBuilder.leftJoin(request, sqlNode, nTable, cond) ;
        return n ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sdb.core.sqlnode.SqlNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.