public ParameterList createFastpathParameters(int count) { return new FastpathParameterList(count); }
private void sendFastpathCall(int fnid, FastpathParameterList params) throws IOException { // Send call. int count = params.getParameterCount(); if (logger.logDebug()) logger.debug(" FE=> FastpathCall(fnid=" + fnid + ",paramCount=" + count + ")"); pgStream.SendChar('F'); pgStream.SendChar(0); pgStream.SendInteger4(fnid); pgStream.SendInteger4(count); for (int i = 1; i <= count; ++i) params.writeV2FastpathValue(i, pgStream); pgStream.flush(); }
void writeV2FastpathValue(int index, PGStream pgStream) throws IOException { --index; if (paramValues[index] instanceof StreamWrapper) { StreamWrapper wrapper = (StreamWrapper)paramValues[index]; pgStream.SendInteger4(wrapper.getLength()); copyStream(pgStream, wrapper); } else if (paramValues[index] instanceof byte[]) { byte[] data = (byte[])paramValues[index]; pgStream.SendInteger4(data.length); pgStream.Send(data); } else if (paramValues[index] instanceof String) { byte[] data = pgStream.getEncoding().encode((String)paramValues[index]); pgStream.SendInteger4(data.length); pgStream.Send(data); } else { throw new IllegalArgumentException("don't know how to stream parameter " + index); } }
void writeV2FastpathValue(int index, PGStream pgStream) throws IOException { --index; if (paramValues[index] instanceof StreamWrapper) { StreamWrapper wrapper = (StreamWrapper)paramValues[index]; pgStream.SendInteger4(wrapper.getLength()); copyStream(pgStream, wrapper); } else if (paramValues[index] instanceof byte[]) { byte[] data = (byte[])paramValues[index]; pgStream.SendInteger4(data.length); pgStream.Send(data); } else if (paramValues[index] instanceof String) { byte[] data = pgStream.getEncoding().encode((String)paramValues[index]); pgStream.SendInteger4(data.length); pgStream.Send(data); } else { throw new IllegalArgumentException("don't know how to stream parameter " + index); } }
private void sendFastpathCall(int fnid, FastpathParameterList params) throws IOException { // Send call. int count = params.getParameterCount(); if (logger.logDebug()) logger.debug(" FE=> FastpathCall(fnid=" + fnid + ",paramCount=" + count + ")"); pgStream.SendChar('F'); pgStream.SendChar(0); pgStream.SendInteger4(fnid); pgStream.SendInteger4(count); for (int i = 1; i <= count; ++i) params.writeV2FastpathValue(i, pgStream); pgStream.flush(); }
public ParameterList copy() { FastpathParameterList newCopy = new FastpathParameterList(paramValues.length); System.arraycopy(paramValues, 0, newCopy.paramValues, 0, paramValues.length); return newCopy; }
void writeV2FastpathValue(int index, PGStream pgStream) throws IOException { --index; if (paramValues[index] instanceof StreamWrapper) { StreamWrapper wrapper = (StreamWrapper)paramValues[index]; pgStream.SendInteger4(wrapper.getLength()); copyStream(pgStream, wrapper); } else if (paramValues[index] instanceof byte[]) { byte[] data = (byte[])paramValues[index]; pgStream.SendInteger4(data.length); pgStream.Send(data); } else if (paramValues[index] instanceof String) { byte[] data = pgStream.getEncoding().encode((String)paramValues[index]); pgStream.SendInteger4(data.length); pgStream.Send(data); } else { throw new IllegalArgumentException("don't know how to stream parameter " + index); } }
private void sendFastpathCall(int fnid, FastpathParameterList params) throws IOException { // Send call. int count = params.getParameterCount(); if (logger.logDebug()) logger.debug(" FE=> FastpathCall(fnid=" + fnid + ",paramCount=" + count + ")"); pgStream.SendChar('F'); pgStream.SendChar(0); pgStream.SendInteger4(fnid); pgStream.SendInteger4(count); for (int i = 1; i <= count; ++i) params.writeV2FastpathValue(i, pgStream); pgStream.flush(); }
public ParameterList createFastpathParameters(int count) { return new FastpathParameterList(count); }
public ParameterList createFastpathParameters(int count) { return new FastpathParameterList(count); }
public ParameterList copy() { FastpathParameterList newCopy = new FastpathParameterList(paramValues.length); System.arraycopy(paramValues, 0, newCopy.paramValues, 0, paramValues.length); return newCopy; }
public ParameterList copy() { FastpathParameterList newCopy = new FastpathParameterList(paramValues.length); System.arraycopy(paramValues, 0, newCopy.paramValues, 0, paramValues.length); return newCopy; }