Package com.dkhenry.RethinkDB

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


    RqlConnection r;
    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      // r.db('test').table_drop('dc_universe').run(conn)
      r.run(r.db_create("test1234567"));
      r.run(r.db("test1234567").table_create("dc_universe"));
      r.run(r.db("test1234567").table_drop("dc_universe"));
      r.run(r.db_drop("test1234567"));
      r.close();
    }    
    catch (RqlDriverException e) {
View Full Code Here


    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      // r.db('test').table_drop('dc_universe').run(conn)
      r.run(r.db_create("test1234567"));
      r.run(r.db("test1234567").table_create("dc_universe"));
      r.run(r.db("test1234567").table_drop("dc_universe"));
      r.run(r.db_drop("test1234567"));
      r.close();
    }    
    catch (RqlDriverException e) {
      e.printStackTrace();
View Full Code Here

      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      // r.db('test').table_drop('dc_universe').run(conn)
      r.run(r.db_create("test1234567"));
      r.run(r.db("test1234567").table_create("dc_universe"));
      r.run(r.db("test1234567").table_drop("dc_universe"));
      r.run(r.db_drop("test1234567"));
      r.close();
    }    
    catch (RqlDriverException e) {
      e.printStackTrace();
      rvalue = true;
View Full Code Here

  public void testTable() {
    boolean rvalue = false;
    RqlConnection r;
    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      r.run(r.db_create("test12345678"));
      r.run(r.db("test12345678").table_create("dc_universe"));
      r.table("dc_universe");
      r.run(r.db("test12345678").table_drop("dc_universe"));
      r.run(r.db_drop("test12345678"));
      r.close();
View Full Code Here

    boolean rvalue = false;
    RqlConnection r;
    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      r.run(r.db_create("test12345678"));
      r.run(r.db("test12345678").table_create("dc_universe"));
      r.table("dc_universe");
      r.run(r.db("test12345678").table_drop("dc_universe"));
      r.run(r.db_drop("test12345678"));
      r.close();
    }    
View Full Code Here

    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      r.run(r.db_create("test12345678"));
      r.run(r.db("test12345678").table_create("dc_universe"));
      r.table("dc_universe");
      r.run(r.db("test12345678").table_drop("dc_universe"));
      r.run(r.db_drop("test12345678"));
      r.close();
    }    
    catch (RqlDriverException e) {
      e.printStackTrace();
View Full Code Here

      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      r.run(r.db_create("test12345678"));
      r.run(r.db("test12345678").table_create("dc_universe"));
      r.table("dc_universe");
      r.run(r.db("test12345678").table_drop("dc_universe"));
      r.run(r.db_drop("test12345678"));
      r.close();
    }    
    catch (RqlDriverException e) {
      e.printStackTrace();
      rvalue = true;
View Full Code Here

    public void insertNullAsValueParamater() 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);
        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(database).table_create(table));
View Full Code Here

        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(database).table_create(table));
        obj = cursor.next();

        assert Double.valueOf(1.0).equals(obj.getAs("created")) : "Table was not created successfully";
        cursor = r.run(r.db(database).table(table).insert( Arrays.asList(
                new HashMap() {{
View Full Code Here

        cursor = r.run(r.db(database).table_create(table));
        obj = cursor.next();

        assert Double.valueOf(1.0).equals(obj.getAs("created")) : "Table was not created successfully";
        cursor = r.run(r.db(database).table(table).insert( Arrays.asList(
                new HashMap() {{
                    put("TestForNullInsert", null);
                }}
        )));
        assert Double.valueOf(1.0).equals(cursor.next().getAs("inserted")) : "Error inserting null value into Database";
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.