by majewsky · 9y ago · 0 comments
I had a similar problem a few months ago with a Golang application that uses Postgres in production, but SQLite for unit tests. Since Go's SQL support has pluggable driver backends, I made a generic proxy driver [1] that can rewrite the incoming query, and used that in my application to rewrite from Postgres to SQLite syntax [2].
[1] https://godoc.org/github.com/majewsky/sqlproxy
[2] https://github.com/sapcc/limes/blob/205f9980a41d75fc0315e0ac...