Re: Selecting (and accessing) from many tables

[prev] [thread] [next] [Date index for 2004/09/20]

From: Tony Bowden
Subject: Re: Selecting (and accessing) from many tables
Date: 16:47 on 20 Sep 2004
On Mon, Sep 20, 2004 at 08:05:19AM -0400, Jesse Sheidlower wrote:
> >   SELECT __ESSENTIAL(t)__, __ESSENTIAL(c)__, __ESSENTIAL(a)__
> >     FROM __TABLE(=t)__, __TABLE(CD=c)__, __TABLE(Artist=a)__
> >    WHERE __JOIN(t c a)__
> >      AND t.id = ? 
> > });
> My. OK, I didn't realized it worked this way, but this is
> terrific. Thanks.
> When retrieving in such a manner, what is the syntax for
> acessing the elements of this from my Track object? 

That in and of itself won't give you a Track object, as you're selecting
lots of things from lots of different places. You're going to need to wrap
your own accessor around this to do whatever you need it to do. There's
only so much magic we support at the minute! :)

The quick and dirty way, assuming this is read only, is probably to
do this in a subclass of track, and set up TEMP columns for the things
coming from the other classes. The more correct way would be for it to
fake up the relationships without needing to do the extra fetch.

Tony

(message missing)

Selecting (and accessing) from many tables
Jesse Sheidlower 00:46 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 07:18 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 12:05 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 16:47 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 22:55 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 07:04 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Perrin Harkins 19:29 on 20 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 13:28 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 13:56 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 14:05 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 15:08 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Jesse Sheidlower 15:22 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Tony Bowden 15:28 on 21 Sep 2004

RE: Selecting (and accessing) from many tables
Carl Johnstone 15:42 on 21 Sep 2004

Re: Selecting (and accessing) from many tables
Perrin Harkins 16:08 on 21 Sep 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52