What does HackerNews think of go-mysql-server?
A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.
One item under "Scope of this project":
Provide a runnable server speaking the MySQL wire protocol, connected to data sources of your choice.
This is incredibly useful for anyone who wants to build their own DB or wrap another datasource so it's queryable via MySQL protocol.
You can define a "virtual" table (schema, how to retrieve rows/columns) and then a MySQL client can connect and execute arbitrary queries on your table (which could just be an API or other source)
This project is an interesting one: https://github.com/dolthub/go-mysql-server that provides a MySQL interface (wire and SQL) to arbitrary "backends" implemented in go.
It's really interesting how compatibility with existing protocols has become an important feature of new databases - there's so much existing tooling that already speaks postgres (or mysql), being able to leverage that is a huge advantage IMO
In JavaScript you've got: Alasql's [3] (this is a large file) and here's another SQLite parser [4].
In Java there's JSQLParser [5] and I think you can access Presto's parser too [6].
[0] https://github.com/dolthub/go-mysql-server
[1] https://github.com/blastrain/vitess-sqlparser
[2] https://github.com/eatonphil/gosql
[3] https://github.com/agershun/alasql/blob/develop/src/alasqlpa...
[4] https://github.com/codeschool/sqlite-parser
Yes, at the moment there's a batch job to download your calendars and convert them into a SQLite DB. Then, all queries are done directly on that concrete DB (read only).
Originally I was using https://github.com/dolthub/go-mysql-server which is quite similar to the virtual table feature (you just provide a struct which implements some getter methods). Unfortunately I found it a bit slow though (it had to call back into my table many times for even simple queries). Might just be a problem with that implementation and not a limitation of virtual tables themselves so thanks for pointing it out!