Database connections as subprocesses
Lassi Kortela 14 Sep 2019 07:30 UTC
Would somebody like to explore a simple generic protocol for sending SQL
and results over a Unix pipe? We could take the existing C libraries for
SQLite, Postgres and MySQL, and write simple driver programs in C to
speak our protocol. Then connect Scheme implementations to those drivers
using their subprocess facilities. I'd like to have this for UpScheme.
It seems that we'll have to send SQL strings over the pipe. The
databases don't expose their native ASTs at all:
* Postgres protocol: <https://www.postgresql.org/docs/current/protocol.html>
* MySQL protocol:
<https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_PROTOCOL.html>