Codota Logo
QueryExecutor.createQueryKey
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain QueryExecutor
private void myMethod () {
QueryExecutor q =
  • Codota IconBaseConnection baseConnection;baseConnection.getQueryExecutor()
  • Codota IconProtocolConnection protocolConnection;protocolConnection.getQueryExecutor()
  • Smart code suggestions by Codota
}
origin: org.postgresql/postgresql

private boolean executeCachedSql(String sql, int flags, String[] columnNames) throws SQLException {
 PreferQueryMode preferQueryMode = connection.getPreferQueryMode();
 // Simple statements should not replace ?, ? with $1, $2
 boolean shouldUseParameterized = false;
 QueryExecutor queryExecutor = connection.getQueryExecutor();
 Object key = queryExecutor
   .createQueryKey(sql, replaceProcessingEnabled, shouldUseParameterized, columnNames);
 CachedQuery cachedQuery;
 boolean shouldCache = preferQueryMode == PreferQueryMode.EXTENDED_CACHE_EVERYTHING;
 if (shouldCache) {
  cachedQuery = queryExecutor.borrowQueryByKey(key);
 } else {
  cachedQuery = queryExecutor.createQueryByKey(key);
 }
 if (wantsGeneratedKeysOnce) {
  SqlCommand sqlCommand = cachedQuery.query.getSqlCommand();
  wantsGeneratedKeysOnce = sqlCommand != null && sqlCommand.isReturningKeywordPresent();
 }
 boolean res;
 try {
  res = executeWithFlags(cachedQuery, flags);
 } finally {
  if (shouldCache) {
   queryExecutor.releaseQuery(cachedQuery);
  }
 }
 return res;
}
org.postgresql.coreQueryExecutorcreateQueryKey

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.
  • fastpathCall
    Invoke a backend function via the fastpath interface.
  • 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
  • borrowQuery,
  • borrowQueryByKey,
  • borrowReturningQuery,
  • close,
  • createQuery,
  • createQueryByKey,
  • getApplicationName,
  • getAutoSave,
  • getBackendPID

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • findViewById (Activity)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JTextField (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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