mirror of
https://github.com/nushell/nushell.git
synced 2024-11-26 02:13:47 +01:00
7625aed200
This PR adds a command `join` for performing SQL-style joins on Nushell tables: ``` 〉join -h Join two tables Usage: > join {flags} <right-table> <left-on> (right-on) Flags: -h, --help - Display the help message for this command -i, --inner - Inner join (default) -l, --left - Left-outer join -r, --right - Right-outer join -o, --outer - Outer join Signatures: <table> | join list<any>, <string>, <string?> -> <table> Parameters: right-table <list<any>>: The right table in the join left-on <string>: Name of column in input (left) table to join on (optional) right-on <string>: Name of column in right table to join on. Defaults to same column as left table. Examples: Join two tables > [{a: 1 b: 2}] | join [{a: 1 c: 3}] a ╭───┬───┬───╮ │ a │ b │ c │ ├───┼───┼───┤ │ 1 │ 2 │ 3 │ ╰───┴───┴───╯ ``` <table> <tbody> <tr> <td><img width="400" alt="image" src="https://user-images.githubusercontent.com/52205/224578744-eb9d133e-2510-4a3d-bd0a-d615f07a06b7.png"></td> </tr> </tbody> </table> # User-Facing Changes Adds a new command `join` # Tests + Formatting ``` cargo test -p nu-command commands::join ``` Don't forget to add tests that cover your changes. - [x] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - [x] `cargo test --workspace` to check that all tests pass # After Submitting - [ ] If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --------- Co-authored-by: Reilly Wood <reilly.wood@icloud.com> |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu-cli | ||
nu-cmd-lang | ||
nu-color-config | ||
nu-command | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.