[sqlite] Re: Foreign Key utility program for SQLITE

2004-10-12 Thread Cody Pisto
Hi Donald,

Thanks for trying the tool,

fk currently doesnt understand the "CONSTRAINT name" portion of the syntax
try something like

CREATE TABLE ex1(
   a INTEGER PRIMARY KEY,
   b INTEGER REFERENCES ex2(x)
 );

Ill put togeather a new release this week with support for "CONSTRAINT
name" syntax

-Cody

On Tue, 12 Oct 2004 15:14:03 -0400, Griggs, Donald
<[EMAIL PROTECTED]> wrote:
>  
> Hello, Cody! 
>   
> First, thanks so much for contributing to the body of utilities used with
> sqlite. 
>   
> I must confess to be new to databases, so forgive me if I've done something
> stupid here, but even with a tiny test example, I can't seem to get fk.exe
> to output triggers for me. 
>   
> If the following is the sample foreign key sql file, "TEST1.SQL" 
>   
> - 
> CREATE TABLE ex1(
>   a INTEGER PRIMARY KEY,
>   b INTEGER CONSTRAINT fk1 REFERENCES ex2(x)
> );
>  
> CREATE TABLE ex2(
>   x INTEGER PRIMARY KEY,
>   y INTEGER
> );
>  
> Then invoking FK results in only a "BEGIN and COMMIT with no triggers or
> other SQL generated -- as shown below: 
>   
> == 
> 
> fk  BEGIN TRANSACTION; 
>   
> COMMIT; 
> == 
>   
> Is it perhaps easy to see what I might be doing wrong? 
>   
> Thanks in advance for any time you might have given to my problem. 
>   
>  
> 
> Donald Griggs 
> 
> Columbia SC, USA 
> 
> Desk: 803-735-7834 
> 
>   
> 
> Opinions are not necessarily those of Misys Healthcare Systems nor its board
> of directors. 
> 
>   
>


[sqlite] Foreign key constraint trigger generator cleanups

2004-08-20 Thread Cody Pisto
Ive put up a new version of my foreign key constraint trigger generation tool,
the parser now better understands supported syntax, and the way is
better paved to support generating CHECK constraint triggers in the
next release

Download it at:
http://odin.nmxs.com/~cpisto/sqlite_fk.tgz

windows/linux binaries included, public domain source

-Cody