On Mar 4, 3:29 pm, Clive Crous <[email protected]> wrote:
> 2009/3/5 spox <[email protected]>:
>
> > Yeah, I use serialize in a couple of my models, but I could easily just add 
> > a
> > hook to do it instead. That was actually how I had implemented before 
> > finding
> > serialize.
>
> It would be kinda cool if you could contribute your hook as a plugin
> at the same time as it's deprecated from the core.
>
> I'm also fairly impartial, however, leaving the functionality there,
> albeit in a plugin, I'd prefer.

Model's aren't too hard to handle as you can use after_initialize and
before_save to convert the serialized columns.  There's no equivalent
for datasets.  You can use a custom row_proc for the output, but the
functionality for transforming the inputs wouldn't be there anymore,
unless I left the transform hooks there.

This functionality is generally used not to store binary data (as blob
columns do that fine), but to store ruby objects (either marshalled or
yamled) in a string field in the database.  I think that encourages
poor RDBMS design and practices.  If you want to do something like
that, you are generally better off with a key-value database like
CouchDB.

Jeremy



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to