Open TheCedarPrince opened 1 year ago
After all the work we have done within DBConnector.jl @Farreeda , I think we will be able to pursue something like this but it depends on https://github.com/JuliaDatabases/DBConnector.jl/pull/8 and https://github.com/JuliaDatabases/DBConnector.jl/pull/7 being done and also some cleaning up of the repository.
Currently,
GenerateDatabaseDetails
is a bespoke boilerplate function that could be significantly simplified. I think what we could do is break up the function as it stands like this:Into something like this:
Basically, the function
GenerateDatabaseDetails
should accept as an object aDBConnect
object that comes fromDBConnector.jl
. This object should contain information about the type of connection that was made (was it asqlite
connection?PostgreSQL
connection?) andGenerateDatabaseDetails
should then be able to internally set the flavor of SQL being used. Additionally,GenerateTables
can be deprecated -- I'll detail that in another issue.However,
GenerateDatabaseDetails
can still provide additional arguments likeschema
,SQL_type
, etc in case someone needs additional configuration options in the future. But in my mind, this reduces complexity significantly.