Package org.molgenis.framework.db

Examples of org.molgenis.framework.db.Database.sql()


    when(tuple0.getString("Name")).thenReturn("Netherlands");

    Database db = mock(Database.class);
    String query = "SELECT Name, Continent FROM Country";
    QueryRule queryRule = new QueryRule("Code", Operator.EQUALS, "NLD");
    when(db.sql(query, queryRule)).thenReturn(Arrays.asList(tuple0));
    when(db.sql("SELECT COUNT(*) FROM Country", queryRule)).thenReturn(Arrays.asList(tuple0));

    TupleTable jdbcTable = new JdbcTable(db, query, Arrays.asList(queryRule));
    try
    {
View Full Code Here


    Database db = mock(Database.class);
    String query = "SELECT Name, Continent FROM Country";
    QueryRule queryRule = new QueryRule("Code", Operator.EQUALS, "NLD");
    when(db.sql(query, queryRule)).thenReturn(Arrays.asList(tuple0));
    when(db.sql("SELECT COUNT(*) FROM Country", queryRule)).thenReturn(Arrays.asList(tuple0));

    TupleTable jdbcTable = new JdbcTable(db, query, Arrays.asList(queryRule));
    try
    {
      // check columns
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.