Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out into a library. #12

Closed
kdar opened this issue Feb 6, 2014 · 4 comments
Closed

Factor out into a library. #12

kdar opened this issue Feb 6, 2014 · 4 comments

Comments

@kdar
Copy link

kdar commented Feb 6, 2014

I definitely have a use for this in my own project. It would be nice if textql was a library I could import, and then you would have a textql/textql directory that contained main.go that would import the library and provide a CLI interface to it.

@dinedal
Copy link
Owner

dinedal commented Feb 6, 2014

I agree, this is good practice, and should be done, but am curious as to what you would like to see for an exposed API

@tadev
Copy link

tadev commented Feb 6, 2014

Seems interesting, would be useful indeed.
Something like a basic static query_csv("/path/to/csv",";""select * from tbl where users are idiots")
Or something like this:

csvdb := textql.load("/path/to/csv", ":", true, 2) // where true is for "header" and 2 is the line textql should start at
//then you could do something like this:
userCount = csvdb.query("select count(users) from tbl where users.idiot = 0")

BTW, i love textql and i love you for creating it. Since i know of it i am using it nearly every single day!

@kdar
Copy link
Author

kdar commented Feb 6, 2014

Could also have a LoadStream(), LoadString(), LoadBytes() that would loads from io.Reader, string, and []byte respectively. I feel like other things I would like to do (like creating indexes) could be done with the sql.DB object that is returned.

@dinedal
Copy link
Owner

dinedal commented Dec 16, 2015

This is done for V2, and released

@dinedal dinedal closed this as completed Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants