You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a use case that could be made simpler with another JoinOption available.
I'm dynamically generating SQL queries and conditionally change from JOIN to LEFT JOIN. Since an unmodified JOIN is equivalent to INNER JOIN then I realized that I could use JoinWithOption, and conditionally change the JoinOption.
There are a few obvious options Ito do this:
Conditionally call either Join or JoinWIthOption, with a JoinOption to the second
Create my own const JoinOption that's just the word "INNER". Then I'll conditionally just use a package constant Inner or the imported constant sqlbuilder.LeftJoin. It's a little inconsistent, but not bad
Add a new const Inner JoinOption = "INNER" to the library
Any thoughts on the last option? I figured it's an easy and reasonable addition.
I can create a PR if you think it's a good path forward for the library.
The text was updated successfully, but these errors were encountered:
I've run into a use case that could be made simpler with another
JoinOption
available.I'm dynamically generating SQL queries and conditionally change from
JOIN
toLEFT JOIN
. Since an unmodifiedJOIN
is equivalent toINNER JOIN
then I realized that I could useJoinWithOption
, and conditionally change theJoinOption
.There are a few obvious options Ito do this:
Join
orJoinWIthOption
, with a JoinOption to the secondInner
or the imported constantsqlbuilder.LeftJoin
. It's a little inconsistent, but not badconst Inner JoinOption = "INNER"
to the libraryAny thoughts on the last option? I figured it's an easy and reasonable addition.
I can create a PR if you think it's a good path forward for the library.
The text was updated successfully, but these errors were encountered: