Version: 1.0

db: Database connectivity

Ryan Culpepper <[email protected]>

A database interface for functional programmers.

 (require (planet ryanc/db:1:0))

This package provides a high-level interface to several database systems. The following database systems are currently supported:
  • PostgreSQL versions 7.4 and later

  • MySQL versions 5 and later

  • SQLite version 3 requires libsqlite3 library

  • ODBC experimental, requires libodbc library

Support for PostgreSQL and MySQL does not rely on any native client libraries; this package is everything you need to connect to a PostgreSQL or MySQL server. SQLite and ODBC support require the appropriate native libraries to be installed.

The query operations are functional in spirit. Queries return results; they do not stow them away in the connection for later manipulation and retrieval. In other words, connections do not contain query state. Connections are internally synchronized, so multiple threads can use a connection simultaneously.

Acknowledgments Thanks to Dave Gurnell, Noel Welsh, Mike Burns, and Doug Orleans for contributions to spgsql, the PostgreSQL-only predecessor of this package. The SQLite support is based in part on code from Jay McCarthy’s sqlite package.

Development Development of this library is hosted by GitHub at the following project page:

https://github.com/rmculpepper/db

Copying This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License and GNU Lesser General Public License for more details.