On Feb 9, 5:42 pm, Jeremy Evans <[email protected]> wrote: > On Feb 9, 4:33 pm, "Skye sh...@#$" <[email protected]> wrote: > > > > I'd think the most common use case for these methods are with models, > > turning a column's name into to something that follows Ruby's method > > naming convention. > > > In some cases, since the table name is transformed, these methods > > aren't as useful as they could be -for Models: > > > DB.identifier_input_method = :camelize > > DB.identifier_output_method = :underscore > > > class Blog < Sequel::Model(:CRAP_BLOG) > > set_primary_key :identifier > > end > > Actually, the main use so far as I know has just been downcasing when > retrieving and upcasing before inputting,
With ORM or querying general? > but camelize/underscore > should work fine, assuming that fits with your schema. Yes, they work fine if ones table conforms to the same convention as the columns: "CRAP_BLOG".camelize #"CRAPBLOG" When the transformation between table name and column names differ, they can't be used. Why mess with the table name when it's already specified via Model() or associated with the dataset passed to Model()? If one needs to refer to CRAP_BLOG they can use Blog. -Skye -- 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.
