Log of IRC channel: sequel

2008-05-21 Thread IRC logger
# irc.freenode.net:6667 # sequel_20080521.log # Log start :Wed May 21 06:43:40 UTC 2008 14:04 .inner_join (or any join for that matter) and .eager don't seem to work together 14:04 is that intentional? 14:10 the eager seems to be ignored 14:11 and I get

Sequel 2.0 Release Candidate

2008-05-21 Thread Jeremy Evans
The methods deprecated in Sequel 1.5.0 have now been removed, and Sequel is officially at the 2.0 Release Candidate stage. No new features will be added between now and 2.0. The only work left to be done is some major updates to the documentation, as well as fixing any bugs found between now and

Re: Typecasting on Assignment Thoughts

2008-05-21 Thread Mark V
On Thu, May 22, 2008 at 1:40 AM, Jeremy Evans <[EMAIL PROTECTED]> wrote: > > On May 20, 7:09 pm, "Mark V" <[EMAIL PROTECTED]> wrote: >> On Wed, May 21, 2008 at 8:02 AM, Jeremy Evans <[EMAIL PROTECTED]> wrote: >> >> > Just for fun, I looked at what ActiveRecord does. With 1.2.6, it >> >> > typecas

Re: Typecasting on Assignment Thoughts

2008-05-21 Thread Jeremy Evans
The typecasting on assignment code was just committed: http://github.com/jeremyevans/sequel/commit/2c7fd272cab1bc3f9fc183ebe9417c11a8ab0b67 It allows you to turn off typecasting on a global, per class, and even per instance basis, as well as easily modifying the typecasting rules by overriding th

Re: literal method

2008-05-21 Thread Jeremy Evans
On May 20, 10:33 pm, Shawn <[EMAIL PROTECTED]> wrote: > Why is the literal() method defined in the dataset classes (e.g. > Sequel::MySQL::Dataset) instead of the Database classes (e.g. > Sequel::MySQL::Database)? There are times when I want to quote a > string without/before creating a dataset, a

Re: Typecasting on Assignment Thoughts

2008-05-21 Thread Jeremy Evans
On May 20, 11:49 pm, "ARAI Shunichi" <[EMAIL PROTECTED]> wrote: > > model.number = '1' # => 1 > > model.number = 'a' # Raise error > > How can we acheive it? > By doing regexp matching to number.to_s and then to_i? As mentioned above, using Integer (a Kernel method). irb(main):002:0> Integ

literal method

2008-05-21 Thread Shawn
Why is the literal() method defined in the dataset classes (e.g. Sequel::MySQL::Dataset) instead of the Database classes (e.g. Sequel::MySQL::Database)? There are times when I want to quote a string without/before creating a dataset, and there's no way to do that currently. I also notice that Se

Re: Typecasting on Assignment Thoughts

2008-05-21 Thread ARAI Shunichi
> model.number = '1' # => 1 > model.number = 'a' # Raise error How can we acheive it? By doing regexp matching to number.to_s and then to_i? Personally I think Rails' method (just doing to_i) is usually okay for most purposes, because we typecheck in validation method. - Mellowtone Inc

Re: Typecasting on Assignment Thoughts

2008-05-21 Thread Jeremy Evans
On May 20, 7:09 pm, "Mark V" <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 8:02 AM, Jeremy Evans <[EMAIL PROTECTED]> wrote: > >> > Just for fun, I looked at what ActiveRecord does. With 1.2.6, it > >> > typecasts on access, with 2.0.2, it typecasts on assignment. In both > >> > cases, it