Re: [CDBI] Dealing with non-required primary keys

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

From: Peter Speltz
Subject: Re: [CDBI] Dealing with non-required primary keys
Date: 11:44 on 04 Sep 2005
On 9/4/05, Rusty Phillips <rustyp@xxxxxxxxx.xxx> wrote:

> > It seems your solution would be to patch the specific drivers for each
> > RDBMS you want to use so they work.
> I guess that's one way.  There's a lot of brokenness in them, though.
> It also means only using the databases that have Class::DBI drivers and
> hoping that they continue to work forever.
>  A database-agnostic way would be to have a way to specify that
> Class::DBI doesn't have to worry about certain primary keys because the
> database will take care of it. =20
> In which case, may I suggest a change to Class::DBI to
> make it possible?  How about allowing this behaviour (ignoring the
> primary keys during insert) when the "use sequence" command has no
> arguments?  I'd be happy to implement it and send in a patch.
>=20

I really don't know that much about the internals of CDBI or its
subclasses.  However I thought this was exactly what CDBI does. If you
want CDBI to worry about making the PK, then you set a sequence.
($class->sequence($name) ). If your RDBMS does not need you to create
values for the PK, like Mysql, you  don't  set a sequence and
Class::DBI won't make a value for that column and instead lets the DB
do it.  Is this not what happens?

Are you trying to make one CDBI class that works for all RDBMS's auto
inc or sequence mechanisms?

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

(message missing)

[CDBI] Dealing with non-required primary keys
Rusty Phillips 01:20 on 04 Sep 2005

RE: [CDBI] Dealing with non-required primary keys
Rusty Phillips 02:39 on 04 Sep 2005

Re: [CDBI] Dealing with non-required primary keys
Peter Speltz 10:17 on 04 Sep 2005

Re: [CDBI] Dealing with non-required primary keys
Rusty Phillips 11:24 on 04 Sep 2005

Re: [CDBI] Dealing with non-required primary keys
Peter Speltz 11:44 on 04 Sep 2005

Re: [CDBI] Dealing with non-required primary keys
Peter Speltz 11:46 on 04 Sep 2005

Re: [CDBI] Dealing with non-required primary keys
Rusty Phillips 12:04 on 04 Sep 2005

Re: [CDBI] Dealing with non-required primary keys
Matt S Trout 12:12 on 04 Sep 2005

Generated at 13:57 on 10 Sep 2005 by mariachi v0.52