Open lardcanoe opened 8 years ago
Ok, I can look into supporting this @lardcanoe. Do you know what the corresponding Arel expression looks like? I've never seen BINARY
before.
Something like:
Post.where(Arel::Nodes::Bin.new(Arel::Nodes::Equality.new(Post[field], value)))
This will actually create "WHERE BINARY field = value" which is the correct way, though what i put in the original is also a valid format in mysql.
@lardcanoe I did a little poking around and it looks like the SQL parser Scuttle uses doesn't currently recognize the BINARY
keyword. Adding support for it is going to be the first step towards a fix. I don't have a ton of free time, but I'll keep this issue on the backburner.
WHERE posts.author = BINARY ' Mark Twain '
Notice the strings. MySQL string comparison ignores whitespace so you need to add BINARY to force it. Wondering if this is something you can do with your tool.