nssqlite3

## nssqlite3 -- SQLite v3 database driver module

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

- 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
--- | --- | --- | ---
connections | integer | N/A | The number of handles in the pool for this entry. In order 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.
logsqlerrors | boolean | false | Whether to log the full SQL statement when an error is raised.
maxidle | integer | 600 (10 minutes) | Max number of seconds when a connection to the database is has remained idle (sitting in the pool) before closing the connection.
maxopen | integer | 3600 (1 hour) | Max number of seconds to keep a connection to the database open. When this time has elapsed, the connection will 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