Safe Haskell | None |
---|
- data Database
- data Statement
- type Error = Int
- data StepResult
- data SQLData
- = SQLInteger Int64
- | SQLFloat Double
- | SQLText Text
- | SQLBlob ByteString
- | SQLNull
- data ColumnType
- = IntegerColumn
- | FloatColumn
- | TextColumn
- | BlobColumn
- | NullColumn
- open :: String -> IO Database
- close :: Database -> IO ()
- prepare :: Database -> ByteString -> IO Statement
- step :: Statement -> IO StepResult
- reset :: Statement -> IO ()
- finalize :: Statement -> IO ()
- bindParameterCount :: Statement -> IO Int
- bindParameterName :: Statement -> Int -> IO (Maybe String)
- bindBlob :: Statement -> Int -> ByteString -> IO ()
- bindDouble :: Statement -> Int -> Double -> IO ()
- bindInt :: Statement -> Int -> Int -> IO ()
- bindInt64 :: Statement -> Int -> Int64 -> IO ()
- bindNull :: Statement -> Int -> IO ()
- bindText :: Statement -> Int -> Text -> IO ()
- bind :: Statement -> [SQLData] -> IO ()
- column :: Statement -> Int -> IO SQLData
- columns :: Statement -> IO [SQLData]
- unsafeColumns :: Statement -> [Maybe ColumnType] -> IO [SQLData]
Documentation
data ColumnType Source
step :: Statement -> IO StepResultSource
bindParameterCount :: Statement -> IO IntSource
Find the number SQL parameters in a prepared statement.
bindParameterName :: Statement -> Int -> IO (Maybe String)Source
Return the N-th SQL parameter name.
Named parameters are returned as-is. E.g. ":v" is returned as
Just ":v"
. Unnamed parameters, however, are converted to
Nothing
.
Note that the column index starts at 1, not 0.
unsafeColumns :: Statement -> [Maybe ColumnType] -> IO [SQLData]Source