Tabnine Logo
Struct.getDoubleArray
Code IndexAdd Tabnine to your IDE (free)

How to use
getDoubleArray
method
in
com.google.cloud.spanner.Struct

Best Java code snippets using com.google.cloud.spanner.Struct.getDoubleArray (Showing top 9 results out of 315)

origin: googleapis/google-cloud-java

@Override
public double[] getDoubleArray(int columnIndex) {
 return getCurrentRowAsStruct().getDoubleArray(columnIndex);
}
origin: googleapis/google-cloud-java

@Override
public double[] getDoubleArray(String columnName) {
 return getCurrentRowAsStruct().getDoubleArray(columnName);
}
origin: googleapis/google-cloud-java

@Test
public void writeFloat64ArrayNoNulls() {
 write(baseInsert().set("Float64ArrayValue").toFloat64Array(Arrays.asList(1.0, 2.0)).build());
 Struct row = readLastRow("Float64ArrayValue");
 assertThat(row.isNull(0)).isFalse();
 assertThat(row.getDoubleArray(0).length).isEqualTo(2);
 assertThat(row.getDoubleArray(0)[0]).isWithin(0.0).of(1.0);
 assertThat(row.getDoubleArray(0)[1]).isWithin(0.0).of(2.0);
}
origin: googleapis/google-cloud-java

@Test
public void writeFloat64Array() {
 write(
   baseInsert()
     .set("Float64ArrayValue")
     .toFloat64Array(Arrays.asList(null, 1.0, 2.0))
     .build());
 Struct row = readLastRow("Float64ArrayValue");
 assertThat(row.isNull(0)).isFalse();
 assertThat(row.getDoubleList(0)).containsExactly(null, 1.0, 2.0).inOrder();
 expectedException.expect(NullPointerException.class);
 row.getDoubleArray(0);
}
origin: googleapis/google-cloud-java

 return Value.bytesArray(value.getBytesList(fieldIndex));
case FLOAT64:
 return Value.float64Array(value.getDoubleArray(fieldIndex));
case DATE:
 return Value.dateArray(value.getDateList(fieldIndex));
origin: com.google.cloud/google-cloud-spanner

@Override
public double[] getDoubleArray(String columnName) {
 return getCurrentRowAsStruct().getDoubleArray(columnName);
}
origin: com.google.cloud/google-cloud-spanner

@Override
public double[] getDoubleArray(int columnIndex) {
 return getCurrentRowAsStruct().getDoubleArray(columnIndex);
}
origin: GoogleCloudPlatform/DataflowTemplates

 return GSON.toJson(currentRow.getLongArray(columnName));
case FLOAT64:
 return GSON.toJson(currentRow.getDoubleArray(columnName));
case STRING:
 return GSON.toJson(currentRow.getStringList(columnName));
origin: com.google.cloud/google-cloud-spanner

 return Value.bytesArray(value.getBytesList(fieldIndex));
case FLOAT64:
 return Value.float64Array(value.getDoubleArray(fieldIndex));
case DATE:
 return Value.dateArray(value.getDateList(fieldIndex));
com.google.cloud.spannerStructgetDoubleArray

Popular methods of Struct

  • getString
  • getLong
  • getColumnType
  • isNull
  • getBoolean
  • getBytes
  • getType
  • newBuilder
    Returns a builder for creating a non- NULL Struct instance.
  • getBooleanArray
  • getBooleanList
  • getBytesList
  • getColumnCount
  • getBytesList,
  • getColumnCount,
  • getDate,
  • getDateList,
  • getDouble,
  • getDoubleList,
  • getLongArray,
  • getLongList,
  • getStringList

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
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