Package com.dkhenry.RethinkDB.errors

Examples of com.dkhenry.RethinkDB.errors.RqlDriverException


  public void close() throws RqlDriverException {
    if( _connected ) {
      try {
        _sc.close();
      } catch (IOException ex) {
        throw new RqlDriverException(ex.getMessage());       
      }
      _connected = false;
    }
  }
View Full Code Here


            }
        }
    try {
      send_raw(q.build().toByteArray());
    } catch (IOException ex) {
      throw new RqlDriverException(ex.getMessage());
    }
    Response rsp = get();

    // For this version we only support success :-(
    switch(rsp.getType()) {
    case SUCCESS_ATOM:
    case SUCCESS_SEQUENCE:
    case SUCCESS_PARTIAL:
      return new RqlCursor(this,rsp);
    case CLIENT_ERROR:
    case COMPILE_ERROR:
    case RUNTIME_ERROR:
    default:
      throw new RqlDriverException(rsp.toString());             
    }             
  }
View Full Code Here

 
  public Response get() throws RqlDriverException {
    try {
      return recv_raw();
    } catch (IOException ex) {
      throw new RqlDriverException(ex.getMessage());
    }
  }
View Full Code Here

          .setToken(token);
    try {
      send_raw(q.build().toByteArray());
      return recv_raw();
    } catch (IOException ex) {
      throw new RqlDriverException(ex.getMessage());
    }
  }
View Full Code Here

            if( _secured ) {
                ByteBuffer response = ByteBuffer.allocate(4096);
                _sc.read(response);
                String s = new String(response.array(), "UTF-8");
                if(s.equals("SUCCESS")) {
                    throw new RqlDriverException(s);
                }
            }

      _connected = true;
    } catch (IOException ex) {
      throw new RqlDriverException(ex.getMessage());       
    }

  }
View Full Code Here

        for(com.rethinkdb.Ql2.Datum.AssocPair ap :d.getRObjectList()) {
          m.put(ap.getKey(),deconstruct(ap.getVal()));
        }
        return m;
      default:
        throw new RqlDriverException("Unknown Datum Type " + d.getType().toString() + " presented for Deconstruction") ;
      }
    }
View Full Code Here

TOP

Related Classes of com.dkhenry.RethinkDB.errors.RqlDriverException

Copyright © 2018 www.massapicom. 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.