On 12/03/2010 3:57 AM, Jeremy Evans wrote:
This was a recent change in Sequel (between 3.8.0 and 3.9.0). It was
done to allow you to make the limit a bound variable in a prepared
statement, which doesn't work without the parentheses in 2008 (and I
think 2005 as well). I'll accept a patch to the shared MSSQL adapter
that omits the parentheses if we detect that we are working on a
pre-2005 MSSQL. In the mean time, it should be fairly easy to monkey
patch, see
http://github.com/jeremyevans/sequel/blob/master/lib/sequel/adapters/shared/mssql.rb#L434.
OK, thanks for that. I think I'll just go with monkey patching for now.
We are moving to 2008 so I don't think it's worth putting in the main
line code just for a few months.
Also, you should know that I don't test on MSSQL 2000 (only on 2008).
At the very least, limit with an offset is also broken on MSSQL 2000,
and that isn't possible to fix correctly in all cases
He he.. I don't *want* to work with MSSQL 2000, just no choice for a
little while longer :(
Limit/offset is just another reason why it's probably not worth trying
to come up a with patches that try to suit all versions.
Thanks again,
Gary.
--
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.