hey thanks for getting back to me

so the jaxb world is completely new to me... unless it's fairly easy to 
read in an xml string (my cfg file) and pass it in, I guess I'm better off 
with the command line tool

which is killing me because I keep getting

Cannot read [my cfg]xml. Error : invalid database address: 
"jdbc:sqlite:[path to sqlite db file here]"

the path I use inside java to open a 
connection Users/bruce/Documents/UCB/new 
dev/data_viewer/sqlite/ceo_template.sqlite works fine

but it seems the syntax the codegenerator needs is different? note the 
space in the path.. I've tried escaping it etc. dont see any examples 
anywhere of people doing this... I think sqlite is the only db to require a 
file path as opposed to a network url

I do have everything in one folder, would love to use a relative path... "
ceo_template.sqlite", "/ceo_template.sqlite" or "./ceo_template.sqlite"

meanwhile I do have the DDL script that created this db handy -- is there a 
way to just work from that? do you suppose sqlite is just too much of a 
hassle in general and I should move to something like derby or H2? I do 
have read in data from sqlite files but that doesnt have to be my internal 
format

ie I could start with a new empty instance of say, H2, run my DDL -- but 
how would I run the codegenerator against an in process db?


anyway sorry bother you with the little stuff

thanks





On Thursday, December 5, 2013 11:16:38 PM UTC-8, Lukas Eder wrote:
>
> Yes you can do that. Except that DefaultConfiguration is an implementation 
> of the jOOQ runtime org.jooq.Configuration interface, whereas the code 
> generator Configuration object is in the org.jooq.util.jaxb package of the 
> jooq-meta-3.2.0.jar file.
>
> You would then run:
>
> test.setConnection(cnx);
> test.run(cfg);
>
> Cheers
> Lukas
>
>
> 2013/12/6 bruce buchanan <[email protected] <javascript:>>
>
>> something like...
>>
>> Class.forName("org.sqlite.JDBC");
>> Connection cnx = DriverManager.getConnection("jdbc:sqlite:" + path);
>> GenerationTool test = new GenerationTool();
>> test.setConnection(cnx);
>> Configuration cfg = new DefaultConfiguration();
>> cfg.data()
>> test.run()
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to