Re: how to find out column types?

[prev] [thread] [next] [Date index for 2004/12/29]

From: Stephen Quinney
Subject: Re: how to find out column types?
Date: 12:02 on 29 Dec 2004
On Tue, Dec 28, 2004 at 09:29:09PM +0000, Simon Flack wrote:
> Ted Zlatanov wrote:
> >
> >I haven't been able to figure out how to use primary_key(); if anyone
> >can show me how to incorporate that I would appreciate it greatly.  I
> >think I am using it correctly but I get an empty list every time, so I
> >must be missing something.  Getting the primary key would be really
> >useful to me.
> 
> I'm not sure that this is something CDBI::Plugin::Type should do. 
> Class::DBI already provides a primary_columns(). The Class::DBI::<DBD> 
> classes also query the database for a list of primary keys but don't 
> provide any accessors for that data. For some reason, they don't use 
> DBI->primary_key() internally. They each query the primary keys in a 
> database-dependent manner.

I looked into something along these lines a while ago. I use
PostgreSQL and I wasn't completely happy with the CDBI::Pg method of
finding information about tables. I rewrote it to use the standard DBI
methods. My new set_up_table() method can be found at:

http://www.jadevine.org.uk/cdbi/cdbi-pg-new.txt

I sent this off to Sebastian Riedel, who is now the maintainer of
CDBI::Pg, and he said he was interested in using it in some form.

My feeling is that most of this code should work with any DBD module
that implements the necessary methods. So possibly with a bit of work
most of the current DBD specific code could be merged into a generic
system as part of Class::DBI itself?

Stephen 

(message missing)

how to find out column types?
Ted Zlatanov 18:54 on 21 Dec 2004

Re: how to find out column types?
Tony Bowden 18:58 on 21 Dec 2004

Re: how to find out column types?
Ted Zlatanov 19:28 on 21 Dec 2004

Re: how to find out column types?
Peter Speltz 08:05 on 22 Dec 2004

Re: how to find out column types?
Tony Bowden 08:58 on 22 Dec 2004

Re: how to find out column types?
Ted Zlatanov 15:34 on 22 Dec 2004

Re: how to find out column types?
Tony Bowden 17:04 on 22 Dec 2004

Re: how to find out column types?
Ted Zlatanov 17:11 on 22 Dec 2004

Re: how to find out column types?
Tony Bowden 01:08 on 23 Dec 2004

Re: how to find out column types?
Stephen Quinney 07:51 on 23 Dec 2004

Re: how to find out column types?
Simon Flack 13:17 on 23 Dec 2004

Re: how to find out column types?
Ted Zlatanov 16:05 on 23 Dec 2004

Re: how to find out column types?
Peter Speltz 07:55 on 24 Dec 2004

Re: how to find out column types?
Ted Zlatanov 19:38 on 28 Dec 2004

Re: how to find out column types?
Simon Flack 21:29 on 28 Dec 2004

Re: how to find out column types?
Tony Bowden 03:55 on 29 Dec 2004

Re: how to find out column types?
Stephen Quinney 12:02 on 29 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52