kolibri-discuss team mailing list archive
-
kolibri-discuss team
-
Mailing list archive
-
Message #00003
Re: Proposed merge of lp:~asteinlein/kolibri/db-cleanup into lp:kolibri
Good hunt! The bugs in DatabaseFactory are corrected, although by using class_exists() before require() instead of using require_once(). This facilitated further structural cleanup, for instance by making specific connection classes now include their own result set implementation.
The ResultSet interface extends Iterator which already defines the valid() method (as well as current(), next(), etc.). Regarding result set validity: getColumn() is the only method in DatabaseConnection which accesses the result set directly; getObject[s]() passes the result set on to the ObjectBuilder directly which ensures validity itself.
All other readability suggestions and minor tweaks have been implemented. I also caught several other Exception -> DatabaseException cases that have been fixed as well. TODOs related to SQLite should some day be looked over by someone more familiar with SQLite. They work fine now, but we could probably cover more types/cases.
--
https://code.launchpad.net/~asteinlein/kolibri/db-cleanup/+merge/2142
You are subscribed to branch lp:kolibri.