Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data SqlValue
- = SqlByteArray (Maybe ByteString)
- | SqlBlankPaddedString (Maybe ByteString)
- | SqlBool (Maybe Bool)
- | SqlInt16 (Maybe Int16)
- | SqlInt32 (Maybe Int32)
- | SqlInt64 (Maybe Int64)
- | SqlFloating (Maybe Double)
- | SqlVarChar (Maybe Text)
- | SqlText (Maybe Text)
- | SqlUUID (Maybe UUID)
- | Unmatched (Oid, Maybe ByteString)
- data QueryError = QueryError {}
- badQueryResultMsg :: [String] -> [SqlValue] -> String
- execSql :: Connection -> ByteString -> [SqlValue] -> IO ()
- execSql' :: Connection -> ByteString -> [SqlValue] -> IO (Maybe Int)
- ioQuery :: Connection -> ByteString -> [SqlValue] -> (InputStream [SqlValue] -> IO a) -> IO a
- ioQuery' :: Connection -> ByteString -> [SqlValue] -> (Maybe Int -> InputStream [SqlValue] -> IO a) -> IO a
- isDuplicateKey :: QueryError -> Maybe ()
- runQuery :: Pool Connection -> ByteString -> [SqlValue] -> IO [[SqlValue]]
- withTransaction :: Connection -> IO a -> IO a
Documentation
Known field types.
badQueryResultMsg :: [String] -> [SqlValue] -> String Source
Format a message indicating a bad query result due to the "shape".
execSql :: Connection -> ByteString -> [SqlValue] -> IO () Source
Execute a query with no result.
execSql' :: Connection -> ByteString -> [SqlValue] -> IO (Maybe Int) Source
Execute a query an return the number of updated rows (if available).
ioQuery :: Connection -> ByteString -> [SqlValue] -> (InputStream [SqlValue] -> IO a) -> IO a Source
Run a query and fold over the results. The action receives an
InputStream
over all the rows in the result.
ioQuery' :: Connection -> ByteString -> [SqlValue] -> (Maybe Int -> InputStream [SqlValue] -> IO a) -> IO a Source
Run a query and fold over the results. The action receives the number of rows affected
and an InputStream
over all the rows in the result.
isDuplicateKey :: QueryError -> Maybe () Source
Is the given query exception a duplicate key exception?
runQuery :: Pool Connection -> ByteString -> [SqlValue] -> IO [[SqlValue]] Source
withTransaction :: Connection -> IO a -> IO a Source
Execute an IO action with an active transaction.