Codota Logo
ParameterList.toString
Code IndexAdd Codota to your IDE (free)

How to use
toString
method
in
org.postgresql.core.ParameterList

Best Java code snippets using org.postgresql.core.ParameterList.toString (Showing top 8 results out of 315)

  • Common ways to obtain ParameterList
private void myMethod () {
ParameterList p =
  • Codota IconSimpleParameterList[] subparams;new CompositeParameterList(subparams, offsets)
  • Codota IconQueryExecutor queryExecutor;queryExecutor.createFastpathParameters(count)
  • Codota Iconnew FastpathParameterList(paramCount)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

public String toString(ParameterList parameters) {
  StringBuffer sbuf = new StringBuffer(fragments[0]);
  for (int i = 1; i < fragments.length; ++i)
  {
    if (parameters == null)
      sbuf.append('?');
    else
      sbuf.append(parameters.toString(i));
    sbuf.append(fragments[i]);
  }
  return sbuf.toString();
}
origin: postgresql/postgresql

public String toString(ParameterList parameters) {
  StringBuffer sbuf = new StringBuffer(fragments[0]);
  for (int i = 1; i < fragments.length; ++i)
  {
    if (parameters == null)
      sbuf.append("?");
    else
      sbuf.append(parameters.toString(i));
    sbuf.append(fragments[i]);
  }
  return sbuf.toString();
}
origin: org.postgresql/postgresql

/**
 * Stringize this query to a human-readable form, substituting particular parameter values for
 * parameter placeholders.
 *
 * @param parameters a ParameterList returned by this Query's {@link Query#createParameterList}
 *        method, or {@code null} to leave the parameter placeholders unsubstituted.
 * @return a human-readable representation of this query
 */
public String toString(ParameterList parameters) {
 if (bindPositions.length == 0) {
  return nativeSql;
 }
 int queryLength = nativeSql.length();
 String[] params = new String[bindPositions.length];
 for (int i = 1; i <= bindPositions.length; ++i) {
  String param = parameters == null ? "?" : parameters.toString(i, true);
  params[i - 1] = param;
  queryLength += param.length() - bindName(i).length();
 }
 StringBuilder sbuf = new StringBuilder(queryLength);
 sbuf.append(nativeSql, 0, bindPositions[0]);
 for (int i = 1; i <= bindPositions.length; ++i) {
  sbuf.append(params[i - 1]);
  int nextBind = i < bindPositions.length ? bindPositions[i] : nativeSql.length();
  sbuf.append(nativeSql, bindPositions[i - 1] + bindName(i).length(), nextBind);
 }
 return sbuf.toString();
}
origin: org.postgresql/postgresql

 NativeQuery.appendBindName(s, pos++);
} else {
 s.append(params.toString(pos++, true));
origin: org.ancoron.postgresql/org.postgresql

public String toString(ParameterList parameters) {
  StringBuffer sbuf = new StringBuffer(fragments[0]);
  for (int i = 1; i < fragments.length; ++i)
  {
    if (parameters == null)
      sbuf.append("?");
    else
      sbuf.append(parameters.toString(i));
    sbuf.append(fragments[i]);
  }
  return sbuf.toString();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public String toString(ParameterList parameters) {
  StringBuffer sbuf = new StringBuffer(fragments[0]);
  for (int i = 1; i < fragments.length; ++i)
  {
    if (parameters == null)
      sbuf.append("?");
    else
      sbuf.append(parameters.toString(i));
    sbuf.append(fragments[i]);
  }
  return sbuf.toString();
}
origin: org.ancoron.postgresql/org.postgresql

public String toString(ParameterList parameters) {
  StringBuffer sbuf = new StringBuffer(fragments[0]);
  for (int i = 1; i < fragments.length; ++i)
  {
    if (parameters == null)
      sbuf.append('?');
    else
      sbuf.append(parameters.toString(i));
    sbuf.append(fragments[i]);
  }
  return sbuf.toString();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public String toString(ParameterList parameters) {
  StringBuffer sbuf = new StringBuffer(fragments[0]);
  for (int i = 1; i < fragments.length; ++i)
  {
    if (parameters == null)
      sbuf.append('?');
    else
      sbuf.append(parameters.toString(i));
    sbuf.append(fragments[i]);
  }
  return sbuf.toString();
}
org.postgresql.coreParameterListtoString

Javadoc

Return a human-readable representation of a particular parameter in this ParameterList. If the parameter is not bound, returns "?".

Popular methods of ParameterList

  • clear
    Unbind all parameter values bound in this list.
  • copy
    Perform a shallow copy of this ParameterList, returning a new instance (still suitable for passing t
  • getInParameterCount
    Get the number of IN parameters in this list.
  • getOutParameterCount
    Get the number of OUT parameters in this list.
  • getParameterCount
    Get the number of parameters in this list. This value never changes for a particular instance, and m
  • getTypeOIDs
    Return the oids of the parameters in this list. May be null for a ParameterList that does not suppor
  • registerOutParameter
  • setBytea
    Binds a binary bytea value stored as a bytearray to a parameter. The parameter's type is implicitly
  • setLiteralParameter
    Binds a String value that is an unquoted literal to the server's query parser (for example, a bare i
  • setNull
    Binds a SQL NULL value to a parameter. Associated with the parameter is a typename for the parameter
  • setStringParameter
    Binds a String value that needs to be quoted for the server's parser to understand (for example, a t
  • appendAll
    Use this operation to append more parameters to the current list.
  • setStringParameter,
  • appendAll,
  • setBinaryParameter,
  • setText

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
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