doc.txt

SQLite Jens Axel Søgaard

----------------------------------------------------------------------
  _SQLite_                                        Jens Axel Søgaard
----------------------------------------------------------------------
 
----------------------------------------------------------------------
HISTORY
----------------------------------------------------------------------
2006-jan-24  Fixed ? parameter-bug. An '? generated '?' instead of ?.
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: <table-list> ::= 
       (<table> [<join-op> <table>  [ON <expr>][USING (<id-list>)]]*  
       exptected in: (JOIN salaries ON JOIN name)

All testing were done with the SQLite backend by Jay McCarthy and 
Noel Welsh.

----------------------------------------------------------------------
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 
  <http://www.scheme.dk/blog/2007/01/introduction-to-web-development-with.html>
for a more elaboarate example.