ceabiodb / biodb

An R package framework for accessing biological and chemical databases and developing or extending new connectors.
GNU Affero General Public License v3.0
11 stars 2 forks source link

Define dynamically the methods enabled by flags in BiodbConn #575

Open pkrog opened 3 years ago

pkrog commented 3 years ago

In BiodbConn some methods form groups belonging to features that are enabled by flag inside definitions.yml. Examples are : downloadable, remote, writable, compound.db, etc. Would it be possible to move these methods by group in specific class or source file, and define them dynamically inside the concrete class at the moment it is instantiated. This would decrease the number of methods defined inside BiodbConn, and allow to extend biodb by easily adding more of these features. When defining those methods dynamically, a check could be made also on implementation of abstract methods (do... methods most of the time) inside the concrete connector class.