Re: pager

[prev] [thread] [next] [Date index for 2004/10/22]

From: David R. Baird
Subject: Re: pager
Date: 14:41 on 22 Oct 2004
On 22 Oct 2004 at 15:51, Emanuele Zeppieri wrote:

> > You can also use CDBI::Subclass->__driver.
> 
> Does this give info also about the specific DB server in use or just
> about the DBI driver? In the latter case it could not be enough, because
> there exist drivers which support a wide array of DB servers (DBD::ODBC,
> DBD::ADO, DBD::JDBC) while we need to know the exact DB server in use,
> since LIMIT/OFFSET (availability, sintax, semantic) varies from DB
> server to DB server, not from driver to driver unfortunately.
> 
> UPDATE:
> I've seen that the just released CDBI::Plugin::Pager by David R. Baird
> opted for:
> 
> 	my $driver = lc( $cdbi->__driver );
> 
> and that $cdbi->__driver seemingly returns just the driver name.
> This could be a problem in the above mentioned case (DBD::ODBC etc.) I'm
> afraid...
> Am I wrong?
> 
> Cheers,
> Emanuele Zeppieri.

The auto_set_syntax thing is at the moment more of a proof of concept 
than a full portability solution. But it should provide a hook for 
better portability later. It depends on a knowledge base of which DBs 
use what syntax, and my knowledge base is very small! So I have a 
list of DBs that this module won't work for (Oracle and DB2, but 
there will be plenty more), and it dies for these [hmm, it should 
probably die at compile time]. For Pg, MySQL, SQLite, 
InterBase/FireBird, it should choose the appropriate syntax. There 
are probably other DBs out there that could use one of the 3 
available syntaxes. For any driver not in these lists, it defaults to 
LimitOffset. 

I think it should be reasonably possible to implement the more 
complex limit emulation methods to support Oracle, DB2, MS Access, 
etc but that's going to need a few more tuits. 

I see what you mean about relying on the driver name to pick a 
syntax. Seems like I'll need to gather some more data, but it's an 
interesting problem. 

By the way, is search.cpan down? I haven't been able to get it for a 
day or so. 

d.


        -- 
        Dr. David R. Baird
Riverside Content Management Systems
http://www.riverside-cms.co.uk

(message missing)

pager
David R. Baird 09:48 on 20 Oct 2004

Re: pager
David R. Baird 13:53 on 20 Oct 2004

Re: pager
David R. Baird 21:00 on 20 Oct 2004

Re: pager
merlyn (Randal L. Schwartz) 02:55 on 21 Oct 2004

Re: pager
David R. Baird 10:46 on 21 Oct 2004

Re: pager
David R. Baird 11:30 on 21 Oct 2004

Re: pager
merlyn (Randal L. Schwartz) 12:10 on 21 Oct 2004

Re: pager
David R. Baird 23:08 on 21 Oct 2004

Re: pager
Cees Hek 00:22 on 22 Oct 2004

Re: pager
Tony Bowden 08:34 on 22 Oct 2004

Re: pager
Emanuele Zeppieri 13:51 on 22 Oct 2004

Re: pager
David R. Baird 14:41 on 22 Oct 2004

Re: pager
David R. Baird 09:20 on 22 Oct 2004

Class::DBI modules not properly loaded under mod_perl ?
Michele Valzelli 10:55 on 22 Oct 2004

Re: pager
Emanuele Zeppieri 12:21 on 22 Oct 2004

Re: pager
David R. Baird 12:52 on 22 Oct 2004

Re: pager
Emanuele Zeppieri 15:33 on 22 Oct 2004

Re: pager
David R. Baird 16:09 on 22 Oct 2004

Re: pager
David R. Baird 23:30 on 07 Nov 2004

RE: pager
Emanuele Zeppieri 03:50 on 14 Nov 2004

Re: pager
Emanuele Zeppieri 13:25 on 22 Oct 2004

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