@Test public void testSpannerRowMetadataRetrieval() { ResultSetMetadata resultSetMetadata = buildResultSetMetadata( TypeCode.INT64, TypeCode.STRING, TypeCode.BOOL); SpannerRowMetadata metadata = new SpannerRowMetadata(resultSetMetadata); ColumnMetadata column1 = metadata.getColumnMetadata("column_1"); assertThat(column1.getNativeTypeMetadata()) .isEqualTo(Type.newBuilder().setCode(TypeCode.STRING).build()); ColumnMetadata column0 = metadata.getColumnMetadata(0); assertThat(column0.getName()).isEqualTo("column_0"); assertThat(column0.getNativeTypeMetadata()).isEqualTo( Type.newBuilder().setCode(TypeCode.INT64).build()); }
@Override public ColumnMetadata getColumnMetadata(int index) { return this.columnMetadatas.get(index); }
SpannerRowMetadata implements RowMetadata { @Override public ColumnMetadata getColumnMetadata(int index) { return this.columnMetadatas.get(index); } }
SpannerRowMetadata implements RowMetadata { @Override public ColumnMetadata getColumnMetadata(int index) { return this.columnMetadatas.get(index); } SpannerRowMetadata(ResultSetMetadata resultSetMetadata); }
SpannerRowMetadata implements RowMetadata { @Override public ColumnMetadata getColumnMetadata(int index) { return this.columnMetadatas.get(index); } SpannerRowMetadata(ResultSetMetadata resultSetMetadata); @Override ColumnMetadata getColumnMetadata(int index); @Override ColumnMetadata getColumnMetadata(String identifier); @Override Iterable<? extends ColumnMetadata> getColumnMetadatas(); @Override Collection<String> getColumnNames(); }
SpannerRowMetadata implements RowMetadata { @Override public ColumnMetadata getColumnMetadata(int index) { return this.columnMetadatas.get(index); } SpannerRowMetadata(ResultSetMetadata resultSetMetadata); @Override ColumnMetadata getColumnMetadata(int index); @Override ColumnMetadata getColumnMetadata(String identifier); @Override Iterable<? extends ColumnMetadata> getColumnMetadatas(); @Override Collection<String> getColumnNames();  }