nushell/crates/nu-command/src
Stefan Holderbach b2734db015
Move more commands to opaque Record type (#11122)
# Description

Further work towards the goal that we can make `Record`'s field private
and experiment with different internal representations

## Details
- Use inplace record iter in `nu-command/math/utils`
  - Guarantee that existing allocation can be reused
- Use proper record iterators in `path join`
- Remove unnecesary hashmap in `path join`
  - Should minimally reduce the overhead
- Unzip records in `nu-command`
- Refactor `query web` plugin to use record APIs
- Use `Record::into_values` for `values` command
- Use `Record::columns()` in `join` instead.
  - Potential minor pessimisation
  - Not the hot value path
- Use sane `Record` iters in example `Debug` impl
- Avoid layout assumption in `nu-cmd-extra/roll/mod`
  - Potential minor pessimisation
- relegated to `extra`, changing the representation may otherwise break
this op.
- Use record api in `rotate`
- Minor risk that this surfaces some existing invalid behavior as panics
as we now validate column/value lengths
  - `extra` so things are unstable
- Remove unnecessary references in `rotate`
  - Bonus cleanup
# User-Facing Changes
None functional, minor potential differences in runtime. You win some,
you lose some.

# Tests + Formatting
Relying on existing tests
2023-11-22 23:48:48 +01:00
..
bytes Convert ShellError::UnsupportedInput to named fields (#10971) 2023-11-07 23:25:32 +01:00
charting Use Vec for Closure captures (#10940) 2023-11-08 00:43:28 +01:00
conversions into binary -c: return 0 as single byte (#11068) 2023-11-16 04:09:31 -06:00
database Implement Display for CellPath (#11023) 2023-11-10 21:12:51 +01:00
date Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
debug Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
env Convert FileNotFoundCustom to named fields (#11123) 2023-11-21 17:30:21 -06:00
experimental Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
filesystem Convert FileNotFoundCustom to named fields (#11123) 2023-11-21 17:30:21 -06:00
filters Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
formats Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
generators remove the unfold command (#10773) 2023-11-17 06:50:20 +08:00
hash Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
help Convert ShellError::AliasNotFound to named fields (#11118) 2023-11-21 16:24:08 +08:00
math Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
misc Add long options for misc and network (#10753) 2023-10-19 18:16:44 +02:00
network Convert ShellError::NetworkFailure to named fields (#11093) 2023-11-19 21:32:11 +01:00
path Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00
platform Add is-terminal to determine if stdin/out/err are a terminal (#10970) 2023-11-21 20:48:39 -06:00
random Add long options for platform and random (#10776) 2023-10-19 22:04:33 +02:00
removed Rename misused "deprecation" to removal (#10000) 2023-08-15 07:17:31 +12:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings remove size command in favor of str stats (#10784) 2023-11-17 06:49:19 +08:00
system Convert FileNotFound to named fields (#11120) 2023-11-21 17:08:10 +08:00
viewers optimize/clean up a few of the table changes (#11076) 2023-11-16 11:37:46 -06:00
default_context.rs Add is-terminal to determine if stdin/out/err are a terminal (#10970) 2023-11-21 20:48:39 -06:00
example_test.rs feat: Add unfold command (#10489) 2023-09-30 09:08:06 -05:00
lib.rs Move eval_hook to nu-cmd-base (#10146) 2023-08-29 23:46:50 +02:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00