Open xiaohan2909 opened 1 year ago
Hi @xiaohan2909, thanks for reaching out. I'm curious to dive into your proposed changes. Would you meanwhile be open to elaborate a bit on what motivated the changes; Specifically, why you were missing an option to load a CSV file as a database? Seeing that this contribution round about doubles the size of this repo's code base, I'd like to understand the motivation thoroughly :relaxed:
Thank you for your reply. I really should explain the reason. In some situations, I need to directly import a large amount of data into SenderDB, which is saved in a CSV file. Due to cross language reasons, the batch addition method(add_items) in the project requires reading the data into a list in Python first, and then converting types before using the methods in C++ to import. So I added the CSV import method in the hope of achieving a more efficient and direct import of a large amount of data. Of course, this function seems a bit redundant because the batch method in the project is sufficient to complete this function. So, I hope to use this submission as a supplement or reference, perhaps a better way is to optimize the batch addition method itself.
Hello, I made some changes to this project, they are as follows:
Cautious: I changed the CmakeList.txt for some new source files were added, but some configs may become different from old, so you may need merge it by hand or repeat this file with your own version.