On Wed, Feb 3, 2021 at 4:10 PM [email protected] <[email protected]> wrote:
> Hey Jeremy, > > I think I'm missing something here: > > > https://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Postgres/ArrayOp.html > > I did: > array_op = Sequel.pg_array_op :ARRAY > > ```ruby > > [24] pry(main)> User.where(1=>array_op[2]) > > => #<Sequel::Postgres::Dataset: "SELECT \"users\".* FROM \"users\" WHERE > (1 = (\"array\")[2])"> > ``` > > Seems like "array" is always getting escaped as if it were a column. > It's treating it as an identifier, which is expected since you are using a symbol, and Ruby symbols represent SQL identifiers in Sequel. The documentation seems to match this, except that the documentation isn't quoting the identifiers, mostly to make the examples easier to read. What SQL do you want to generate? 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/CADGZSSep_oi5fqsc4rfN2xm9BE6kQQy42L32iX-b_tU1q8bVew%40mail.gmail.com.
