gitdagray/csv-to-sql-insert

Code Refactoring: Decoupling / Pass process.args as parameters

ahmad-511 opened this issue · 0 comments

Instead of depending on process.args inside both writeSQL and readCSV functions, we can simply pass necessary CLI arguments as function parameters.
This will make it easier to maintain and it will also give priority to the function arguments over the CLI argument which can be useful in case (in a future update) we want to dynamically change the output file name (ex: splitting big data into multiple files such as output_1.sql, output_2.sql...)