HDBC-sqlite3-2.1.0.2: Sqlite v3 driver for HDBCContentsIndex
Database.HDBC.Sqlite3
Portabilityportable
Stabilityprovisional
MaintainerJohn Goerzen <jgoerzen@complete.org>
Contents
Sqlite3 Basics
Sqlite3 Error Consts
Description

HDBC driver interface for Sqlite 3.x.

Written by John Goerzen, jgoerzen@complete.org

Synopsis
connectSqlite3 :: FilePath -> IO Connection
connectSqlite3Raw :: FilePath -> IO Connection
data Connection
setBusyTimeout :: Connection -> CInt -> IO ()
sqlite_OK :: Int
sqlite_ERROR :: Int
sqlite_INTERNAL :: Int
sqlite_PERM :: Int
sqlite_ABORT :: Int
sqlite_BUSY :: Int
sqlite_LOCKED :: Int
sqlite_NOMEM :: Int
sqlite_READONLY :: Int
sqlite_INTERRUPT :: Int
sqlite_IOERR :: Int
sqlite_CORRUPT :: Int
sqlite_NOTFOUND :: Int
sqlite_FULL :: Int
sqlite_CANTOPEN :: Int
sqlite_PROTOCOL :: Int
sqlite_EMPTY :: Int
sqlite_SCHEMA :: Int
sqlite_TOOBIG :: Int
sqlite_CONSTRAINT :: Int
sqlite_MISMATCH :: Int
sqlite_MISUSE :: Int
sqlite_NOLFS :: Int
sqlite_AUTH :: Int
sqlite_ROW :: Int
sqlite_DONE :: Int
Sqlite3 Basics
connectSqlite3 :: FilePath -> IO Connection

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 Connection
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.
data Connection
show/hide Instances
setBusyTimeout :: Connection -> CInt -> IO ()
Sets the timeout for a lock before returning a busy error. Give the time in milliseconds.
Sqlite3 Error Consts
sqlite_OK :: Int
Successful result
sqlite_ERROR :: Int
SQL error or missing database
sqlite_INTERNAL :: Int
An internal logic error in SQLite
sqlite_PERM :: Int
Access permission denied
sqlite_ABORT :: Int
Callback routine requested an abort
sqlite_BUSY :: Int
The database file is locked
sqlite_LOCKED :: Int
A table in the database is locked
sqlite_NOMEM :: Int
A malloc() failed
sqlite_READONLY :: Int
Attempt to write a readonly database
sqlite_INTERRUPT :: Int
Operation terminated by sqlite_interrupt()
sqlite_IOERR :: Int
Some kind of disk I/O error occurred
sqlite_CORRUPT :: Int
The database disk image is malformed
sqlite_NOTFOUND :: Int
(Internal Only) Table or record not found
sqlite_FULL :: Int
Insertion failed because database is full
sqlite_CANTOPEN :: Int
Unable to open the database file
sqlite_PROTOCOL :: Int
Database lock protocol error
sqlite_EMPTY :: Int
(Internal Only) Database table is empty
sqlite_SCHEMA :: Int
The database schema changed
sqlite_TOOBIG :: Int
Too much data for one row of a table
sqlite_CONSTRAINT :: Int
Abort due to constraint violation
sqlite_MISMATCH :: Int
Data type mismatch
sqlite_MISUSE :: Int
Library used incorrectly
sqlite_NOLFS :: Int
Uses OS features not supported on host
sqlite_AUTH :: Int
Authorization denied
sqlite_ROW :: Int
sqlite_step() has another row ready
sqlite_DONE :: Int
sqlite_step() has finished executing
Produced by Haddock version 2.4.2