Introduce metadata into the pipeline (#397)

This commit is contained in:
JT
2021-12-02 18:59:10 +13:00
committed by GitHub
parent 56307553ae
commit 45eba8b922
28 changed files with 329 additions and 199 deletions

View File

@ -230,10 +230,13 @@ fn from_eml(
);
}
Ok(PipelineData::Value(Value::from(Spanned {
item: collected,
span: head,
})))
Ok(PipelineData::Value(
Value::from(Spanned {
item: collected,
span: head,
}),
None,
))
}
#[cfg(test)]

View File

@ -194,7 +194,7 @@ fn from_ods(
span: head,
};
Ok(PipelineData::Value(record))
Ok(PipelineData::Value(record, None))
}
#[cfg(test)]

View File

@ -67,11 +67,14 @@ fn from_url(input: PipelineData, head: Span, config: &Config) -> Result<Pipeline
vals.push(Value::String { val: v, span: head })
}
Ok(PipelineData::Value(Value::Record {
cols,
vals,
span: head,
}))
Ok(PipelineData::Value(
Value::Record {
cols,
vals,
span: head,
},
None,
))
}
_ => Err(ShellError::UnsupportedInput(
"String not compatible with url-encoding".to_string(),

View File

@ -194,7 +194,7 @@ fn from_xlsx(
span: head,
};
Ok(PipelineData::Value(record))
Ok(PipelineData::Value(record, None))
}
#[cfg(test)]