Refactor the synth::datasource
module in order to ease the addition of new data sources
#187
juniorbassani
started this conversation in
RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, working on the
synth::datasource
module is not straightforward as it contains a lot of duplicated code. The problem has become more evident with the new proposition to add support to SQLite into Synth #185. Observe how the author of the PR had to create even more duplication in order to fulfill their purpose. I think we should consider refactoring said module. This would streamline the addition of new data sources and reduce the likelihood of bugs caused by copy/paste.On the top of my mind, I would propose the following steps:
DataSource
andRelationalDataSource
). For example, is it possible to require that implementors ofRelationalDataSource
simply provide the SQL query to do some task, e.g., retrieve the primary keys, instead of also having to interact with the database gateway?Please, share your thoughts and ideas!
Beta Was this translation helpful? Give feedback.
All reactions