Re: Proposal for Sequel::Model method for finding first instance or raising exception

2013-03-13 Thread Farrel Lifson
::RecordNotFound exception Farrel -- You received this message because you are subscribed to the Google Groups sequel-talk group. To unsubscribe from this group and stop receiving emails from it, send an email to sequel-talk+unsubscr...@googlegroups.com. To post to this group, send email to sequel-talk

Re: DateTime and date/time fields

2008-06-04 Thread Farrel
patching I'll have a look at it and see what I can do but I am not familiar with the Sequel code base. Farrel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email

Re: DateTime and date/time fields

2008-06-04 Thread Farrel
, and do the same in the adapter. If I get some free time I'll have a go at a patch. Thanks for the help Farrel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to sequel

Re: DateTime and date/time fields

2008-06-03 Thread Farrel
= Time On line 3 and line 9 a A Time class is returned as the class of updated_at, while on line 7 it's a DateTime. Farrel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send

Re: DateTime and date/time fields

2008-06-03 Thread Farrel
I should also add this is on a Postgres databases, Sequel 2.0 stable gem, Ruby 1.8.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to

Re: DateTime and date/time fields

2008-06-03 Thread Farrel
Here's the code for the Organisation class class Organisation Sequel::Model before_validation do if self.new? self.uuid = UUID.random_create.to_s end end before_create do creation_time = Time.now self.created_at = creation_time self.updated_at = creation_time

DateTime and date/time fields

2008-06-02 Thread Farrel
I noticed with Sequel 2.0 that the Ruby object for a Postgres timestamp field is now a DateTime instead of a Time object. Is DateTime the default for all date and time related fields or is Time and Date objects used in other cases? --~--~-~--~~~---~--~~ You

Re: allow_null with typecast

2008-05-25 Thread Farrel
On May 25, 8:00 pm, dusty [EMAIL PROTECTED] wrote: I have a timestamp field in my model that I want to allow null on, I'm not sure how to do this. Right now I have it with :allow_null = true in my set_schema declaration. Use ':null = true' instead. Farrel

Re: Typecasting on Assignment Thoughts

2008-05-20 Thread Farrel
and nothing else. Farrel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to sequel-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED

Re: Issues with Seque migrations on Merb

2008-05-15 Thread Farrel
why the specs loaded up correctly. Farrel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to sequel-talk@googlegroups.com To unsubscribe from this group, send email

Re: MAJOR changes: Make identifier quoting optional, quote all identifiers, force explicit table aliasing when joining

2008-05-15 Thread Farrel
@values={} irb(main):002:0 o.name NoMethodError: undefined method `name' for #Organisation @values={} from /usr/lib/ruby/gems/1.8/gems/sequel-1.5.1/lib/sequel_model/ deprecated.rb:41:in `method_missing' from (irb):2 irb(main):003:0 Organisation.columns = [] Farrel

Re: Models have no attributes

2008-05-09 Thread Farrel
]? Farrel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to sequel-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options

Validations and create_before

2008-05-08 Thread Farrel
What's the suggested way to specify a 'validates_presence_of :attr' validation where 'attr' is set in the before_create block? save returns false and says that 'attr' is not set save! works, no exceptions thrown, but I would prefer to use save. Farrel

Re: Validations and create_before

2008-05-08 Thread Farrel
On May 8, 11:33 am, Farrel [EMAIL PROTECTED] wrote: What's the suggested way to specify a 'validates_presence_of :attr' validation where 'attr' is set in the before_create block? save returns false and says that 'attr' is not set save! works, no exceptions thrown, but I would prefer to use