Codota Logo
Struct.getTimestamp
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain Struct
private void myMethod () {
Struct s =
  • Codota IconResultSet resultSet;resultSet.getCurrentRowAsStruct()
  • Smart code suggestions by Codota
}
origin: googleapis/google-cloud-java

@Override
public Timestamp getTimestamp(String columnName) {
 return getCurrentRowAsStruct().getTimestamp(columnName);
}
origin: googleapis/google-cloud-java

 return Value.date(value.getDate(fieldIndex));
case TIMESTAMP:
 return Value.timestamp(value.getTimestamp(fieldIndex));
case STRUCT:
 return Value.struct(value.getStruct(fieldIndex));
origin: GoogleCloudPlatform/DataflowTemplates

 builder.set(field, nullValue ? null : row.getString(fieldName));
} else if (spannerType.equals("TIMESTAMP")) {
 builder.set(field, nullValue ? null : row.getTimestamp(fieldName).toString());
} else if (spannerType.equals("DATE")) {
 builder.set(field, nullValue ? null : row.getDate(fieldName).toString());
origin: googleapis/google-cloud-java

@Override
public Timestamp getTimestamp(int columnIndex) {
 return getCurrentRowAsStruct().getTimestamp(columnIndex);
}
origin: com.google.cloud/google-cloud-spanner

 return Value.date(value.getDate(fieldIndex));
case TIMESTAMP:
 return Value.timestamp(value.getTimestamp(fieldIndex));
case STRUCT:
 return Value.struct(value.getStruct(fieldIndex));
origin: googleapis/google-cloud-java

@Test
public void bindTimestamp() {
 Timestamp t = Timestamp.parseTimestamp("2016-09-18T00:00:00Z");
 Struct row = execute(Statement.newBuilder("SELECT @v").bind("v").to(t), Type.timestamp());
 assertThat(row.isNull(0)).isFalse();
 assertThat(row.getTimestamp(0)).isEqualTo(t);
}
origin: googleapis/google-cloud-java

@Test
public void writeCommitTimestamp() {
 Timestamp commitTimestamp =
   write(baseInsert().set("TimestampValue").to(Value.COMMIT_TIMESTAMP).build());
 Struct row = readLastRow("TimestampValue");
 assertThat(row.getTimestamp(0)).isEqualTo(commitTimestamp);
}
origin: googleapis/google-cloud-java

@Test
public void writeTimestamp() {
 Timestamp timestamp = Timestamp.parseTimestamp("2016-09-15T00:00:00.111111Z");
 write(baseInsert().set("TimestampValue").to(timestamp).build());
 Struct row = readLastRow("TimestampValue");
 assertThat(row.isNull(0)).isFalse();
 assertThat(row.getTimestamp(0)).isEqualTo(timestamp);
}
origin: com.google.cloud/google-cloud-spanner

@Override
public Timestamp getTimestamp(int columnIndex) {
 return getCurrentRowAsStruct().getTimestamp(columnIndex);
}
origin: com.google.cloud/google-cloud-spanner

@Override
public Timestamp getTimestamp(String columnName) {
 return getCurrentRowAsStruct().getTimestamp(columnName);
}
origin: GoogleCloudPlatform/DataflowTemplates

case TIMESTAMP:
 return nullSafeColumnParser(
   (currentRow, columnName) -> currentRow.getTimestamp(columnName).toString());
case ARRAY:
 return nullSafeColumnParser(SpannerConverters::parseArrayValue);
com.google.cloud.spannerStructgetTimestamp

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,
  • getDoubleArray,
  • getDoubleList,
  • getLongArray,
  • getLongList,
  • getStringList

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JFileChooser (javax.swing)
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