doc.txt

SQLite Jens Axel Søgaard

----------------------------------------------------------------------
  _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: <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'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 <http://www.scheme.dk/blog/> for a more elaboarate
example.