Maintainer | leon@melding-monads.com |
---|---|
Safe Haskell | None |
Database.PostgreSQL.Simple.LargeObjects
Description
Support for PostgreSQL's Large Objects; see http://www.postgresql.org/docs/9.1/static/largeobjects.html for more information.
Note that Large Object File Descriptors are only valid within a single
database transaction, so if you are interested in using anything beyond
loCreat
, loCreate
, and loUnlink
, you will need to run the entire
sequence of functions in a transaction. As loImport
and loExport
are simply C functions that call loCreat
, loOpen
, loRead
, and
loWrite
, and do not perform any transaction handling themselves,
they also need to be wrapped in an explicit transaction.
- loCreat :: Connection -> IO Oid
- loCreate :: Connection -> Oid -> IO Oid
- loImport :: Connection -> FilePath -> IO Oid
- loImportWithOid :: Connection -> FilePath -> Oid -> IO Oid
- loExport :: Connection -> Oid -> FilePath -> IO ()
- loOpen :: Connection -> Oid -> IOMode -> IO LoFd
- loWrite :: Connection -> LoFd -> ByteString -> IO Int
- loRead :: Connection -> LoFd -> Int -> IO ByteString
- loSeek :: Connection -> LoFd -> SeekMode -> Int -> IO Int
- loTell :: Connection -> LoFd -> IO Int
- loTruncate :: Connection -> LoFd -> Int -> IO ()
- loClose :: Connection -> LoFd -> IO ()
- loUnlink :: Connection -> Oid -> IO ()
- newtype Oid = Oid CUInt
- data LoFd
- data IOMode
- = ReadMode
- | WriteMode
- | AppendMode
- | ReadWriteMode
- data SeekMode
Documentation
loCreat :: Connection -> IO OidSource
loCreate :: Connection -> Oid -> IO OidSource
loImport :: Connection -> FilePath -> IO OidSource
loImportWithOid :: Connection -> FilePath -> Oid -> IO OidSource
loExport :: Connection -> Oid -> FilePath -> IO ()Source
loWrite :: Connection -> LoFd -> ByteString -> IO IntSource
loRead :: Connection -> LoFd -> Int -> IO ByteStringSource
loSeek :: Connection -> LoFd -> SeekMode -> Int -> IO IntSource
loTell :: Connection -> LoFd -> IO IntSource
loTruncate :: Connection -> LoFd -> Int -> IO ()Source
loClose :: Connection -> LoFd -> IO ()Source
loUnlink :: Connection -> Oid -> IO ()Source
data LoFd
LoFd is a Large Object (pseudo) File Descriptor. It is understood by libpq but not by operating system calls.
data IOMode
Constructors
ReadMode | |
WriteMode | |
AppendMode | |
ReadWriteMode |
data SeekMode
Constructors
AbsoluteSeek | |
RelativeSeek | |
SeekFromEnd |