Closed krsyoung closed 8 years ago
I guess that approach would work. Especially the part with a custom outputter that simply returns its "output" is cool.
@IntractableQuery is also using this as library rather than a standalone tool, I believe, so there might be good reasons to actually rework the code to make this use case easier/simpler. It's just not something I had considered.
Cool, thanks @koppen, will hack around with it and come back here if I come up with something pretty :-) Thanks again!
Hi @koppen, great project! I was thinking of including this in a project as a library (vs CLI). Initial thoughts would be to build-up the
options
hash and then callCsvQuery::Query.new(csv_data, outputter, options).run
It looks like I might need to make a variation of the outputter as well so that it returns an array vs printing to stdout.
Thoughts on the approach or other ideas?