Tabnine Logo
QueryExecutor.fastpathCall
Code IndexAdd Tabnine to your IDE (free)

How to use
fastpathCall
method
in
org.postgresql.core.QueryExecutor

Best Java code snippets using org.postgresql.core.QueryExecutor.fastpathCall (Showing top 4 results out of 315)

origin: org.postgresql/postgresql

/**
 * Send a function call to the PostgreSQL backend.
 *
 * @param fnId Function id
 * @param args FastpathArguments to pass to fastpath
 * @return null if no data, byte[] otherwise
 * @throws SQLException if a database-access error occurs.
 */
public byte[] fastpath(int fnId, FastpathArg[] args) throws SQLException {
 // Turn fastpath array into a parameter list.
 ParameterList params = executor.createFastpathParameters(args.length);
 for (int i = 0; i < args.length; ++i) {
  args[i].populateParameter(params, i + 1);
 }
 // Run it.
 return executor.fastpathCall(fnId, params, connection.getAutoCommit());
}
origin: postgresql/postgresql

/**
 * Send a function call to the PostgreSQL backend
 *
 * @param fnId Function id
 * @param resultType True if the result is an integer, false for other results
 * @param args FastpathArguments to pass to fastpath
 * @return null if no data, Integer if an integer result, or byte[] otherwise
 * @exception SQLException if a database-access error occurs.
 */
public Object fastpath(int fnId, boolean resultType, FastpathArg[] args) throws SQLException
{
  // Turn fastpath array into a parameter list.
  ParameterList params = executor.createFastpathParameters(args.length);
  for (int i = 0; i < args.length; ++i)
  {
    args[i].populateParameter(params, i + 1);
  }
  // Run it.
  byte[] returnValue = executor.fastpathCall(fnId, params, connection.getAutoCommit());
  // Interpret results.
  if (!resultType || returnValue == null)
    return returnValue;
  if (returnValue.length != 4)
    throw new PSQLException(GT.tr("Fastpath call {0} - No result was returned and we expected an integer.", new Integer(fnId)),
                PSQLState.NO_DATA);
  return new Integer((returnValue[3] & 255) |
            ((returnValue[2] & 255) << 8) |
            ((returnValue[1] & 255) << 16) |
            ((returnValue[0] & 255) << 24));
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Send a function call to the PostgreSQL backend
 *
 * @param fnId Function id
 * @param resultType True if the result is an integer, false for other results
 * @param args FastpathArguments to pass to fastpath
 * @return null if no data, Integer if an integer result, or byte[] otherwise
 * @exception SQLException if a database-access error occurs.
 */
public Object fastpath(int fnId, boolean resultType, FastpathArg[] args) throws SQLException
{
  // Turn fastpath array into a parameter list.
  ParameterList params = executor.createFastpathParameters(args.length);
  for (int i = 0; i < args.length; ++i)
  {
    args[i].populateParameter(params, i + 1);
  }
  // Run it.
  byte[] returnValue = executor.fastpathCall(fnId, params, connection.getAutoCommit());
  // Interpret results.
  if (!resultType || returnValue == null)
    return returnValue;
  if (returnValue.length != 4)
    throw new PSQLException(GT.tr("Fastpath call {0} - No result was returned and we expected an integer.", new Integer(fnId)),
                PSQLState.NO_DATA);
  return new Integer((returnValue[3] & 255) |
            ((returnValue[2] & 255) << 8) |
            ((returnValue[1] & 255) << 16) |
            ((returnValue[0] & 255) << 24));
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Send a function call to the PostgreSQL backend
 *
 * @param fnId Function id
 * @param resultType True if the result is an integer, false for other results
 * @param args FastpathArguments to pass to fastpath
 * @return null if no data, Integer if an integer result, or byte[] otherwise
 * @exception SQLException if a database-access error occurs.
 */
public Object fastpath(int fnId, boolean resultType, FastpathArg[] args) throws SQLException
{
  // Turn fastpath array into a parameter list.
  ParameterList params = executor.createFastpathParameters(args.length);
  for (int i = 0; i < args.length; ++i)
  {
    args[i].populateParameter(params, i + 1);
  }
  // Run it.
  byte[] returnValue = executor.fastpathCall(fnId, params, connection.getAutoCommit());
  // Interpret results.
  if (!resultType || returnValue == null)
    return returnValue;
  if (returnValue.length != 4)
    throw new PSQLException(GT.tr("Fastpath call {0} - No result was returned and we expected an integer.", new Integer(fnId)),
                PSQLState.NO_DATA);
  return new Integer((returnValue[3] & 255) |
            ((returnValue[2] & 255) << 8) |
            ((returnValue[1] & 255) << 16) |
            ((returnValue[0] & 255) << 24));
}
org.postgresql.coreQueryExecutorfastpathCall

Javadoc

Invoke a backend function via the fastpath interface.

Popular methods of QueryExecutor

  • createFastpathParameters
    Create a new ParameterList implementation suitable for invoking a fastpath function via #fastpathCal
  • createSimpleQuery
    Create an unparameterized Query object suitable for execution by this QueryExecutor. The provided qu
  • execute
    Execute several Query, passing results to a provided ResultHandler.
  • fetch
    Fetch additional rows from a cursor.
  • processNotifies
    Prior to attempting to retrieve notifications, we need to pull any recently received notifications o
  • startCopy
    Issues a COPY FROM STDIN / COPY TO STDOUT statement and returns handler for associated operation. Un
  • createParameterizedQuery
    Create a parameterized Query object suitable for execution by this QueryExecutor. The provided query
  • abort
    Abort at network level without sending the Terminate message to the backend.
  • borrowCallableQuery
  • borrowQuery
  • borrowQueryByKey
  • borrowReturningQuery
  • borrowQueryByKey,
  • borrowReturningQuery,
  • close,
  • createQuery,
  • createQueryByKey,
  • createQueryKey,
  • getApplicationName,
  • getAutoSave,
  • getBackendPID

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ImageIO (javax.imageio)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now