Re: Dia to SQL conversion



Hi Slavko,

On 05/10/2012 09:32 PM, Slavko wrote:
The parsediasql produces the triggers for foreign keys in sqlite3 for me, but i expect the constraint definition, 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) ); as described here http://sqlite.org/foreignkeys.html I tried parse my SQL model to some other DB types - i forgot which, because i did many tries in last days :-) And for these not SQLite3 types i got SQL with direct foreign keys definitions (without triggers). Then IMO the SQLite sopport for foreign keys in parsediasql is poor (outdated?). I do not tried if this triggers are working yet, but i think that it will be working. I see only one problem, that the constraints definition is more readable and straightforward, than triggers definition. And more short :-)
Sorry that I got you wrong here. The parsediasql code seems to be older here than sqlite's support
for foreign keys.

Consider adding a bug/report feature request on CPAN

https://rt.cpan.org/Public/Dist/Display.html?Name=Parse-Dia-SQL

or contact the Parse::Dia::SQL developers (unless they're already following things here on the list).

As the new syntax is much closer to how other databases handle foreign keys, it should not be much of an issue to change the syntax.

Regards,

Steffen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]