}
}
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());
}
}