Codota Logo
SimpleParameterList
Code IndexAdd Codota to your IDE (free)

How to use
SimpleParameterList
in
org.postgresql.core.v2

Best Java code snippets using org.postgresql.core.v2.SimpleParameterList (Showing top 20 results out of 315)

  • Common ways to obtain SimpleParameterList
private void myMethod () {
SimpleParameterList s =
  • Codota IconV2Query v2Query;(SimpleParameterList) v2Query.createParameterList()
  • Codota Iconnew SimpleParameterList(paramCount, useEStringSyntax)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

public ParameterList createParameterList() {
  if (fragments.length == 1)
    return NO_PARAMETERS;
  return new SimpleParameterList(fragments.length - 1, useEStringSyntax);
}
origin: postgresql/postgresql

protected void sendQuery(V2Query query, SimpleParameterList params, String queryPrefix) throws IOException {
  if (logger.logDebug())
    logger.debug(" FE=> Query(\"" + (queryPrefix == null ? "" : queryPrefix) + query.toString(params) + "\")");
  pgStream.SendChar('Q');
  Writer encodingWriter = pgStream.getEncodingWriter();
  if (queryPrefix != null)
    encodingWriter.write(queryPrefix);
  String[] fragments = query.getFragments();
  for (int i = 0 ; i < fragments.length; ++i)
  {
    encodingWriter.write(fragments[i]);
    if (i < params.getParameterCount())
      params.writeV2Value(i + 1, encodingWriter);
  }
  encodingWriter.write(0);
  pgStream.flush();
}
origin: postgresql/postgresql

public void setIntParameter(int index, int value) throws SQLException {
  setLiteralParameter(index, "" + value, Oid.INT4);
}
origin: postgresql/postgresql

void writeV2Value(int index, Writer encodingWriter) throws IOException {
  if (paramValues[index - 1] instanceof StreamWrapper)
  {
    streamBytea((StreamWrapper)paramValues[index - 1], encodingWriter);
  }
  else
  {
    encodingWriter.write((String)paramValues[index - 1]);
  }
}
origin: postgresql/postgresql

  parameters = (SimpleParameterList)query.createParameterList();
parameters.checkAllParametersSet();
origin: org.ancoron.postgresql/org.postgresql

void writeV2Value(int index, Writer encodingWriter) throws IOException {
  if (paramValues[index - 1] instanceof StreamWrapper)
  {
    streamBytea((StreamWrapper)paramValues[index - 1], encodingWriter);
  }
  else
  {
    encodingWriter.write((String)paramValues[index - 1]);
  }
}
origin: org.ancoron.postgresql/org.postgresql.osgi

  parameters = (SimpleParameterList)query.createParameterList();
parameters.checkAllParametersSet();
origin: org.ancoron.postgresql/org.postgresql

protected void sendQuery(V2Query query, SimpleParameterList params, String queryPrefix) throws IOException {
  if (logger.logDebug())
    logger.debug(" FE=> Query(\"" + (queryPrefix == null ? "" : queryPrefix) + query.toString(params) + "\")");
  pgStream.SendChar('Q');
  Writer encodingWriter = pgStream.getEncodingWriter();
  if (queryPrefix != null)
    encodingWriter.write(queryPrefix);
  String[] fragments = query.getFragments();
  for (int i = 0 ; i < fragments.length; ++i)
  {
    encodingWriter.write(fragments[i]);
    if (i < params.getParameterCount())
      params.writeV2Value(i + 1, encodingWriter);
  }
  encodingWriter.write(0);
  pgStream.flush();
}
origin: postgresql/postgresql

public void setStringParameter(int index, String value, int oid) throws SQLException {
  StringBuffer sbuf = new StringBuffer(2 + value.length() * 11 / 10); // Add 10% for escaping.
  if (useEStringSyntax)
    sbuf.append(' ').append('E');
  sbuf.append('\'');
  Utils.appendEscapedLiteral(sbuf, value, false);
  sbuf.append('\'');
  setLiteralParameter(index, sbuf.toString(), oid);
}
origin: postgresql/postgresql

public ParameterList copy() {
  SimpleParameterList newCopy = new SimpleParameterList(paramValues.length, useEStringSyntax);
  System.arraycopy(paramValues, 0, newCopy.paramValues, 0, paramValues.length);
  return newCopy;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

void writeV2Value(int index, Writer encodingWriter) throws IOException {
  if (paramValues[index - 1] instanceof StreamWrapper)
  {
    streamBytea((StreamWrapper)paramValues[index - 1], encodingWriter);
  }
  else
  {
    encodingWriter.write((String)paramValues[index - 1]);
  }
}
origin: org.ancoron.postgresql/org.postgresql

  parameters = (SimpleParameterList)query.createParameterList();
parameters.checkAllParametersSet();
origin: org.ancoron.postgresql/org.postgresql.osgi

protected void sendQuery(V2Query query, SimpleParameterList params, String queryPrefix) throws IOException {
  if (logger.logDebug())
    logger.debug(" FE=> Query(\"" + (queryPrefix == null ? "" : queryPrefix) + query.toString(params) + "\")");
  pgStream.SendChar('Q');
  Writer encodingWriter = pgStream.getEncodingWriter();
  if (queryPrefix != null)
    encodingWriter.write(queryPrefix);
  String[] fragments = query.getFragments();
  for (int i = 0 ; i < fragments.length; ++i)
  {
    encodingWriter.write(fragments[i]);
    if (i < params.getParameterCount())
      params.writeV2Value(i + 1, encodingWriter);
  }
  encodingWriter.write(0);
  pgStream.flush();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public void setIntParameter(int index, int value) throws SQLException {
  setLiteralParameter(index, "" + value, Oid.INT4);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public ParameterList createParameterList() {
  if (fragments.length == 1)
    return NO_PARAMETERS;
  return new SimpleParameterList(fragments.length - 1, useEStringSyntax);
}
origin: org.ancoron.postgresql/org.postgresql

public void setIntParameter(int index, int value) throws SQLException {
  setLiteralParameter(index, "" + value, Oid.INT4);
}
origin: org.ancoron.postgresql/org.postgresql

public ParameterList createParameterList() {
  if (fragments.length == 1)
    return NO_PARAMETERS;
  return new SimpleParameterList(fragments.length - 1, useEStringSyntax);
}
origin: org.ancoron.postgresql/org.postgresql

public void setStringParameter(int index, String value, int oid) throws SQLException {
  StringBuffer sbuf = new StringBuffer(2 + value.length() * 11 / 10); // Add 10% for escaping.
  if (useEStringSyntax)
    sbuf.append(' ').append('E');
  sbuf.append('\'');
  Utils.appendEscapedLiteral(sbuf, value, false);
  sbuf.append('\'');
  setLiteralParameter(index, sbuf.toString(), oid);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public ParameterList copy() {
  SimpleParameterList newCopy = new SimpleParameterList(paramValues.length, useEStringSyntax);
  System.arraycopy(paramValues, 0, newCopy.paramValues, 0, paramValues.length);
  return newCopy;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public void setStringParameter(int index, String value, int oid) throws SQLException {
  StringBuffer sbuf = new StringBuffer(2 + value.length() * 11 / 10); // Add 10% for escaping.
  if (useEStringSyntax)
    sbuf.append(' ').append('E');
  sbuf.append('\'');
  Utils.appendEscapedLiteral(sbuf, value, false);
  sbuf.append('\'');
  setLiteralParameter(index, sbuf.toString(), oid);
}
org.postgresql.core.v2SimpleParameterList

Javadoc

Parameter list for query parameters in the V2 protocol.

Most used methods

  • <init>
  • checkAllParametersSet
  • getParameterCount
  • setLiteralParameter
  • streamBytea
    Send a streamable bytea encoded as a text representation with an arbitary encoding.
  • writeV2Value

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • JList (javax.swing)
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now