Codota Logo
ReadContext.analyzeQuery
Code IndexAdd Codota to your IDE (free)

How to use
analyzeQuery
method
in
com.google.cloud.spanner.ReadContext

Best Java code snippets using com.google.cloud.spanner.ReadContext.analyzeQuery (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: googleapis/google-cloud-java

/**
 * Analyzes the query in {@code context}. {@code statement.analyzeQuery(context, queryMode)} is
 * exactly equivalent to {@code context.analyzeQuery(statement, queryMode)}.
 *
 * @see ReadContext#analyzeQuery(Statement, com.google.cloud.spanner.ReadContext.QueryAnalyzeMode)
 */
public ResultSet analyzeQuery(ReadContext context, QueryAnalyzeMode queryMode) {
 return context.analyzeQuery(this, queryMode);
}
origin: googleapis/google-cloud-java

@Override
public ResultSet analyzeQuery(Statement statement, QueryAnalyzeMode queryMode) {
 return wrap(delegate.analyzeQuery(statement, queryMode));
}
origin: googleapis/google-cloud-java

 ResultSetStats analyzeQuery() {
  // [START read_context_analyze_query]
  ReadContext rc = dbClient.singleUse();
  ResultSet resultSet =
    rc.analyzeQuery(
      Statement.of("SELECT SingerId, AlbumId, MarketingBudget FROM Albums"),
      ReadContext.QueryAnalyzeMode.PROFILE);
  while (resultSet.next()) {
   // Discard the results. We're only processing because getStats() below requires it.
   resultSet.getCurrentRowAsStruct();
  }
  ResultSetStats stats = resultSet.getStats();
  // [END read_context_analyze_query]
  return stats;
 }
}
origin: com.google.cloud/google-cloud-spanner

/**
 * Analyzes the query in {@code context}. {@code statement.analyzeQuery(context, queryMode)} is
 * exactly equivalent to {@code context.analyzeQuery(statement, queryMode)}.
 *
 * @see ReadContext#analyzeQuery(Statement, com.google.cloud.spanner.ReadContext.QueryAnalyzeMode)
 */
public ResultSet analyzeQuery(ReadContext context, QueryAnalyzeMode queryMode) {
 return context.analyzeQuery(this, queryMode);
}
origin: spring-cloud/spring-cloud-gcp

@Override
public ResultSet analyzeQuery(Statement statement, QueryAnalyzeMode queryAnalyzeMode) {
  return targetTransactionContext.analyzeQuery(statement, queryAnalyzeMode);
}
origin: org.springframework.cloud/spring-cloud-gcp-data-spanner

@Override
public ResultSet analyzeQuery(Statement statement, QueryAnalyzeMode queryAnalyzeMode) {
  return targetTransactionContext.analyzeQuery(statement, queryAnalyzeMode);
}
origin: com.google.cloud/google-cloud-spanner

@Override
public ResultSet analyzeQuery(Statement statement, QueryAnalyzeMode queryMode) {
 return wrap(delegate.analyzeQuery(statement, queryMode));
}
com.google.cloud.spannerReadContextanalyzeQuery

Javadoc

Analyzes a query and returns query plan and/or query execution statistics information.

The query plan and query statistics information is contained in com.google.spanner.v1.ResultSetStats that can be accessed by calling ResultSet#getStats() on the returned ResultSet.

 
ReadContext rc = dbClient.singleUse();ResultSetStats stats = resultSet.getStats(); 
}

Popular methods of ReadContext

  • executeQuery
    Executes a query against the database.Implementations may or may not block in the initial executeQue
  • read
    Reads zero or more rows from a database.Implementations may or may not block in the initial read(...
  • readRow
    Reads a single row from a database, returning null if the row does not exist. ReadContext readConte
  • readUsingIndex
    Reads zero or more rows from a database using an index.Implementations may or may not block in the i
  • readRowUsingIndex
    Reads a single row from a database using an index, returning null if the row does not exist. ReadCo
  • close
    Closes this read context and frees up the underlying resources.

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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