Skip to content

Conversation

@stephencelis
Copy link
Member

Parameter packs break down when a pack generic is a single value (instead of a tuple) and has a conformance constraint. These overloads are to work around it.

Before 1.0 we should probably come up with a reasonable limitation of how joins work. Some ideas to reduce the overloads:

  • Joins require no selected columns on either side. While it'd be nice to splat them, it just doesn't work well with parameter packs today.

  • Joins require no joined tables on the righthand side. Again: it'd be nice to support this, but it doesn't work well in the language today.

This maybe even means joins take Table.Type instead of Select<Table>.

I think if these two limitations were known and documented we could eliminate the many of the overloads we've defined today.

Parameter packs break down when a pack generic is a single value
(instead of a tuple) and has a conformance constraint. These overloads
are to work around it.

Before 1.0 we should probably come up with a reasonable limitation of
how joins work. Some ideas to reduce the overloads:

  - Joins require no selected columns on either side. While it'd be nice
    to splat them, it just doesn't work well with parameter packs today.

  - Joins require no joined tables on the righthand side. Again: it'd be
    nice to support this, but it doesn't work well in the language
    today.

This maybe even means joins take `Table.Type` instead of `Select<Table>`.

I think if these two limitations were known and documented we could
eliminate the many of the overloads we've defined today.
@stephencelis stephencelis requested a review from mbrandonw August 19, 2025 16:04
@stephencelis stephencelis merged commit c536d7b into main Aug 19, 2025
3 checks passed
@stephencelis stephencelis deleted the more-join-overloads branch August 19, 2025 17:59
coenttb pushed a commit to coenttb/swift-structured-queries-postgres that referenced this pull request Oct 14, 2025
* Add join overloads for `Joins: Table`

Parameter packs break down when a pack generic is a single value
(instead of a tuple) and has a conformance constraint. These overloads
are to work around it.

Before 1.0 we should probably come up with a reasonable limitation of
how joins work. Some ideas to reduce the overloads:

  - Joins require no selected columns on either side. While it'd be nice
    to splat them, it just doesn't work well with parameter packs today.

  - Joins require no joined tables on the righthand side. Again: it'd be
    nice to support this, but it doesn't work well in the language
    today.

This maybe even means joins take `Table.Type` instead of `Select<Table>`.

I think if these two limitations were known and documented we could
eliminate the many of the overloads we've defined today.

* wip

* fix
coenttb pushed a commit to coenttb/swift-structured-queries-postgres that referenced this pull request Oct 15, 2025
* Add join overloads for `Joins: Table`

Parameter packs break down when a pack generic is a single value
(instead of a tuple) and has a conformance constraint. These overloads
are to work around it.

Before 1.0 we should probably come up with a reasonable limitation of
how joins work. Some ideas to reduce the overloads:

  - Joins require no selected columns on either side. While it'd be nice
    to splat them, it just doesn't work well with parameter packs today.

  - Joins require no joined tables on the righthand side. Again: it'd be
    nice to support this, but it doesn't work well in the language
    today.

This maybe even means joins take `Table.Type` instead of `Select<Table>`.

I think if these two limitations were known and documented we could
eliminate the many of the overloads we've defined today.

* wip

* fix
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.

3 participants