public void AddResult(Document res) { WriteCsvHeaderIfNeeded(res); foreach (var property in _properties) { var o = new BlittablePath(property).Evaluate(res.Data, false); _csvWriter.WriteField(o?.ToString()); } _csvWriter.NextRecord(); }
public override void AddResult(BlittableJsonReaderObject res) { WriteCsvHeaderIfNeeded(res, false); foreach (var(_, path) in GetProperties()) { var o = new BlittablePath(path).Evaluate(res); GetCsvWriter().WriteField(o?.ToString()); } GetCsvWriter().NextRecord(); }
public override async ValueTask AddResultAsync(BlittableJsonReaderObject res, CancellationToken token) { WriteCsvHeaderIfNeeded(res, false); foreach (var(_, path) in GetProperties()) { var o = new BlittablePath(path).Evaluate(res); GetCsvWriter().WriteField(o?.ToString()); } await GetCsvWriter().NextRecordAsync(); }
public void AddResult(Document res) { WriteCsvHeaderIfNeeded(res); foreach (var property in _properties) { if (property.Length == 3 && property.Equals(Constants.Documents.Metadata.Id)) { _csvWriter.WriteField(res.Id); } else { var o = new BlittablePath(property).Evaluate(res.Data, false); _csvWriter.WriteField(o?.ToString()); } } _csvWriter.NextRecord(); }
public override void AddResult(Document res) { WriteCsvHeaderIfNeeded(res.Data); foreach ((var property, var path) in GetProperties()) { if (Constants.Documents.Metadata.Id == property) { GetCsvWriter().WriteField(res.Id); } else { var o = new BlittablePath(path).Evaluate(res.Data, false); GetCsvWriter().WriteField(o?.ToString()); } } GetCsvWriter().NextRecord(); }
public override void AddResult(Document res) { // add @id property if res.Id != null, res.Id is null in map-reduce index WriteCsvHeaderIfNeeded(res.Data, res.Id != null); foreach (var(property, path) in GetProperties()) { if (Constants.Documents.Metadata.Id == property) { GetCsvWriter().WriteField(res.Id.ToString()); } else { var o = new BlittablePath(path).Evaluate(res.Data); GetCsvWriter().WriteField(o?.ToString()); } } GetCsvWriter().NextRecord(); }