HDBC-sqlite3-2.3.3.1: Sqlite v3 driver for HDBC

CopyrightCopyright (C) 2005-2011 John Goerzen
LicenseBSD3
MaintainerJohn Goerzen <jgoerzen@complete.org>
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Database.HDBC.Sqlite3

Contents

Description

HDBC driver interface for Sqlite 3.x.

Written by John Goerzen, jgoerzen@complete.org

Synopsis

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.

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