You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, the database_connector.DatabaseConnector (and its subclasses) handle support two main functionalities
Starting and maintaining connections to the database
Generating rows from the given input parameters
Due to the current code structure we have the table's name in all classes. However, this might be unnecessary.
Naming of variables and functions regarding underscores before the function's name is inconsistent.
In addition to these functionalities, a DatabaseConnector object is held by all ResultProcessor instances in addition to the PyExperimenter object and creates the log-tables.
Together this leads to the DatabaseConnector code being hard to understand and adapt.
How to fix the problem
This problem should be approached by splitting the connector into Interface classes (for mysql, sqlite,...) and classes that generate the entries.
In addition, it is a goal for an experimenter to only use one connection at a time (currently multiple threads can have connections simultaneously) that inserts, deletes, and modifies numerous table entries at a time.
Another goal is that the functions used for creating tables and fetching data, ... get adapted not to use execute. This is motivated by the goal of using prepared statements for escaping instead of a separate function as mentioned in #61
The text was updated successfully, but these errors were encountered:
Problem in the current code structure
As of now, the
database_connector.DatabaseConnector
(and its subclasses) handle support two main functionalitiesIn addition to these functionalities, a DatabaseConnector object is held by all ResultProcessor instances in addition to the PyExperimenter object and creates the log-tables.
Together this leads to the DatabaseConnector code being hard to understand and adapt.
How to fix the problem
This problem should be approached by splitting the connector into Interface classes (for mysql, sqlite,...) and classes that generate the entries.
In addition, it is a goal for an experimenter to only use one connection at a time (currently multiple threads can have connections simultaneously) that inserts, deletes, and modifies numerous table entries at a time.
Another goal is that the functions used for creating tables and fetching data, ... get adapted not to use execute. This is motivated by the goal of using prepared statements for escaping instead of a separate function as mentioned in #61
The text was updated successfully, but these errors were encountered: