Package com.splout.db.engine

Examples of com.splout.db.engine.SQLite4JavaClient.query()


    TablespaceSpec tablespace = TablespaceSpec.of(theSchema2, "id", new Path(INPUT), new TupleInputFormat(), 1);
    TablespaceGenerator viewGenerator = new TablespaceGenerator(tablespace, new Path(OUTPUT), this.getClass());
    viewGenerator.generateView(conf, SamplingType.FULL_SCAN, new TupleSampler.RandomSamplingOptions());
   
    SQLite4JavaClient manager = new SQLite4JavaClient(OUTPUT + "/store/0.db", null);
    String results = manager.query("SELECT * FROM schema2;", 100);
    assertTrue(results.contains("null"));

    assertNull(searchRow(results, "id", "id1").get("intValue"));
    assertEquals(-1.0, searchRow(results, "id", "id1").get("doubleValue"));
    assertNull(searchRow(results, "id", "id1").get("strValue"));
View Full Code Here


    TablespaceGenerator viewGenerator = new TablespaceGenerator(builder.build(), new Path(OUTPUT), this.getClass());
    viewGenerator.generateView(conf, SamplingType.FULL_SCAN, new TupleSampler.RandomSamplingOptions());

    SQLite4JavaClient manager = new SQLite4JavaClient(OUTPUT + "/store/0.db", null);
    String results = manager.query("SELECT * FROM schema1;", TUPLES_TO_GENERATE+1);

    System.out.println(results);
    for(int i=0; i<TUPLES_TO_GENERATE; i++) {
      assertEquals("id" + i + "mod", getVal(results, i, "id"));
      assertEquals("str" + i + "mod", getVal(results, i, "value"));
View Full Code Here

    for(int i = 0; i < N_DNODES; i++) {
      File dbData = new File(deployData, i + ".db");
      SQLite4JavaClient manager = new SQLite4JavaClient(dbData + "", null);
      // We create a foo database with one integer and one text
      manager.query("CREATE TABLE " + TABLE + " (iteration INT, dnode INT);", 100);
      // We insert as many values as the ones we defined in the partition map
      manager.query("INSERT INTO " + TABLE + " VALUES (" + iteration + ", " + i + ");", 100);
      manager.close();
    }
View Full Code Here

      File dbData = new File(deployData, i + ".db");
      SQLite4JavaClient manager = new SQLite4JavaClient(dbData + "", null);
      // We create a foo database with one integer and one text
      manager.query("CREATE TABLE " + TABLE + " (iteration INT, dnode INT);", 100);
      // We insert as many values as the ones we defined in the partition map
      manager.query("INSERT INTO " + TABLE + " VALUES (" + iteration + ", " + i + ");", 100);
      manager.close();
    }

    log.info("Deploying deploy iteration [" + iteration + "]");
    client.deploy(TABLESPACE, testTablespace.getPartitionMap(), testTablespace.getReplicationMap(),
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.