Examples of QueryExecution


Examples of com.hp.hpl.jena.query.QueryExecution

    catch ( RuntimeException ex ) {
      log.warn("_addProps: entityUri=[" +entityUri+ "] queryStr=[" +queryStr+ "]", ex);
      throw ex;
    }
   
    QueryExecution qe = QueryExecutionFactory.create(query, ontModel);
   
    ResultSet results = qe.execSelect();
   
    while ( results.hasNext() ) {
      QuerySolution sol = results.nextSolution();
      Iterator<?> varNames = sol.varNames();
     
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution

    if ( mappings == null ) {
      mappings = new ArrayList<Mapping>();
    }
   
    Query query = QueryFactory.create(SKOS_QUERY);
    QueryExecution qe = QueryExecutionFactory.create(query, ontModel);
   
    ResultSet results = qe.execSelect();
   
    while ( results.hasNext() ) {
     
      QuerySolution sol = results.nextSolution();
     
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 = 100");
        test.assertRowCount(1);
    }
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 = 102");
        test.assertRowCount(1);
     
    }   
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);     

        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 >= 100");
        test.assertRowCount(10);
        test.execute("select * from g2 where e1 >= 100");
        test.assertRowCount(10);       
     
    }
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e2 = '500'");
        test.assertRowCount(1);
        test.closeConnection();
       
        test = new QueryExecution(userTxn.getSource("pm2"));
        test.execute("select * from g1 where e2 = '500'");
        test.assertRowCount(1);
    }
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e2 = '501'");
        test.assertRowCount(1);
       
        test = new QueryExecution(userTxn.getSource("pm2"));
        test.execute("select * from g1 where e2 = '501'");
        test.assertRowCount(1);
    }   
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 >= 100 and e1 < 112");
        test.assertRowCount(12);
       
        test = new QueryExecution(userTxn.getSource("pm2"));
        test.execute("select * from g1 where e1 >= 100 and e1 < 112");
        test.assertRowCount(12);
        test.execute("select * from g2 where e1 >= 100 and e1 < 112");
        test.assertRowCount(12);       
    }   
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 = 500");
        test.assertRowCount(1);
       
        test = new QueryExecution(userTxn.getSource("pm2"));
        test.execute("select * from g1 where e1 = 500");
        test.assertRowCount(1);
     
    }   
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution

       
        // run test
        getTransactionContainter().runTransaction(userTxn);     

        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1")) {
      protected boolean compareCaseSensitive() {
    return false;
      }
        };
        test.execute("select * from g1 where e1 >= 100 and e1 < 115");
        test.assertRowCount(15);
        test.execute("select * from g2 where e1 >= 100 and e1 < 115");
        test.assertRowCount(15);
        test.execute("select distinct e2 from g1 where e1 > 100");
       
        // NOTE:  if this is an oracle source, it failes because it return varchar2
        if (userTxn.getSource("pm1").getMetaData().getDatabaseProductName().toLowerCase().indexOf("oracle") > -1) {
            test.assertResultsSetEquals(new String[] {"e2[varchar2]", "blah"});
        } else {
            test.assertResultsSetEquals(new String[] {"e2[varchar]", "blah"});
        }
    
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.