protected RequestMessage createRequestMessage(String[] commands, boolean isBatchedCommand, ResultsMode resultsMode) { RequestMessage reqMessage = new RequestMessage(); reqMessage.setCommands(commands); reqMessage.setBatchedUpdate(isBatchedCommand); reqMessage.setResultsMode(resultsMode); return reqMessage; }
@Override public T get(int index) { rangeCheck(index, false); return (T) elementData[index]; }
@Override public boolean addAll(Collection<? extends T> c) { return addAll(size, c); }
private ResultsMessage exampleMessage(List<Object>[] results, String[] columnNames, String[] datatypes) { RequestMessage request = new RequestMessage(); request.setExecutionId(REQUEST_ID); ResultsMessage resultsMsg = new ResultsMessage(); resultsMsg.setResults(results); resultsMsg.setColumnNames(columnNames); resultsMsg.setDataTypes(datatypes); resultsMsg.setFinalRow(results.length); resultsMsg.setLastRow(results.length); resultsMsg.setFirstRow(1); return resultsMsg; }
public RequestMessage exampleRequestMessage(String sql) { RequestMessage msg = new RequestMessage(sql); msg.setCursorType(ResultSet.TYPE_SCROLL_INSENSITIVE); msg.setFetchSize(10); msg.setPartialResults(false); msg.setExecutionId(100); msg.setExecutionId(id++); return msg; }
public static void writeBatch(ObjectOutput out, String[] types, List<? extends List<?>> batch) throws IOException { writeBatch(out, types, batch, CURRENT_VERSION); }
public void readColumn(ObjectInput in, int col, List<List<Object>> batch, byte[] isNull, List<Object> cache, byte version) throws IOException, ClassNotFoundException { readIsNullData(in, isNull); for (int i = 0; i < batch.size(); i++) { if (!isNullObject(isNull, i)) { batch.get(i).set(col, DataTypeManager.getCanonicalValue(readObject(in, cache, version))); } } }
private boolean isForwardOnly() { return this.cid == null && requestMsg.getCursorType() == ResultSet.TYPE_FORWARD_ONLY; }
public void writeColumn(ObjectOutput out, int col, List<? extends List<?>> batch, Map<Object, Integer> cache, byte version) throws IOException { writeIsNullData(out, col, batch); Object obj = null; for (int i = 0; i < batch.size(); i++) { obj = batch.get(i).get(col); if (obj != null) { writeObject(out, obj, cache, version); } } }
public RequestMessage(String command) { this(); setCommands(command); }
protected RequestMessage createRequestMessage(String[] commands, boolean isBatchedCommand, ResultsMode resultsMode) { RequestMessage reqMessage = new RequestMessage(); reqMessage.setCommands(commands); reqMessage.setBatchedUpdate(isBatchedCommand); reqMessage.setResultsMode(resultsMode); return reqMessage; }
public static void writeBatch(ObjectOutput out, String[] types, List<? extends List<?>> batch) throws IOException { writeBatch(out, types, batch, CURRENT_VERSION); }
private boolean isForwardOnly() { return this.cid == null && requestMsg.getCursorType() == ResultSet.TYPE_FORWARD_ONLY; }
public void writeColumn(ObjectOutput out, int col, List<? extends List<?>> batch, Map<Object, Integer> cache, byte version) throws IOException { writeIsNullData(out, col, batch); Object obj = null; for (int i = 0; i < batch.size(); i++) { obj = batch.get(i).get(col); if (obj != null) { writeObject(out, obj, cache, version); } } }
public T set(int index, T element) { rangeCheck(index, false); T old = (T) elementData[index]; elementData[index] = element; return old; }
@Override public boolean addAll(Collection<? extends T> c) { return addAll(size, c); }
public RequestMessage(String command) { this(); setCommands(command); }
private boolean isForwardOnly() { return this.cid == null && requestMsg.getCursorType() == ResultSet.TYPE_FORWARD_ONLY; }
@Override public T get(int index) { rangeCheck(index, false); return (T) elementData[index]; }
public T set(int index, T element) { rangeCheck(index, false); T old = (T) elementData[index]; elementData[index] = element; return old; }