[Dbix-class] retrieve_from_sql
Darren Duncan
darren at DarrenDuncan.net
Fri Aug 5 03:27:22 CEST 2005
At 1:17 AM +0100 8/1/05, Matt S Trout wrote:
>Does anybody use this? More importantly, is anybody using it out of choice
>or is it purely being used to get round Class::DBI (or whatever ORM) having
>insufficient flexibility to let you construct the query in an asbtract
>fashion?
If you want to be 100% adaptable, it is a good idea to allow the use
of raw SQL. However, that feature should be strongly recommended
against, and only be exploited by saavy individuals that know why
they are doing it and that whatever ORM doesn't have "native" support
for what the person wants.
>It's part of the Class::DBI API so we need to support it in the compat layer
>at least, but if we're going to abstract away the database layer entirely
>(which is necessary for e.g. Rosetta, let alone something like an LDAP
>backend) I think we should probably only support abstract formats in core,
>primarily SQL::Abstract style as currently and perhaps Tangram style later.
FYI, if you look at SQL::Routine, it actually *does* support SQL
string pass-thru; see the "circumventions" feature and "sql_fragment"
Node type. However, this is clearly documented as only for use by
saavy individuals that have no other option to get what they want.
So I rarely talk about it. And adding a feature to the native API
instead is recommended. Suffice it to say, you can still use it for
this.
-- Darren Duncan
More information about the Dbix-class
mailing list