3 ms·
> We were converting SQL for Oracle to SQL for Microsoft SQL Server. I had a similar problem a few months ago with a Golang application that uses Postgres in p
by majewsky 9y ago
> We were converting SQL for Oracle to SQL for Microsoft SQL Server.
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 https://godoc.org/github.com/majewsky/sqlproxy
[2] https://github.com/sapcc/limes/blob/205f9980a41d75fc0315e0acc1e3daeb9853048f/pkg/db/connection.go#L48-L60 https://github.com/sapcc/limes/blob/205f9980a41d75fc0315e0ac...
- SteveBash 9y agoWhy just not use a local postgres instead of sqlite, your case seems like overengineering to me.