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

Extend the Profile List database calls to include selectors #3786

Merged
merged 2 commits into from
Jul 8, 2024

Commits on Jul 7, 2024

  1. Extend the Profile List database calls to include selectors

    Since the profile selectors need to be included when listing profiles,
    we need to extend the two profile list calls to list selectors as well.
    
    Because the selectors are stored in a different table, but we still need to
    retrieve them in the same Go struct defined in models, we define a new SQL
    type in a migration that represents the selectors and tell sqlc to use it in
    sqlc.yaml.
    
    This new Go struct needs a Scan method as well to convert raw SQL rows
    into structs as well.
    
    Fixes: mindersec#3721
    
    Co-authored-by: Michelangelo Mori <mmori@stacklok.com>
    jhrozek and blkt committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    d1f9ae6 View commit details
    Browse the repository at this point in the history
  2. Take review suggestions into account

    mindersec#3786 (comment)
    
    Co-authored-by: Michelangelo Mori <mmori@stacklok.com>
    jhrozek and blkt committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    15fc001 View commit details
    Browse the repository at this point in the history