Question

Ideally something that will work with Oracle, MS SQL Server, MySQL and Posgress.

Was it helpful?

Solution

if you mean common lisp by lisp, then there's cl-rdbms. it is heavily tested on postgres (uses postmodern as the backend lib), it has a toy sqlite backend and it also has an OCI based oracle backend. it supports abstracting away the different sql dialects, has an sql quasi-quote syntax extension installable on e.g. the [] characters.

i'm not sure if it's the best, and i'm biased anyway... :) but we ended up rolling our own lib after using clsql for a while, which is i think the most widely used sql lib for cl.

see cliki page about sql for a further reference.

OTHER TIPS

At the moment there's no open-source library that supports all the SQL backends you mention. CLSQL comes quite close (lacking only support for MS SQL). The alternatives are:

  • CL-RDBMS (which supports Oracle, Postgres through Postmodern and SQLite3)
  • Postmodern (only Postgres).

If you can use a commercial Lisp, you can give a try to CommonSQL included with Lispworks, which supports all the databases you mentioned.

CLSQL looks like the most popular open source library at the moment. Unfortunately, it seems to suffer from bit rot, and the developers had to make some compromises to support all those platforms.

If the RDB backend is not a constraint, then I recommend Postmodern. It is very well documented and has a clean API (and a nice small language compiled to SQL). Also, it is well maintained and small enough to keep being understandable and extensible. It focuses only on Postgres, not trying to be all things for all people.

Allegro Common Lisp has an ODBC library and a MySQL-specific library, both exhaustively documented. I've used the MySQL one; no surprises.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top