---------------------------------------------------------------------- _SQLite_ Jens Axel Søgaard ---------------------------------------------------------------------- ---------------------------------------------------------------------- HISTORY ---------------------------------------------------------------------- 2006-jan-20 First release ---------------------------------------------------------------------- INTRODUCTION ---------------------------------------------------------------------- This package provides a convenient way of writing SQL statements using s-expressions. > (require (planet "sqlite.ss" ("soegaard" "sqlite.plt" 1 0)) > (sql (SELECT ALL (name) FROM (personnel JOIN salaries ON name))) "SELECT ALL name FROM personnel JOIN salaries ON name" The SQL statements SELECT, UPDATE, INSERT, DELETE, and REPLACE as well as SQL expressions are supported. The SQL syntax is checked at compile time in order to give precise error messages: > (sql (SELECT ALL (name) FROM (personnel JOIN salaries ON JOIN name))) [bug icon] SELECT: ::= ( [
[ON ][USING ()]]* exptected in: (JOIN salaries ON JOIN name) All testing were done with the SQLite backend by Jay McCarthy and Noel Welsh's. ---------------------------------------------------------------------- INSTALLATION ---------------------------------------------------------------------- You need to fetch the sqlite3 shared library. On Windows you can use > (require (planet "download-sqlite.scm" ("soegaard" "sqlite.plt" 1 0)) to download libsqlite3.dll. ---------------------------------------------------------------------- EXAMPLES ---------------------------------------------------------------------- See the source files sql.scm and test-sql.scm for examples. Visit also for a more elaboarate example.