-
Notifications
You must be signed in to change notification settings - Fork 163
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
Option to export git log to sqlite #39
Comments
Hey @amitu , What do you thought about this problem? |
The in memory db was to avoid the problem of resyncing. With in memory db its more like The very first thing I tried after installing gitql was to do a It would be vary challenging task to keep the query language be full featured, so passing to sqlite would be a good idea instead of reimplementing every SQL nuance. |
how long would gitql spend to fill in the database in the case of in memory db, @amitu? |
It will depend on the size of the repository. It will take almost the same time as |
We could also try to implement memoization together with taking the latest snapshot. Sounds promising, but we gotta study its viability and speed |
I've create small script in python that export git log to sqlite database file: https://gist.github.com/jcubic/0c7ccae5d764ff61788fc626096e5688 so maybe you can use it instead of implementing option to export to sqlite in gitql. |
and it's pretty fast, it was only slow when I print the log when debugging so if you will import export in gitql it shouldn't be slow. |
That is cool! I will take a look at that later, as I think that our priority for now would be fixing the small bugs on |
No rush and great work on the tool. |
Do you guys think that this is something needed in the tool? As we can show the results as a json, if someone need to that, they can use the json as an input to another script. |
Well. I'm closing this for now based that gitql should not connects with real databases, we can reopen it to think in other tool like jcubic did. Thank you for all the suggestions. |
I agree. But do you think, we can have export to a CSV file. Most databases support exporting a query to a csv file; easier for sharing data to humans. JSON is good for sharing data with other apps, which we already have. |
When this command runs it creates an in memory sqlite database with all tables and throws us in the sqlite3 shell (possibly with --dump, which simply stores the tables in a sqlite db disc based file). This will allow much richer query.
The text was updated successfully, but these errors were encountered: