Re: Is foreign_key_info() generic?

2004-12-16 Thread Tim Bunce
On Thu, Dec 16, 2004 at 01:01:46AM +0100, Bart Lateur wrote:
 On Wed, 15 Dec 2004 12:46:16 +, Tim Bunce wrote:
 
  It's one of those things why people say Mysql isn't a proper database.
 
 This isn't the place to start that particular flame-fest, so I'd
 appreciate it if no one does.
 
 Sorry, I didn't mean to start a flamefest, honestly. I just wanted to
 give one concrete exampe for declamations people often do without a word
 of explanation.

No problem.

 It doesn't actually stops me from using Mysql; but those things do annoy me.

Ditto.

Tim.


Re: Is foreign_key_info() generic?

2004-12-15 Thread Bart Lateur
On Wed, 15 Dec 2004 12:46:16 +, Tim Bunce wrote:

 It's one of those things why people say Mysql isn't a proper database.

This isn't the place to start that particular flame-fest, so I'd
appreciate it if no one does.

Sorry, I didn't mean to start a flamefest, honestly. I just wanted to
give one concrete exampe for declamations people often do without a word
of explanation.

It doesn't actually stops me from using Mysql; but those things do annoy
me.

-- 
Bart.


Re: Is foreign_key_info() generic?

2004-12-15 Thread Bart Lateur
On Wed, 15 Dec 2004 01:06:38 +0100, Sebastian Riedel wrote:

Does foreign_key_info behave the same for all dbd's?
Especially SQLite and mysql?

I never heard people entering foreign key info into Mysql databases. Is
that even possible?

Ah, yes, only starting with the InnoDB table type. Not with MyISAM,
then, I suppose.


http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html

It's one of those things why people say Mysql isn't a proper database.

-- 
Bart.


Re: Is foreign_key_info() generic?

2004-12-15 Thread Tim Bunce
On Wed, Dec 15, 2004 at 10:22:08AM +0100, Bart Lateur wrote:
 On Wed, 15 Dec 2004 01:06:38 +0100, Sebastian Riedel wrote:
 
 Does foreign_key_info behave the same for all dbd's?
 Especially SQLite and mysql?

DBD::SQLite doesn't have it yet, but it certainly could using
PRAGMA foreign_key_list. Just implement it and send a patch.

 I never heard people entering foreign key info into Mysql databases. Is
 that even possible?
 
 Ah, yes, only starting with the InnoDB table type. Not with MyISAM,
 then, I suppose.
 
 http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html
 
 It's one of those things why people say Mysql isn't a proper database.

This isn't the place to start that particular flame-fest, so I'd
appreciate it if no one does.

Tim.


Is foreign_key_info() generic?

2004-12-14 Thread Sebastian Riedel
Hi,

Yesterday merlyn posted a review copy of an upcoming article to the
cdbi-talk list where he used the info supplied by

$dbh-foreign_key_info('','','','','',$table);

to automatically setup has_a and has_many relationships for PostgreSQL.

Now i'm thrilled to integrate this functionality in Class::DBI::Loader,
but there is a question i'm unable to find an answer for.

Does foreign_key_info behave the same for all dbd's?
Especially SQLite and mysql?

-- 
sebastian