On 6/1/06, Guillermo Roditi <[EMAIL PROTECTED]> wrote:
> make them 2 separate methods and allow you to override the traditional
> insert_or_update behavior in the object declaration as part of the meta
> object maybe
>
> __PACKAGE__->meta->use_on_duplicate_key_update(1);
>
> then the helper will know whether to over ride to the new method or to
> default to the existing one.

I get the meta part (I actually typed that exact method name in an
earlier email before I revised it) but then why is there a need for
two helper methods?  Wouldn't setting that attribute simply change the
behavior of the lone insert_or_update() helper method?

The reason I revised my email and proposed two methods is to avoid as
many runtime checks as possible.  With two helper methods, it's clear
on method import which behavior the user wants, so there's no need for
a class-wide toggle and no question about which behavior to use at
runtime.  Since the whole point of this method is to be fast, I
figured it was worthwhile.  But maybe not.  I'll try it both ways and
see if the speed difference is appreciable.

-John


_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to