Sorry, I forgot to reply to your suggestion. `Sequel[:albums][hash]` does
seems like a good idea as well, but I think it raises some implementation
concerns, one being that it would require overriding
`Sequel::SQL::QualifyingMethods#[]` to have a double role, which adds a bit
more complexity than something like `.qualified_where`. But I like that
you'd be able to use a regular `.where`.

On Wed, Oct 24, 2018 at 4:23 PM Alexander Popov <[email protected]>
wrote:

> And… nothing about my suggestion? With `Sequel[:albums][hash]`.
>
> On Wednesday, October 24, 2018 at 5:20:44 PM UTC+3, Jeremy Evans wrote:
>>
>> On Wednesday, October 24, 2018 at 5:51:50 AM UTC-7, Janko Marohnić wrote:
>>>
>>> Thanks for posting this. After thinking about it more, I agree with
>>> Jeremy that it would be useful to have this as a separate extension.
>>> Instead of
>>>
>>> qualified_where(album: {
>>>   released_at: Date.today,
>>>   name:        "Back to Black",
>>>   single:      true,
>>> })
>>>
>>> I was thinking to have the qualifier specified as the first argument:
>>>
>>> qualified_where(:album,
>>>   released_at: Date.today,
>>>   name:        "Back to Black",
>>>   single:      true,
>>> )
>>>
>>> The latter has the downside that you cannot have multiple qualifiers,
>>> but I think that's not a deal breaker. I'm fine with both, though.
>>>
>>
>> I would also prefer the two argument approach.  You can always have
>> multiple qualified_where calls if you need multiple qualifiers.
>>
>> Thanks,
>> Jeremy
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sequel-talk" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sequel-talk/qhBAh7r0AKY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sequel-talk.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to