You should use the correct equality operator '=~', instead of just `=`, as
explained here:
https://github.com/jeremyevans/sequel/blob/master/doc/dataset_filtering.rdoc#filtering-using-expressions-
So it might just be
DL[:yachts].exclude{(lat =~ 0.0) & (lon =~ 0.0)}.
But check with .sql method to see if that produces the query you want.
Otherwise there are plenty of options for negative conditions:
https://github.com/jeremyevans/sequel/blob/master/doc/dataset_filtering.rdoc#negating-conditions-
Em ter., 5 de jan. de 2021 às 11:34, [email protected] <[email protected]>
escreveu:
> I can't seem to get an exclusion working:
>
> DL[:yachts].exclude{(lat = 0.0) & (lon = 0.0)}
>
> Disregarding that [0.0,0.0] is possible for yacht, I'd like to exclude
> these floats from those associated fields, qualified with both filters.
>
> I'm assuming this isn't a cast issue as 0.0 would be seen as a Float. I
> know I could wiggle around this, but I want to get my head around this
> approach of having both inside a single exclude using that union operator.
>
> Cheers
>
> --
> 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/4889bde8-0698-4b1e-a87c-1f7faad09c40n%40googlegroups.com
> <https://groups.google.com/d/msgid/sequel-talk/4889bde8-0698-4b1e-a87c-1f7faad09c40n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CANtavQ6Y4W2q7k-EdRqBMsTr6vLGV408kzkXupSVzV6K-c4MWw%40mail.gmail.com.