Cool, thanks for the answer! On Thursday, August 15, 2019 at 9:37:16 PM UTC+3, Jeremy Evans wrote: > > On Thursday, August 15, 2019 at 8:50:25 AM UTC-7, Yuri Smirnov wrote: >> >> Hi, I need to generate some SQL that looks like this: >> >> row(1, 2, null, 3) IS NOT DISTINCT FROM row(1, 2, null, 3) >> >> Is there some simple way to do that with Sequel? >> > > Sequel currently doesn't have DSL support for "IS NOT DISTINCT FROM". > It's not SQL standard syntax, though it would be possible to add support > via an extension. > > Sequel does have support for row() via the pg_row extension: > > DB.extension :pg_row > Sequel.lit("? IS NOT DISTINCT FROM ?", Sequel.pg_row([1, 2, nil, 4]), > Sequel.pg_row([1, 2, nil, 3])) > > You could also cheat and use a functional call, since the syntax is the > same: > > Sequel.lit("? IS NOT DISTINCT FROM ?", Sequel.function(:row, 1, 2, nil, > 4), Sequel.function(:row, 1, 2, nil, 3)) > > 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 sequel-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/3d0cc9d4-9d1c-424e-b231-0887f0743025%40googlegroups.com.