Re: [Modeling-users] few misc issues with sqlite adaptor
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2003-08-08 15:14:28
|
On Jeudi, ao=FB 7, 2003, at 23:41, Sebastien Bigaret wrote: > Mario Ruggier <ma...@ru...> wrote: >> a few points, encountered when trying to make a pymodel, >> running the mdl_* scripts, and using SQLite adaptor: >> >> 1. when running mdl_validate_model on a pymodel that >> does not hard-wire an adaptorname: >> >> * Warning(s): >> - Can't find concrete adaptor: can't check SQL types > > True, when it cannot be found they cannot be checked, so we warn the > user. The point I was hinting ;) at is that in this case shouldn't=20 mdl_validate select the adaptor pointed to by the "foremost" cfg file? >> 2. when running mdl_validate_model on a model that >> uses "text" as externalType (using SQLite adaptor): >> >> * Error(s): >> - Invalid SQL type: 'text' (valid for this adaptor: ['char',=20 >> 'date', >> 'varchar', 'timestamp', 'time', 'int', 'integer', 'float', = 'numeric']) > > Should be fixed. Filed as bug 785432. >> 3. When running mdl_* utility scripts, the main cfg (pointed to by = env >> var MDL_DB_CONNECTIONS_CFG) is not taken into account. >> Same goes for when an Adaptorname.cfg is made available in the >> same directory as the pymodel. > > True, no matter where a .cfg is, if it's pointed to by=20 > MDL_DB_CONNECTIONS_CFG > it should taken into account. This is a bug. Ehm, on closer looks I would have to take this back. Generate_db does take this into account. Validate does not... I have not determined of all the cases when it does or does not though... I will file as "mdl_* scripts do not always take=20 .cfg into account", or 785436. In addition to this problem, I feel it would be convenient (and safe) to make it such that either (a) commandline switch to specify a "test" cfg whenever desired, and/or (b) use a local cfg if one is present (by=20 which name?). This to prevent overwriting real db files while testing changed models. >> 4. When running mdl_generate_DB utility script, and specifying a >> --admin-dsn on the command line, and the db name in this dsn is >> different than the db name specified in the pymodel, then an empty >> file with the dsn_db name is created, and a proper sqlite db fis >> created in a file with the pymodel_db name. > > Ok, this could be checked by mdl_generate_DB. Bug 785434. > Could you add bug reports for each of these three items? I'll=20 > probably > look at them this week-end. And thanks for reporting! > > -- S=E9bastien. mario |