On Oct 26, 7:17 pm, michael <[email protected]> wrote:
> I agree that core classes should have minimal modifications, even at the 
> expense of polymorphism. Currently, core
> classes are literalized by calling Dataset#literal(core_obj). This means no 
> overriding for specific adapter behavior for
> core subclasses, though I'm not necessarily sure there is a need to support 
> this.

Mostly true.  There are ways you can work around that for specific
cases by extending dataset objects with modules that override
Dataset#literal_* methods, but it's hard to do on a general basis.

> For subclasses of SQL::Expression, to_s(@ds) is called to literalize the 
> object. For all other objects, .sql_literal
> (with no ds argument) is called. I like the idea aliasing sql_literal to to_s 
> in SQL::Expression. This would require the
> addition of the required dataset argument to sql_literal. This would allow 
> subclasses to call a subclass-specific method
> in Sequel::Dataset and allow for adapter specific behavior. As mentioned 
> above, this should be the required convention.

I agree with this and will accept a patch for it.

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