Re: [CDBI] tables with data_type column names

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

From: David Baird
Subject: Re: [CDBI] tables with data_type column names
Date: 07:48 on 20 Sep 2005
On 9/20/05, Paul Makepeace <digitalcraftsmen.net@xxxxx.xxx> wrote:
> I'm re-learning CDBI after quite an absence and have discovered a legacy
> system I'm working on has a table with 'data_type' as a column name,
> which clashes with an internal CDBI method.
>=20
> The twist is that I'm trying to use the barely-documented
> Class::DBI::Loader.
>=20
> http://search.cpan.org/dist/Class-DBI/lib/Class/DBI.pm#Changing_Your_Colu=
mn_Accessor_Method_Names
> seems like it might've helped otherwise.
>=20
> Anyone solved this? Not using ::Loader is an option if there's another
> similarly dynamic option.

I haven't used it yet, but SQL::Translator can generate CDBI classes
from a schema, and it can generate a schema from a DBI connection.
You'd probably have to modify the producer to capture the data_type
column and alter its accessor name. May or may not be easier to patch
CDBI::Loader.

d.

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] tables with data_type column names
Paul Makepeace 00:54 on 20 Sep 2005

Re: [CDBI] tables with data_type column names
David Baird 07:48 on 20 Sep 2005

Re: [CDBI] tables with data_type column names
Paul Makepeace 09:10 on 20 Sep 2005

Re: [CDBI] tables with data_type column names
Matt S Trout 09:33 on 20 Sep 2005

Generated at 17:55 on 28 Sep 2005 by mariachi v0.52