gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] address@hidden: Re: gmCfg dependancy on gmPG]


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] address@hidden: Re: gmCfg dependancy on gmPG]
Date: Thu, 26 Feb 2004 14:58:16 +0100
User-agent: Mutt/1.3.22.1i

> Well, one reason for having getFirstMatchingDBSet() was that you don't need 
> to 
> create a connection to the database first.
I realized that and added the lazy import code to those two
wrappers.

> This, in turn, is a requirement to initialize gmCfgSQL. So I would rather say 
> no unless you auto-connect to the backend in gmCfgSQL.__init__(). 
I wonder exactly why I didn't do that in the first place.
Probably exactly because of trying to not depend on "import
gmPG". That needs cleaning up one way or the other IMO.

> I guess that's the only possibility, then. I personally feel that splitting 
> gmCfg in gmCfgFile and cmCfgSQL would be cleaner than adding all these "lazy 
> import" code, but that may be a matter of taste.
It's not that much code, really, but the half-breed
dependancy-or-not on an imported gmPG needs cleanup, I guess.

I'd say moving connection building into gmCfgSQL.__init__()
and do a lazy import in there is the way to go. Your wrappers
still make sense...

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]