The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Jeremy Evans <jeremyeva...@gmail.com>
Date: Sat, 17 Sep 2011 10:52:24 -0700 (PDT)
Local: Sat, Sep 17 2011 1:52 pm
Subject: Re: Feedback requested on minor change to operator handling for +, &, and |
On Sep 17, 10:22 am, funny_falcon <funny.fal...@gmail.com> wrote:
> I'm not sure that library should guess for user which operator to use, (just
In this case, it's not really guessing, it's just using types. If you
> my opinion). see the ruby expression "x + 'a'", you would assume a string concatenation operation. If you see a ruby "x & 1" operation, you would assume a bitwise operation. This just updates the code to make Sequel act more like ruby. Since it doesn't know the type of column x if you do ":x + 'a'", it can either generate an addition or concatenation operation, and I think concatentation makes more sense. Before, you would need to do ":x.sql_string + 'a'" or ":x.sql_number &
> In case user really wants to make `((x+1)||'a')` in SQL, what should he do
That isn't the operator guessing part of the patch, and I don't think
> after applying this patch? such a thing was supported before (NumericExpression doesn't implement sql_string). || on most database types will automatically convert numerics to strings, so I probably should at least take out the code that disallows numeric and boolean expressions in string expressions. To support that, I could make the following work: (:x + 1).sql_string + 'a'
Jeremy You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||