$Header: /cvsroot/aolserver/nssqlite3/README,v 1.1.1.1 2005/03/07 04:36:22 dossy Exp $

nssqlite3 -- SQLite v3 database driver module

     * Theory of Operation
     * Known Issues
     * Configuration Options
     * Sample Configuration

  Theory of Operation

   The nssqlite3 module implements the database driver for SQLite v3. It is a
   database driver and therefore must be used in conjunction with the nsdb
   module.

  Known Issues

   None at this time.

  Configuration Options

   The following options are available for configuring the nssqlite3 module:

   +------------------------------------------------------------------------+
   |    Option    |  Type   |    Default    |          Description          |
   |--------------+---------+---------------+-------------------------------|
   |              |         |               | The number of handles in the  |
   |              |         |               | pool for this entry. In order |
   | connections  | integer | N/A           | to determine an appropriate   |
   |              |         |               | value, read File Locking And  |
   |              |         |               | Concurrency In SQLite Version |
   |              |         |               | 3.                            |
   |--------------+---------+---------------+-------------------------------|
   | datasource   | string  | N/A           | Path to the SQLite database   |
   |              |         |               | file on the filesystem.       |
   |--------------+---------+---------------+-------------------------------|
   | driver       | string  | N/A           | Name of a driver as defined   |
   |              |         |               | in the ns/db/drivers section. |
   |--------------+---------+---------------+-------------------------------|
   |              |         |               | Whether to log the full SQL   |
   | logsqlerrors | boolean | false         | statement when an error is    |
   |              |         |               | raised.                       |
   |--------------+---------+---------------+-------------------------------|
   |              |         |               | Max number of seconds when a  |
   |              |         | 600 (10       | connection to the database is |
   | maxidle      | integer | minutes)      | has remained idle (sitting in |
   |              |         |               | the pool) before closing the  |
   |              |         |               | connection.                   |
   |--------------+---------+---------------+-------------------------------|
   |              |         |               | Max number of seconds to keep |
   |              |         |               | a connection to the database  |
   |              |         |               | open. When this time has      |
   |              |         |               | elapsed, the connection will  |
   | maxopen      | integer | 3600 (1 hour) | be marked stale and           |
   |              |         |               | disconnected, causing a       |
   |              |         |               | reconnect the next time the   |
   |              |         |               | handle is fetched from the    |
   |              |         |               | pool.                         |
   |--------------+---------+---------------+-------------------------------|
   | verbose      | boolean | false         | Whether to enable verbose     |
   |              |         |               | logging or not.               |
   +------------------------------------------------------------------------+

  Sample Configuration

 #
 # SQLite v3 -- nssqlite3
 #
 ns_section  "ns/server/${servername}/modules"
 ns_param    nsdb            nsdb.so

 ns_section  "ns/server/${servername}/db"
 ns_param    defaultpool     sqlite3
 ns_param    pools           *

 ns_section  "ns/db/drivers"
 ns_param    sqlite3         nssqlite3.so

 ns_section  "ns/db/pools"
 ns_param    sqlite3         "sqlite3"

 ns_section  "ns/db/pool/sqlite3"
 ns_param    driver          sqlite3
 ns_param    connections     1
 ns_param    datasource      /tmp/sqlite3.db
 ns_param    verbose         off

