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

Get-DbaDbUdf ExcludeSystemUdf correct logic #9417

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

pollusb
Copy link
Contributor

@pollusb pollusb commented Jul 4, 2024

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (affects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/dataplat/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

Purpose

Correct a logical error with ExcludeSystemUdf in Get-DbaDbUser

Commands to test

# Actual logic:
PS> (Get-DbaDbUdf @splat).Count
170
PS> (Get-DbaDbUdf @splat -ExcludeSystemUdf:$true).Count
36
PS> (Get-DbaDbUdf @splat -ExcludeSystemUdf:$false).Count
36

# Revised logic:
PS> (Get-DbaDbUdf @splat).Count
170
PS> (Get-DbaDbUdf @splat -ExcludeSystemUdf:$true).Count
36
PS> (Get-DbaDbUdf @splat -ExcludeSystemUdf:$false).Count 
170

# Actual logic:
PS> (Get-DbaDbUdf @Splat).Count
170
PS> (Get-DbaDbUdf @Splat -ExcludeSystemUdf:$true).Count
36
PS> (Get-DbaDbUdf @Splat -ExcludeSystemUdf:$false).Count
36

# Revised logic:
PS> (Get-DbaDbUdf @Splat).Count
170
PS> (Get-DbaDbUdf @Splat -ExcludeSystemUdf:$true).Count
36
PS> (Get-DbaDbUdf @Splat -ExcludeSystemUdf:$false).Count
170
Copy link
Contributor

@andreasjordan andreasjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pull request. LGTM.

@potatoqualitee
Copy link
Member

Thanks everyone! Sorry I'm slow 💀 And thank you @andreasjordan for the ping.

@potatoqualitee potatoqualitee merged commit 38c253c into dataplat:development Jul 16, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

4 participants