csv-to-sql-insert icon indicating copy to clipboard operation
csv-to-sql-insert copied to clipboard

Code Refactoring: Decoupling / Pass process.args as parameters

Open ahmad-511 opened this issue 1 year ago • 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...)

ahmad-511 avatar Dec 23 '23 06:12 ahmad-511