Re: [Modeling-users] SQLite adaptor (more buglets)
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2003-08-04 15:23:21
|
Hi, thanks for all the super-quick corrections, and a new release! I believe you have actually fixed everything reported in all the mails (and that needed fixing). Only two unclosed questions, answered below. >> 1. Setting a .cfg, (that sets default adapter to SQLite, and uses the >> interpolation feature of ConfigParser to set the data dir), pointing >> to >> it via MDL_DB_CONNECTIONS_CFG, and running a number of >> things gives an error, e.g: > [...] >> File "/usr/lib/python2.2/ConfigParser.py", line 293, in get >> raise InterpolationError(key, option, section, rawval) >> ConfigParser.InterpolationError: Bad value substitution: >> section: [AuthorBooks] >> option : database >> key : db_data_dir >> rawval : %(db_data_dir)s/db_AuthorBooks.db > > I do not know this interpolation feature, but it seems that you cfg > file is > not syntacticly correct. Ah, yes, sorry about that. What was wrong was that I had the "db_data_dir=..." variable under one of the database names, and not under DEFAULT (in fact was working for one but not the other db). I guess cfg manages namespace scopes (quite nice). [...] >> However, it should be noted that running the test scripts, e.g.: >> % python ./test_EditingContext_Global.py -r -d SQLite >> does create the SQLite db, except that it uses the SQLite.cfg in the >> tests >> dir. > > Yes, that's intended: tests uses their own settings (the .cfg file in > tests/). > >> But, looking at the test scripts, the code used to create the db is >> very >> different >> than the code in the utility script. > > Could you be more specific? On my side, both test_EC_Global*.py 's > reinitDB() and mdl_generate_DB_schema's databaseSchemaWithOptions() > iterate on sql expressions returned by the adaptor's > SchemaGeneration.schemaCreationStatementsForEntities(). Sorry, had looked at the two much too quickly... yes the two are logically equivalent. Thanks, mario |