HDBC-sqlite3- Sqlite v3 driver for HDBC

MaintainerJohn Goerzen <jgoerzen@complete.org>




HDBC driver interface for Sqlite 3.x.

Written by John Goerzen, jgoerzen@complete.org


Sqlite3 Basics

connectSqlite3 :: FilePath -> IO ConnectionSource

Connect to an Sqlite version 3 database. The only parameter needed is the filename of the database to connect to.

All database accessor functions are provided in the main HDBC module.

connectSqlite3Raw :: FilePath -> IO ConnectionSource

Connects to a Sqlite v3 database as with connectSqlite3, but instead of converting the supplied FilePath to a C String by performing a conversion to Unicode, instead converts it by simply dropping all bits past the eighth. This may be useful in rare situations if your application or filesystemare not running in Unicode space.

setBusyTimeout :: Connection -> CInt -> IO ()Source

Sets the timeout for a lock before returning a busy error. Give the time in milliseconds.

Sqlite3 Error Consts

sqlite_OK :: IntSource

Successful result

sqlite_ERROR :: IntSource

SQL error or missing database

sqlite_INTERNAL :: IntSource

An internal logic error in SQLite

sqlite_PERM :: IntSource

Access permission denied

sqlite_ABORT :: IntSource

Callback routine requested an abort

sqlite_BUSY :: IntSource

The database file is locked

sqlite_LOCKED :: IntSource

A table in the database is locked

sqlite_NOMEM :: IntSource

A malloc() failed

sqlite_READONLY :: IntSource

Attempt to write a readonly database

sqlite_INTERRUPT :: IntSource

Operation terminated by sqlite_interrupt()

sqlite_IOERR :: IntSource

Some kind of disk I/O error occurred

sqlite_CORRUPT :: IntSource

The database disk image is malformed

sqlite_NOTFOUND :: IntSource

(Internal Only) Table or record not found

sqlite_FULL :: IntSource

Insertion failed because database is full

sqlite_CANTOPEN :: IntSource

Unable to open the database file

sqlite_PROTOCOL :: IntSource

Database lock protocol error

sqlite_EMPTY :: IntSource

(Internal Only) Database table is empty

sqlite_SCHEMA :: IntSource

The database schema changed

sqlite_TOOBIG :: IntSource

Too much data for one row of a table

sqlite_CONSTRAINT :: IntSource

Abort due to constraint violation

sqlite_MISMATCH :: IntSource

Data type mismatch

sqlite_MISUSE :: IntSource

Library used incorrectly

sqlite_NOLFS :: IntSource

Uses OS features not supported on host

sqlite_AUTH :: IntSource

Authorization denied

sqlite_ROW :: IntSource

sqlite_step() has another row ready

sqlite_DONE :: IntSource

sqlite_step() has finished executing