[−][src]Function sonnerie::formatted::add_from_stream
pub fn add_from_stream<R: BufRead>(
tx: &mut CreateTx,
db: &DatabaseReader,
format: &str,
input: &mut R,
timestamp_format: Option<&str>,
nocheck: bool
) -> Result<(), WriteFailure>
Read keys from a text stream and insert it into a transaction
Parameters:
tx
- a transaction to write intodb
- the database that is type-checked againstformat
- the format of each row. If each row contains its own format, you can instead useadd_from_stream_with_fmt
.input
- a text stream to read from, the keys are formatted aslabel timestamp value [value ...]
. Whitespace is escaped with a backslash.timestamp
- the strftime-like format to parse timestamps as. IfNone
, use epoch nanos.nocheck
- turns off slow type checking (withdb
).