Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalar joins should use -On and -Equals for naming #43

Closed
iRon7 opened this issue Jun 5, 2023 · 1 comment
Closed

Scalar joins should use -On and -Equals for naming #43

iRon7 opened this issue Jun 5, 2023 · 1 comment

Comments

@iRon7
Copy link
Owner

iRon7 commented Jun 5, 2023

$a = 'a1', 'a2', 'a3' |Foreach-Object { [PSCustomObject]@{ Name = $_ } } |
 Add-Member -MemberType ScriptProperty -Name Letters -Value { $This.Name -Replace '[^a-z]' } -PassThru |
 Add-Member -MemberType ScriptProperty -Name Numbers -Value { $This.Name -Replace '[^0-9]' } -PassThru

$a |Join 0,2,4 -on Numbers -Eq '<Value>'

Wishful thinking:

$a |Join 0,2,4 -on Numbers
@iRon7 iRon7 changed the title An Object with a Scalar join and a single -On value should use the ValueName Object[] |Join Scalar[] -On value should use the ValueName Jun 5, 2023
@iRon7 iRon7 changed the title Object[] |Join Scalar[] -On value should use the ValueName Scalar joins should use -On and -Equals for naming Jun 10, 2023
iRon7 added a commit that referenced this issue Jun 10, 2023
  - Fixes
    - [#43](#43): An outer join on an empty pipeline should return the right object 
    - [#44](#44): Broken comment line help
iRon7 added a commit that referenced this issue Jun 10, 2023
iRon7 added a commit that referenced this issue Jun 10, 2023
iRon7 added a commit that referenced this issue Jun 10, 2023
iRon7 added a commit that referenced this issue Jun 10, 2023
@iRon7
Copy link
Owner Author

iRon7 commented Jun 22, 2023

Implemented in version 3.8.3:

$a | Join 0,2,4 -on Numbers

Name Letters Numbers
---- ------- -------
a2   a       2
1,2,3 | Join 2,3,4 -On Left -eq Right

Left Right
---- -----
   2     2
   3     3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant