Examples of db_create()


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

    boolean rvalue = false;
    RqlConnection r;
    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      //r.db_create('superheroes').run(conn)
      RqlCursor cursor = r.run(r.db_create("superheroes"));
            r.run(r.db_list());
            r.run(r.db_drop("superheroes")).toString();
      r.close();
    }    
    catch (RqlDriverException e) {
View Full Code Here

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

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

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

    boolean rvalue= false
    RqlConnection r;
    try {
      r = RqlConnection.connect("localhost",PRIMARY_PORT);
      // r.db('test').table_list().run(conn)
      r.run(r.db_create("test123456"));
      r.run(r.db("test123456").table_list());
      r.run(r.db_drop("test123456"));
      r.close();
    }    
    catch (RqlDriverException e) {
View Full Code Here

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

    boolean rvalue = false;
    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();
    }    
View Full Code Here

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

  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

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

    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

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

  @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

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

  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

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

  public void insertAndRetrieveData() 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));
    r.run(r.db(database).table_create(table));
   
    RqlCursor cursor = r.run(r.db(database).table(table).insert( Arrays.asList(       
        new HashMap() {{ put("name","Worf");put("show","Star Trek TNG"); }},
          new HashMap() {{ put("name","Data");put("show","Star Trek TNG"); }},
View Full Code Here

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

  public void insertAndRetrieveSingleRow() 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));
    r.run(r.db(database).table_create(table));
   
    RqlCursor cursor = r.run(r.db(database).table(table).insert( Arrays.asList(       
        new HashMap() {{ put("name","Worf");put("show","Star Trek TNG"); }},
          new HashMap() {{ put("name","Data");put("show","Star Trek TNG"); }},
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.