Tabnine Logo
ReadContext.readRowUsingIndex
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: googleapis/google-cloud-java

@Override
@Nullable
public Struct readRowUsingIndex(String table, String index, Key key, Iterable<String> columns) {
 try {
  session.markUsed();
  return delegate.readRowUsingIndex(table, index, key, columns);
 } finally {
  if (isSingleUse) {
   close();
  }
 }
}
origin: googleapis/google-cloud-java

Struct readRowUsingIndex() {
 // [START read_context_read_index]
 ReadContext readContext = dbClient.singleUse();
 Struct row =
   readContext.readRowUsingIndex(
     "Albums",
     "AlbumsByAlbumId",
     Key.of(1, "Green"),
     Arrays.asList("AlbumId", "AlbumTitle"));
 // [END read_context_read_index]
 return row;
}
origin: googleapis/google-cloud-java

@Test
public void indexPointReadNotFound() {
 Struct row =
   client
     .singleUse(TimestampBound.strong())
     .readRowUsingIndex(TABLE_NAME, INDEX_NAME, Key.of("v999"), ALL_COLUMNS);
 assertThat(row).isNull();
}
origin: googleapis/google-cloud-java

@Test
public void indexPointRead() {
 Struct row =
   client
     .singleUse(TimestampBound.strong())
     .readRowUsingIndex(TABLE_NAME, INDEX_NAME, Key.of("v1"), ALL_COLUMNS);
 assertThat(row).isNotNull();
 assertThat(row.getString(0)).isEqualTo("k1");
 assertThat(row.getString(1)).isEqualTo("v1");
}
origin: spring-cloud/spring-cloud-gcp

@Nullable
@Override
public Struct readRowUsingIndex(
    String s, String s1, Key key, Iterable<String> iterable) {
  return targetTransactionContext.readRowUsingIndex(s, s1, key, iterable);
}
origin: org.springframework.cloud/spring-cloud-gcp-data-spanner

@Nullable
@Override
public Struct readRowUsingIndex(
    String s, String s1, Key key, Iterable<String> iterable) {
  return targetTransactionContext.readRowUsingIndex(s, s1, key, iterable);
}
origin: com.google.cloud/google-cloud-spanner

@Override
@Nullable
public Struct readRowUsingIndex(String table, String index, Key key, Iterable<String> columns) {
 try {
  session.markUsed();
  return delegate.readRowUsingIndex(table, index, key, columns);
 } finally {
  if (isSingleUse) {
   close();
  }
 }
}
com.google.cloud.spannerReadContextreadRowUsingIndex

Javadoc

Reads a single row from a database using an index, returning null if the row does not exist.
 
ReadContext readContext = dbClient.singleUse();

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
  • analyzeQuery
    Analyzes a query and returns query plan and/or query execution statistics information.The query plan
  • close
    Closes this read context and frees up the underlying resources.

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Top Sublime Text plugins
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