Skip Menu |

This queue is for tickets about the Parse-Dia-SQL CPAN distribution.

Report information
The Basics
Id: 77115
Status: resolved
Priority: 0/
Queue: Parse-Dia-SQL

People
Owner: Nobody in particular
Requestors: linux [...] slavino.sk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in:
  • 0.20_02
  • 0.21



Subject: wish: Outdated SQLite3 FOREIGN KEY support
Date: Thu, 10 May 2012 22:29:06 +0200
To: bug-Parse-Dia-SQL [...] rt.cpan.org
From: Slavko <linux [...] slavino.sk>
Hi, i am using the parse-dia-sql 0.20 under Debian testing amd64 and i am working with SQLite3 3.7.11. The SQLite3 foreign keys was improved and from version 3.6.19 there is direct support for this constraint in SQLite, as described here http://sqlite.org/foreignkeys.html The described constraints syntax is more readable and straightforward, than triggers generated by parsediasql now. By default is foreign keys support disabled in SQLite yet, but can be enabled by "PRAGMA foreign_keys = ON;" command (described i mentioned link), then good idea can be add this command to start of the file. The new syntax now can be, for example: CREATE TABLE table_name( some_id INTEGER, some_other INTEGER, FOREIGN KEY(some_other) REFERENCES another_table(another_id) ); or the same by other way: CREATE TABLE table_name( some_id INTEGER, some_other REFERENCES another_table(another_id) ); please, can you add this, more clean and more common, syntax support to your parser? regards -- Slavko http://slavino.sk
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

On Thu May 10 16:29:25 2012, linux@slavino.sk wrote: Show quoted text
> CREATE TABLE table_name( > some_id INTEGER, > some_other INTEGER, > FOREIGN KEY(some_other) REFERENCES another_table(another_id) > );
Hi Slavko, Thank for your interest in Parse-Dia-SQL. Foreign key support in PDS is mostly created using 'alter table add constraint .." statements. These seem to be unsupported in sqlite. This means the current approach in PDS will not work. I do think to create a separate a subclass "sqlite3-fk" could be a usable approach. _get_create_table_sql would need to be modified such that 'associations' (i.e. foreign keys) are made part of the 'create table' statement. Based on the above, are you able to come up with a proposed solution yourself? Best regards, Andreas
Subject: Re: [rt.cpan.org #77115] wish: Outdated SQLite3 FOREIGN KEY support
Date: Sat, 12 May 2012 15:34:39 +0200
To: bug-Parse-Dia-SQL [...] rt.cpan.org
From: Slavko <linux [...] slavino.sk>
Hi Andreas, thank you fro reply to my idea. Dňa Sat, 12 May 2012 07:46:12 -0400 "Andreas Faafeng via RT" <bug-Parse-Dia-SQL@rt.cpan.org> napísal: Show quoted text
> I do think to create a separate a subclass "sqlite3-fk" could be a > usable approach. _get_create_table_sql would need to be modified such > that 'associations' (i.e. foreign keys) are made part of the 'create > table' statement.
I don't know how hard is implement it, but any solution, which will not produce the "triggers", will be better than actual :-) But why do not implement it direct to sqlite3? For backward compatibility with older SQLite3 systems? The FK seems to be supported more than 2 years... Show quoted text
> Based on the above, are you able to come up with a proposed solution > yourself?
I am sorry, i am not developer and i know nothing about Perl, then i cannot help with implementation. regards -- Slavko http://slavino.sk
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Hi Preliminary support for SQLite3 foreign keys has been added to Parse-Dia-SQL version 0.20_02. Best regards, Andreas
Subject: Re: [rt.cpan.org #77115] wish: Outdated SQLite3 FOREIGN KEY support
Date: Tue, 24 Jul 2012 21:12:13 +0200
To: bug-Parse-Dia-SQL [...] rt.cpan.org
From: Slavko <linux [...] slavino.sk>
Ahoj, Dňa Mon, 23 Jul 2012 07:53:08 -0400 "Andreas Faafeng via RT" <bug-Parse-Dia-SQL@rt.cpan.org> napísal: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=77115 > > > Hi > > Preliminary support for SQLite3 foreign keys has been added to > Parse-Dia-SQL version 0.20_02. > > Best regards, > Andreas
thanks :-) -- Slavko http://slavino.sk
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.