YstokSQL is a Common Lisp library for interfacing relational Database via ODBC. It also privides a kind of ORM functionality.

YstokSQL is maintained by Dmitri Ivanov.

Homepage: http://lisp.ystok.ru/ysql/

The implementation is much inspired by Xanalys(R) CommonSQL, but provides only the functional SQL interface. YstokSQL is distributed under a LLGPL style license.

YstokSQL is based on the following open-source implementations:

  • SQL/ODBC module by Paul Meurer,
  • MaiSQL package by Pierre R. Mai.

Later, YstokSQL additionally borrowed some code from:

YstokSQL was tested on LispWorks 4.3-4.4 for Windows against the following DBMSs and ODBC drivers:

  • MS Access (Jet 3.5 and 4.0),
  • Oracle 8.1.7 and 10.1 (InstantClient 10.1 and 10.2),
  • PostgreSQL 8.1 driver 08.02.0103 (http://pgfoundry.org/projects/psqlodbc/),
  • SQLite3 driver 0.71 by Christian Werner (http://www.ch-werner.de/sqliteodbc/),
  • MS SQL Server.
Compatibility with Allegro CL, CLISP, CMUCL, Corman Lisp, MCL, and SBCL is targetable. Major features:
  • Extended bracket syntax.
  • Embedded local-time library.
  • ODBC 3.5 compliance: UNICODE UCS-2, including SQLConnectW and SQL_W... data types, SQL_NUMERIC and SQL_BIGINT.
  • Prepared execution support.
  • Catalog functions.
  • Prefetching via block cursors (more than one row at once).
  • Various cursor operations via SQLSetPos and SQLBulkOperations.
  • ODBC Installer support.

Release 0.3

  • Object-oriented interface in its simplest.
  • The desktop-mixin class covering several Jet database subclasses: access-database, excel-database, etc.
  • Coalescing SQL references to save space.
  • sql-case-exp covering three operators CASE, COND and COALESCE
    (analogous to ODBC IFNULL, Jet's Nz, Oracle's NV).
  • SQL_NUMERIC and SQL_BIGINT types support.

Release 0.4

  • Regression test suite.
  • Set operations UNION, INTERSECT, EXCEPT.
  • Database creation, destroying, and listing functions.