On 12.Mar.2003 -- 08:23 AM, Geoff Howard wrote: > At 03:39 AM 3/12/2003, you wrote: > >Well, the idea was to make it easy to switch to $MY_FAVOURITE_DBMS for > >the user. I believe a frequently asked question is "how do I make the > >samples work with (MySQL|PostgreSQL|Oracle|DB2|Sybase|Access)?" > > That's why I wouldn't give up too easily on making the db setup work > from a normal sql script. Currently we have the .sql out there, but > I'm not sure it's up to date (though it looks like it), and if it's > not used, it's certainly in danger of getting out of date at some > point. > > Now that the samples are at least working again, how about considering > some options for actually creating the samples "schema" from the .sql? > > - Do it during build? HSQL block build? Database block build? Separate > target? > - Could we have a pipeline to do this that would be the first link > on the database block samples page? Users could provide the db connection > name, which would let them use hsql by default, or any other db they've > already set up.
Apart from providing the connection name, this sounds reasonable. It could be the first link on the db samples page. Providing the connection name would entail that all samples could be switched to it dynamically as well. I wouldn't want that, because it makes the sames more complex than necessary. This would probably be the chance to change the "user" table to e.g. "users" (other suggestions?) so that more DBMSs are happy (PostgreSQL?) But, how to go about it? I reckon we still want this .sql around. Hence we need to parse it and feed it to the DBMS one statement at a time.... Could be read in through the util logicsheet and the string tokenizer using ";" as separator. Don't care about ";" inside of strings :-| > - Other ideas? Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08