On Tuesday, February 18, 2020 at 5:48:37 PM UTC-8, BeeRich33 wrote:
>
> I get an error on the following query:
>
> a = DR[:company_t].where(Sequel.ilike(:company_name, '%Tru%') & (status: 
> 'active'))
>
>
> The error:
>
> syntax error, unexpected tLABEL
> ...mpany_name, '%Tru%') & (*status*: 'active'))
>
> status is a field name.  
>
> According to the Queries documentation page, this is apparently good.  
>
> Artist.where(Sequel.like(:name, 'Y%') & (Sequel[{b: 1}] | Sequel.~(c: 3)))
>
>
> Any insight as to why this is tripping?  It doesn't like my fieldname.  
>

It's not a Sequel error, you are providing invalid Ruby syntax.  You want

  & {status: 'active'}

instead of

  & (status: 'active')

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/bed41ed5-8ef9-4f3b-aa36-a3c15afe084e%40googlegroups.com.

Reply via email to