AW: quick retrieval help

[prev] [thread] [next] [Date index for 2005/01/14]

From: Hartmaier Alexander
Subject: AW: quick retrieval help
Date: 08:09 on 14 Jan 2005
Yes that's the point ;-)
Works as expected, thanks Aleksandr!

-Alex


-----Urspr=FCngliche Nachricht-----
Von: Peter Speltz [mailto:peterspeltz@xxxxx.xxx]=20
Gesendet: Freitag, 14. Januar 2005 09:07
An: class dbi list
Betreff: Re: quick retrieval help


> > =20
> >
> Most probably you're talking about:
>=20
> my @interfaces =3D map NAC::Interface->construct($_),=20
> $sth_int_down->fetchall_hash;
> foreach (@interfaces) {
>     print $_->id
> }
>=20

I have never understood this construct method and have been wanting too f=
or a
while. Can someone tell me if this is a accurate undertanding?

construct takes a hash and turns it into an object. You execute a sql sta=
tement
to retrieve the data efficiently-- joins and all that -- so that several
queries are not executed to create the objects as happens typically when =
an
object has_a and has_many things. So something like the above example can=
 be
much faster than a simple retrieve_all.=20

Is that on target?

thanks.

=3D=3D=3D=3D=3D
pjs

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20

*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*"*
Hinweis: Dieses E-mail kann vertrauliche und gesch=FCtzte Informationen e=
nthalten.
Sollten Sie nicht der beabsichtigte Empf=E4nger sein, verst=E4ndigen Sie =
bitte den Absender und l=F6schen Sie dieses E-mail dann sofort.

Notice: This e-mail contains information that is confidential and may be =
privileged.
If you are not the intended recipient, please notify the sender and then =
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*"*

AW: quick retrieval help
Hartmaier Alexander 08:09 on 14 Jan 2005

Re: AW: quick retrieval help
Peter Speltz 08:13 on 14 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52