Ricardo SIGNES | 18 Dec 02:01

Re: Querylet and separating SQL from Perl code

I'm bringing this discussion here from a private email.  I'm fairly
certain this isn't going to irritate Terrence... right?

Lots of context left in place.

* Terrence Brannon [2004-12-17T18:31:16]
> Ricardo SIGNES writes:
> > * Terrence Brannon [2004-12-17T14:35:46]
> >> However, Querylet looks very attractive. One thing is that SQL can be
> >> used across databases and so I would not embed the DSN with the
> >> SQL... a more accurate approach would be a hierarchy of SQL such as is
> >> used DBIx::AnyDBD.
> >
> > I'm not sure I understand what you mean.  Could you elaborate?  I don't
> > like DSNs, but it's a simple way to make Querylet plain.  At work, I
> > subclass Querylet to provide a "database" directive that builds the dbh.
> 
> well, the SYNOPSIS had a DSN inside the Querylet text file... but
> given that certain SQL applies across databases, they should not be
> bound together this way.

I still don't understand, specifically "SQL applies across databases."
I've always assumed that almost the only Querlyet use case was something
like this:

	The user has a database and wants to query it.  He wants to do
	something more complex than plain SQL, but doesn't want to learn how
	to write anything other than simple declarations of how to deal with
	the results.

(Continue reading)

Terrence Brannon | 18 Dec 03:50

Re: Querylet and separating SQL from Perl code

Ricardo SIGNES <rjbs-perl-swdesign <at> lists.manxome.org> writes:

> I'm bringing this discussion here from a private email.  I'm fairly
> certain this isn't going to irritate Terrence... right?

No problem. Thanks for joining the list Ricardo.

>
> Lots of context left in place.
>
> * Terrence Brannon [2004-12-17T18:31:16]
>> Ricardo SIGNES writes:
>> > * Terrence Brannon [2004-12-17T14:35:46]
>> >> However, Querylet looks very attractive. One thing is that SQL can be
>> >> used across databases and so I would not embed the DSN with the
>> >> SQL... a more accurate approach would be a hierarchy of SQL such as is
>> >> used DBIx::AnyDBD.
>> >
>> > I'm not sure I understand what you mean.  Could you elaborate?  I don't
>> > like DSNs, but it's a simple way to make Querylet plain.  At work, I
>> > subclass Querylet to provide a "database" directive that builds
>> > the dbh.

Ok, well that explains it then. I thought the DSN was "wed" to the
query. 

>> 
>> well, the SYNOPSIS had a DSN inside the Querylet text file... but
>> given that certain SQL applies across databases, they should not be
>> bound together this way.
(Continue reading)


Gmane