Copyright | Copyright (C) 2005-2011 John Goerzen |
---|---|
License | BSD3 |
Maintainer | John Goerzen <jgoerzen@complete.org> |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
HDBC driver interface for Sqlite 3.x.
Written by John Goerzen, jgoerzen@complete.org
- 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 Source
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 Source
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
SQL error or missing database
An internal logic error in SQLite
sqlite_PERM :: Int Source
Access permission denied
Callback routine requested an abort
sqlite_BUSY :: Int Source
The database file is locked
A table in the database is locked
A malloc() failed
Attempt to write a readonly database
sqlite_INTERRUPT :: Int Source
Operation terminated by sqlite_interrupt()
Some kind of disk I/O error occurred
The database disk image is malformed
(Internal Only) Table or record not found
sqlite_FULL :: Int Source
Insertion failed because database is full
Unable to open the database file
Database lock protocol error
(Internal Only) Database table is empty
The database schema changed
Too much data for one row of a table
sqlite_CONSTRAINT :: Int Source
Abort due to constraint violation
Data type mismatch
Library used incorrectly
Uses OS features not supported on host
sqlite_AUTH :: Int Source
Authorization denied
sqlite_ROW :: Int Source
sqlite_step() has another row ready
sqlite_DONE :: Int Source
sqlite_step() has finished executing