Using DBI methods

Bradley Baetz bbaetz at student.usyd.edu.au
Tue Aug 20 04:48:27 UTC 2002


On Tue, 20 Aug 2002, MattyT wrote:

> Bradley Baetz wrote:
> 
> > No, the DBI doesn't have any functionality to work arround database
> > servers which can't handle subselects and other basic SQL features.
> 
> I didn't ask that.  I asked whether it would be possible to extend it to
> do so using OOP.

No. In theoyr, anything is possible. In practice, its not, since queries 
get written in diferent ways (eg you may use a differnet number of 
queries, stroe stuff in an intermediate data structure, use a subselect 
instead of ajoin, or as well as, etc).

At some point it may be worth specialising the Bugzilla::Search stuff 
(which is the only 

> 
> > Stuff like transaction support is handled by DBI, but it has to be
> > explicit because the programmer has to tell it when to being/end the
> > transaction...
> 
> I didn't ask that.  I asked if we could get it to transparently handle
> the transactional SQL, by sending through or ignoring BEGIN at it's
> whim.

Yes, that can be done, since beginning/ending transactions are method
calls (->begin_work) If the db doesn't support transactions, then the
driver will raise a fatal error whih our wrapper class can ignore (or 
possible our error handling code will just pass on it; that would be 
easier but I'm not sure if its possible)

Bradley




More information about the developers mailing list