Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aarondl/sqlboiler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.10.2
Choose a base ref
...
head repository: aarondl/sqlboiler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.11.0
Choose a head ref
  • 7 commits
  • 9 files changed
  • 4 contributors

Commits on Apr 20, 2022

  1. Configuration menu
    Copy the full SHA
    445f482 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d6eae87 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2022

  1. Fix column ignore for primary key

    zapo authored and stephenafamo committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    3f46025 View commit details
    Browse the repository at this point in the history
  2. Add getter methods to relationship structs

    The goal of this change is to alleviate the need for the caller to check
    if the models' relationship struct is nil before accessing a field.
    Indeed, we've seen a proliferation in our codebase of the following
    pattern:
    
    ```
    if record.R != nil && record.R.SomeField != nil {
       ...
    }
    ```
    
    This is especially required in utilities functions which are not
    responsible for loading the model and can't know if the record has
    eagerly loaded the relationships and thus can't know if the relationship
    struct is nil. With this change, the previous code idiom can be replaced
    with:
    
    ```
    if field := record.R.GetSomeField(); field != nil {
      ...
    }
    
    ```
    
    The important part is that there's no possibility for panicing due to
    nil pointer, where-as, previously,  if the caller forgot to check for
    `record.R != nil`, a panic would happen.
    
    The change is backward compatible and follows the pattern that protobuf
    generation uses, i.e. `Message.GetX() XType`.
    fsaintjacques authored and stephenafamo committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    915f16d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bc05a42 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c568b09 View commit details
    Browse the repository at this point in the history
  5. Update changelog

    stephenafamo committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    bc95b73 View commit details
    Browse the repository at this point in the history
Loading