sqlite-simple-0.4.19.0: Mid-Level SQLite client library

Copyright | (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne Hellsten
License | BSD3
Maintainer | Janne Hellsten <jjhellst@gmail.com>
Portability | portable
Safe Haskell | None
Language | Haskell2010

Database.SQLite.Simple.Internal

Description

Internal bits. This interface is less stable and can change at any time. In particular this means that while the rest of the sqlite-simple package endeavors to follow the package versioning policy, this module does not. Also, at the moment there are things in here that aren't particularly internal and are exported elsewhere; these will eventually disappear from this module.

Synopsis

- data Connection = Connection {
  - connectionHandle :: !Database
  - connectionTempNameCounter :: !(IORef Word64)
  }
- data ColumnOutOfBounds = ColumnOutOfBounds {
  - errorColumnIndex :: !Int
  }
- data Field = Field {
  - result :: SQLData
  - column :: !Int
  }
- newtype RowParseRO = RowParseRO {
  - nColumns :: Int
  }
- newtype RowParser a = RP {
  - unRP :: ReaderT RowParseRO (StateT (Int, [SQLData]) Ok) a
  }
- gettypename :: SQLData -> ByteString

# Documentation

data Connection #

Connection to an open database.

You can use `connectionHandle` to gain access to the underlying http://hackage.haskell.org/package/direct-sqlite connection. This may be useful if you need to access some direct-sqlite functionality that's not exposed in the sqlite-simple API. This should be a safe thing to do although mixing both APIs is discouraged.

Constructors

Connection |
Fields connectionHandle :: !Database connectionTempNameCounter :: !(IORef Word64)

data ColumnOutOfBounds #

Constructors

ColumnOutOfBounds |
Fields errorColumnIndex :: !Int

#### Instances

Instances details

Exception ColumnOutOfBounds # |
Instance details Defined in Database.SQLite.Simple.Internal Methods toException :: ColumnOutOfBounds -> SomeException # fromException :: SomeException -> Maybe ColumnOutOfBounds # displayException :: ColumnOutOfBounds -> String #
Show ColumnOutOfBounds # |
Instance details Defined in Database.SQLite.Simple.Internal Methods showsPrec :: Int -> ColumnOutOfBounds -> ShowS # show :: ColumnOutOfBounds -> String # showList :: [ColumnOutOfBounds] -> ShowS #
Eq ColumnOutOfBounds # |
Instance details Defined in Database.SQLite.Simple.Internal Methods (==) :: ColumnOutOfBounds -> ColumnOutOfBounds -> Bool # (/=) :: ColumnOutOfBounds -> ColumnOutOfBounds -> Bool #

data Field #

A Field represents metadata about a particular field

Constructors

Field |
Fields result :: SQLData column :: !Int

newtype RowParseRO #

Constructors

RowParseRO |
Fields nColumns :: Int

newtype RowParser a #

Constructors

RP |
Fields unRP :: ReaderT RowParseRO (StateT (Int, [SQLData]) Ok) a

#### Instances

Instances details

Alternative RowParser # |
Instance details Defined in Database.SQLite.Simple.Internal Methods empty :: RowParser a # (<|>) :: RowParser a -> RowParser a -> RowParser a # some :: RowParser a -> RowParser [a] # many :: RowParser a -> RowParser [a] #
Applicative RowParser # |
Instance details Defined in Database.SQLite.Simple.Internal Methods pure :: a -> RowParser a # (<*>) :: RowParser (a -> b) -> RowParser a -> RowParser b # liftA2 :: (a -> b -> c) -> RowParser a -> RowParser b -> RowParser c # (*>) :: RowParser a -> RowParser b -> RowParser b # (<*) :: RowParser a -> RowParser b -> RowParser a #
Functor RowParser # |
Instance details Defined in Database.SQLite.Simple.Internal Methods fmap :: (a -> b) -> RowParser a -> RowParser b # (<$) :: a -> RowParser b -> RowParser a #
Monad RowParser # |
Instance details Defined in Database.SQLite.Simple.Internal Methods (>>=) :: RowParser a -> (a -> RowParser b) -> RowParser b # (>>) :: RowParser a -> RowParser b -> RowParser b # return :: a -> RowParser a #
MonadPlus RowParser # |
Instance details Defined in Database.SQLite.Simple.Internal Methods mzero :: RowParser a # mplus :: RowParser a -> RowParser a -> RowParser a #

gettypename :: SQLData -> ByteString #