db: Database connectivity
A database interface for functional programmers.
(require (planet ryanc/db:1:3)) |
PostgreSQL versions 7.4 and later
MySQL versions 5 and later
SQLite version 3 —
requires native library ODBC —
requires ODBC installation
The query operations are functional in spirit: queries return results or raise exceptions rather than stashing their state into a cursor object for later navigation and retrieval. Query parameters and result fields are automatically translated to and from appropriate Racket values. Resources are managed automatically by the garbage collector and via custodians. 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:
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.