Description
The SQLite3 source provides a CSV vtable module, but it is not part of the amalgamated source. If possible, it would be great if the csv vtable module could be included in the base go-sqlite3
package, along with a related csv
build tag.
This would effectively allow the following SQL:
CREATE VIRTUAL TABLE temp.t1 USING csv(filename='thefile.csv');
SELECT * FROM temp.t1;
Rationale:
It seems disjoint that there are other modules (such as json1
) that are part of the amalgamated source, but that require separate build tags to enable. I understand this is likely due to a want to keep the build times as low as possible, and thus disabling extraneous features, but for completeness sake, the other base/core modules (those that have .html
documentation) should at least be available via build tags.
I am happy to create a separate repository and connect up the CSV module that way, but considering how widely CSV is used, it would make sense for SQLite's core/original CSV be packaged with this repository. As such, I would be more than willing to do the work to get the csv module added to the code, and submit a proper pull request, however I would like to get a "thumbs up" before embarking on any work. If including the csv module directly is out of the question, I will just create a separate repository and connect using the appropriate hooks.
(note: I am working on some advanced features for github.com/knq/usql and would like CSV to be natively available for sqlite databases)
(btw, @mattn thanks for all your amazing Go code/repositories....!)