Wow... mind blown!

Commit looks great! I like the syntax. Fits in well with the current Sequel 
way of doing things.

When do you expect it to be released on Rubygems?

Aryk

On Wednesday, May 27, 2020 at 8:30:29 PM UTC+3, Jeremy Evans wrote:
>
> On Wednesday, May 27, 2020 at 9:25:26 AM UTC-7, Jeremy Evans wrote:
>>
>> On Wednesday, May 27, 2020 at 8:16:02 AM UTC-7, Aryk Grosz wrote:
>>>
>>> Hey Jeremy, I'm only asking because Sequel is so amazing and I figure I 
>>> probably missed something somewhere.
>>>
>>> It's not a big deal, I just wrote the joins using join_table and it's 
>>> working well, just bummer can't reuse the associations I already made.
>>>
>>
>> Agreed, but if we can make it easier, that would be best.  For simple 
>> associations, it's not a big deal to recreate all of the join parameters, 
>> but the more complex the association, the larger pain it is.
>>
>> Sequel has association_left_join and similar methods, so it can customize 
>> the join type for multiple associations at the same level, but it currently 
>> can't use a different join type for a nested association than for the 
>> association it nests under.  However, Sequel already supports 
>> per-association custom table aliasing, by passing a 
>> Sequel::SQL::AliasedExpression instead of a symbol as the association.  I 
>> think we can expand this support to per-association custom join types:
>>
>>   Track.dataset.association_inner_join(:album=>Sequel.as(:artist, 
>> :table_alias_name, :join_type=>:left))
>>
>> I'll see if that is workable, and if so I'll implement it. Note that this 
>> isn't specific to association_*_join, it would also work for eager_graph 
>> (association_*_join is basically eager_graph but only keeping the same 
>> joins).
>>
>
> Support committed: 
> https://github.com/jeremyevans/sequel/commit/ed1a89c0401fef773fa486cda68b2b78544ca6ab
>
> Thanks,
> Jeremy
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/fefb55f9-34d6-44a9-952f-862b31c5c0aa%40googlegroups.com.

Reply via email to