congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ReadContext.analyzeQuery
Code IndexAdd Tabnine 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)

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

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Path (java.nio.file)
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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