perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Brooks <>
Subject DBIx::Recordset - problem with !Tables and !TabJoin
Date Tue, 26 Oct 2004 18:56:31 GMT
I'm using DBIx::Record set to great effect, but I've discovered a bug 
which annoys me. An SQL statement with joins in it doesn't need to name 
any tables, but if I leave out the !Tables parameter it produces a 
statement like 'SELECT * FROM', which the server rightly rejects with an 
error. I'd like it to look for a !TabJoin (or other parameters that make 
it use a join) and not generate an invalid statement when they're 
present but !Tables is not. As it is, it doesn't matter what I put in 
!Tables beccause it's not used.

Here's an example of one place this occurs:

  *set = DBIx::Recordset->Search({'!DataSource'      => $self->mydatabase,
                                  '!Table'           => 'spurious',
                                  '!TabJoin'         => '((users JOIN membership ON
= membership.users_id) JOIN groups ON membership.groups_id = JOIN permissions ON
( = permissions.users_id AND user_r) OR ( = permissions.groups_id AND group_r)
OR member_r OR anonymous_r',
                                  '!Fields'          => 'true',
                                  ''         => $userid,
                                  '' => $pn});

Is this feasable?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message