Пример #1
0
 internal Task <ResultSetMetadata> PopulateMetadataAsync(CancellationToken cancellationToken)
 {
     if (_metadata != null)
     {
         return(Task.FromResult(_metadata));
     }
     return(ExecuteHelper.WithErrorTranslationAndProfiling(
                async()
                => _metadata ?? (_metadata = await _resultSet.GetMetadataAsync(cancellationToken)
                                             .ConfigureAwait(false)), "SpannerDataReader.GetMetadata", Logger));
 }
Пример #2
0
 /// <inheritdoc />
 public override string GetName(int i) => _resultSet.GetMetadataAsync(CancellationToken.None)
     .ResultWithUnwrappedExceptions().RowType.Fields[i]
     .Name;