See http://pastie.org/2413439 for the patch.  I'm not sure if I want
to commit this to Sequel because of the potential backwards
compatibility issues.  I'd like to get opinions from the community
before I make my decision.

Thanks,
Jeremy

Here's the commit message:

This handles the following types of cases:

  (:x + 'a')
  # Before: (x + 'a')
  #  After: (x || 'a')
  (:x & 1)
  # Before: (x AND 1)
  #  After: (x & 1)

Basically, if the argument to + is a String, assume you want to a
string concatentation. If the argument to & or | is a numeric,
assume you want to do a bitwise operation.  Applying a mathematical
operator to a string makes no sense, nor does applying a boolean
operator to an integer.  Unfortunately, some databases don't have
true booleans and use 1/0, and some databases may automatically
convert strings to numbers for mathematical operators, so this could
be breaking backwards compatibility in such cases.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to