5 ms·
SQLite-TUI: A TUI for viewing SQLite databases, written in Go
- mathaou 5y agoHey thanks for posting this! This is my project I started and the goal is to have it be an eventually database agnostic terminal spreadsheet kind of program. Lots planned for the future!
- throwawaybutwhy 5y agoPlease add instructions on how to build it. Looking forward to trying it out!
- mathaou 5y agoI absolutely will as soon as I can! I just started it two days ago and was kind of blown away by the response, so the readme definitely didn't get a lot of attention. I'll remedy that!
- GrayShade 5y agoCloning to `~/go` and running `go build` worked for me. But I can never remember how to build Go projects, so adding more details in the README would be nice.
- unixsheikh 5y agoVery well done! Great project!
- faizshah 5y agoReally cool, I’m a big user of SQLite. Reminds me of visidata but for SQLite: https://github.com/saulpw/visidata https://github.com/saulpw/visidata
- antattack 5y agoVisidata can view SQLite too: https://www.visidata.org/docs/formats/ https://www.visidata.org/docs/formats/
- Crontab 5y agoVery nice!
- mathaou 5y agoThank you!
- thristian 5y ago> NOTE: Mouse controls don't work for remote sessions like serial or SSH. That's weird. I'm having a hard time imagining how it would be possible to break mouse controls over SSH, since the escape sequences used to signal mouse events are transport-agnostic.
- enduku 5y agoMe too. Maybe it is the latency that affected this decision. If the cause for ignoring mouse events is latency, Mosh may be a bit better. https://mosh.org/ https://mosh.org/
- mathaou 5y agoI haven't looked into that one too much, I'll thoroughly test it soon. For whatever reason I only tested Windows ssh, since it's what I use for work. I'll test Linux soon.
- GrayShade 5y agoI just tested it. Mouse works in Linux over SSH, but I'm not really sure how to use the app otherwise (:. And yeah, it crashes on larger databases: panic: runtime error: slice bounds out of range [:-1] goroutine 54 [running]: sqlite3-viewer/viewer.TruncateIfApplicable(0xc02037ef70, {0xc000126038, 0x7}) ~/go/tuitty/viewer/util.go:99 +0x192 sqlite3-viewer/viewer.TuiModel.View.func2(0xc000818f60) ~/go/tuitty/viewer/viewer.go:121 +0xae5 created by sqlite3-viewer/viewer.TuiModel.View ~/go/tuitty/viewer/viewer.go:106 +0x272
- mathaou 5y agoNot sure if your data is not sensitive enough that you'd open an issue and attach it? I'd use it for testing.
- Aeolun 5y agoLarge databases are thousands of rows? My small database already has a few tens of thousands. Who considers a few thousand rows large?
- hanche 5y agoOne person’s small is another person’s large. It all comes down to your typical use cases; no surprise there. I have lots of tiny sqlite databases myself, so for me, a few tens of thousands rows is large. But at least I am well aware that multi-gigabyte sqlite databases can and do exist.
- mathaou 5y agoOptimizations like that will be part of the next alpha release after the one I'm working on.
- Aeolun 5y agoI just honestly cannot imagine how it could start to be slow at a few thousand rows. Calling it an optimization feels wrong somehow. Glad you hear you are planning to look at it though :)
- laumars 5y agoLarger querying larger databases should be a problem for the RDBMS not for the UI wrapper. So I’d wager he is processing every record on the db irrespective of whether it’s visible on screen or not. It would explain the TUI panic posted elsewhere too.
- tanin 5y agoI've built a similar project (backed by Sqlite), though it's full GUI. At work, I work with a lot of CSVs. I often hit the limit of Excel and Google Sheets. Plus, using formula is difficult. The ergonomics around it is also not great (e.g. am I suppose to write long formula in a one-line box at the top?) Eventually, I've decided to create Superintendent that enables me to write SQL on CSVs. I'm working on optimizing it to be faster and faster. Currently, it can load 1GB CSV on Mac Pro 2020 within 10 seconds because it basically goes to C code. I'm looking to make it feel more and more like a spreadsheet (e.g. click to sort, copy row, copy column, edit it directly) while giving focus to SQL writing. I'm loving it so far, but there are still a lot of improvements to be made. If you are interested, please check it out: https://superintendent.app https://superintendent.app
- trevyn 5y agoNot open source? Hard pass. Welcome to 2021.
- pjmlp 5y agoThe supermarket down the street is now taking Git Pull Requests for grocery.
- gizdan 5y agoNow fully automated using SuperMarket X FLOSS tool written in Go.
- pjmlp 5y agoHere is your opportunity to make it happen then, https://www.rewe-digital.com/stellenangebote/649-go-developer-koeln.html https://www.rewe-digital.com/stellenangebote/649-go-develope...
- ergocoder 5y agoThe legend still lives on. We've heard they still goes through shops in their town and shout "Hard pass" to this day.
- mathaou 5y agoHey everyone! Author here. In order to better reflect my future plans for the project, I have rebranded of sorts. It is now called termdbms (suggestions on a better name welcome), because eventually I would like to become database agnostic. MySQL support is planned for the alpha 1.0 release!
- photojosh 5y agoa vote for Postgres here!
- mathaou 5y agoAdded to the list!
- mathaou 5y agohttps://github.com/mathaou/termdbms/ https://github.com/mathaou/termdbms/
- mathaou 5y agoYou will eventually be able to run SQL queries on the database within the application. I hope to blend that with spreadsheet-like user interface so its easy to add or remove rows, columns, values, rename, etc...
- dotancohen 5y agoThank you for your work, this looks terrific for exploring databases that one is unfamiliar with. Like we do when joining an extant project. If there was a nice way to explore the tables that would be great. Such as filter by table name, and show how many records are in each table. Or even a way to show which tables reference other tables.
- mathaou 5y agoI can easily do all those but references and foreign keys. Not even going to think about that until alpha 3.
- mukundesh 5y agoVery nice ! Wish I could build the schema, then this would be Microsoft Access in a terminal !
- mathaou 5y agoI have lots of plans including database creation. It's in its infancy now but 2-3 months from now that should be possible.
- say_it_as_it_is 5y agoThat it was written at all is what matters. Mentioning that it was written in Go simply tells us that it's fast enough for a cli and is a single binary. Yet, many existing python utilities in this class are also fast enough and not backed by a single binary.