4 ms·
A few years ago I worked on a similar kind of project as part of my bachelors. We were converting SQL for Oracle to SQL for Microsoft SQL Server. One problem is
by flor1s 9y ago
A few years ago I worked on a similar kind of project as part of my bachelors. We were converting SQL for Oracle to SQL for Microsoft SQL Server. One problem is dealing with features which language A supports and language B doesn't. Another problem is that it is a huge amount of work to match all syntax elements as well as all library usages. In fact, I guess it's not a good thing to say on HackerNews, but isn't it better to just buy a tool which does it for you? It seems like they are available for the author's use case: http://www.ispirer.com/application-conversion/jcl-to-powershell-conversion http://www.ispirer.com/application-conversion/jcl-to-powersh...
- coldtea 9y ago>One problem is dealing with features which language A supports and language B doesn't. That's not a problem with parsers or parser-combinators though. That's a problem with converting from one DB to another.
- yorwba 9y ago> That's a problem with converting from one DB to another. The article is about converting JCL to PowerShell, so I'd say it's related.
- coldtea 9y agoKinda, that's the example the article uses, but the core is about the use of parser-combinators for the job (even the title is "What the heck is a parser-combinator?").
- 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.