Package com.dkhenry.RethinkDB

Examples of com.dkhenry.RethinkDB.RqlConnection.run()


                    put("TestForNullInsert", null);
                }}
        )));
        assert Double.valueOf(1.0).equals(cursor.next().getAs("inserted")) : "Error inserting null value into Database";

        cursor = r.run(r.db(database).table(table).get_all("TestForNullInsert"));
        obj = cursor.next();
        assert obj.getAs("TestForNullInsert") == null : "Error Getting null value out of database";

        cursor = r.run(r.db(database).table_drop(table));
        assert Double.valueOf(1.0).equals(cursor.next().getAs("dropped")) : "Table was not dropped successfully ";
View Full Code Here


        cursor = r.run(r.db(database).table(table).get_all("TestForNullInsert"));
        obj = cursor.next();
        assert obj.getAs("TestForNullInsert") == null : "Error Getting null value out of database";

        cursor = r.run(r.db(database).table_drop(table));
        assert Double.valueOf(1.0).equals(cursor.next().getAs("dropped")) : "Table was not dropped successfully ";

        r.run(r.db_drop(database));
        r.close();
    }
View Full Code Here

        assert obj.getAs("TestForNullInsert") == null : "Error Getting null value out of database";

        cursor = r.run(r.db(database).table_drop(table));
        assert Double.valueOf(1.0).equals(cursor.next().getAs("dropped")) : "Table was not dropped successfully ";

        r.run(r.db_drop(database));
        r.close();
    }
}
View Full Code Here

  @Test(groups={"acceptance"})
  public void createAndListDb() throws RqlDriverException {    
    SecureRandom random = new SecureRandom();
    String database = new BigInteger(130, random).toString(32);
    RqlConnection r = RqlConnection.connect("localhost",28015);
    RqlCursor cursor = r.run(r.db_create(database));
    RqlObject obj = cursor.next();         
    assert Double.valueOf(1.0).equals(obj.getAs("created")) : "Database was not created successfully ";
    cursor = r.run(r.db_list());
    obj = cursor.next();
    boolean found = false;
View Full Code Here

    String database = new BigInteger(130, random).toString(32);
    RqlConnection r = RqlConnection.connect("localhost",28015);
    RqlCursor cursor = r.run(r.db_create(database));
    RqlObject obj = cursor.next();         
    assert Double.valueOf(1.0).equals(obj.getAs("created")) : "Database was not created successfully ";
    cursor = r.run(r.db_list());
    obj = cursor.next();
    boolean found = false;
    for(Object o: obj.getList()) {
      if( database.equals(o)) {
        found = true;
View Full Code Here

        found = true;
        break;
      }       
    }
    assert found == true : "Database was not able to be listed";
    cursor = r.run(r.db_drop(database));
    obj = cursor.next();
    assert Double.valueOf(1.0).equals(obj.getAs("dropped")) : "Database was not dropped successfully ";
    r.close();
  }
View Full Code Here

  public void createAndListTable() throws RqlDriverException {
    SecureRandom random = new SecureRandom();
    String database = new BigInteger(130, random).toString(32);
    String table = new BigInteger(130, random).toString(32);
    RqlConnection r = RqlConnection.connect("localhost",28015);
    r.run(r.db_create(database));
    RqlCursor cursor = r.run(r.db(database).table_create(table));
    assert Double.valueOf(1.0).equals(cursor.next().getAs("created")) : "Table was not created successfully ";   
    cursor = r.run(r.db(database).table_list());
    boolean found = false;
    for(Object o: cursor.next().getList()) {
View Full Code Here

    SecureRandom random = new SecureRandom();
    String database = new BigInteger(130, random).toString(32);
    String table = new BigInteger(130, random).toString(32);
    RqlConnection r = RqlConnection.connect("localhost",28015);
    r.run(r.db_create(database));
    RqlCursor cursor = r.run(r.db(database).table_create(table));
    assert Double.valueOf(1.0).equals(cursor.next().getAs("created")) : "Table was not created successfully ";   
    cursor = r.run(r.db(database).table_list());
    boolean found = false;
    for(Object o: cursor.next().getList()) {
      if(table.equals(o)) {
View Full Code Here

    String table = new BigInteger(130, random).toString(32);
    RqlConnection r = RqlConnection.connect("localhost",28015);
    r.run(r.db_create(database));
    RqlCursor cursor = r.run(r.db(database).table_create(table));
    assert Double.valueOf(1.0).equals(cursor.next().getAs("created")) : "Table was not created successfully ";   
    cursor = r.run(r.db(database).table_list());
    boolean found = false;
    for(Object o: cursor.next().getList()) {
      if(table.equals(o)) {
        found = true;
        break;
View Full Code Here

        found = true;
        break;
      }
    }
    assert found == true : "Table was not able to be listed";
    cursor = r.run(r.db(database).table_drop(table));
    assert Double.valueOf(1.0).equals(cursor.next().getAs("dropped")) : "Table was not dropped successfully ";   
    r.run(r.db_drop(database));
    r.close();
  }
 
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.