nushell/crates/nu-command/src
Devyn Cairns 7de513a4e0
Implement streaming I/O for CSV and TSV commands (#12918)
# Description

Implements streaming for:

- `from csv`
- `from tsv`
- `to csv`
- `to tsv`

via the new string-typed ByteStream support.

# User-Facing Changes
Commands above. Also:

- `to csv` and `to tsv` now have `--columns <List(String)>`, to provide
the exact columns desired in the output. This is required for them to
have streaming output, because otherwise collecting the entire list is
necessary to determine the output columns. If we introduce
`TableStream`, this may become less necessary.

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting
- [ ] release notes

---------

Co-authored-by: Ian Manske <ian.manske@pm.me>
2024-05-22 16:55:24 +00:00
..
bytes Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
charting Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
conversions Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
database Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
date Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
debug Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
env Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
experimental Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filesystem Take owned Read and Write (#12909) 2024-05-20 15:10:36 +02:00
filters Take owned Read and Write (#12909) 2024-05-20 15:10:36 +02:00
formats Implement streaming I/O for CSV and TSV commands (#12918) 2024-05-22 16:55:24 +00:00
generators Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
hash Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
help Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
math Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
misc Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00
network Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
path Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
platform Add Span merging functions (#12511) 2024-05-16 22:34:49 +00:00
random Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
removed Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
shells Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
stor Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
strings Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
system Add support for the ps command on FreeBSD, NetBSD, and OpenBSD (#12892) 2024-05-22 08:13:45 -07:00
viewers Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
default_context.rs Add support for the ps command on FreeBSD, NetBSD, and OpenBSD (#12892) 2024-05-22 08:13:45 -07:00
example_test.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
lib.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
progress_bar.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
sort_utils.rs Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00