• 
      

    Add comparison of OrderBy with nulls_first/nulls_last.

    Review Request #15276 — Created Sept. 6, 2026 and updated — Latest diff uploaded

    Information

    django-assert-queries
    main

    Reviewers

    Internally, Django represents an order_by clause with an OrderBy
    instance, and this can contain nulls_first= and nulls_last=
    settings. These settings affect comparisons, but don't show up in the
    repr() output, making it hard to debug. They can also support
    subqueries, which need to be handled just like we do for other clauses.

    This change adds explicit comparisons and formatting for order_by to
    both show any nulls_* attributes and to store subquery information for
    comparison when in use by the query.

    All unit tests pass in all test environments.

    Review Board and Djblets unit tests pass.

    Commits

    Files