| Copyright | (c) 2011-2012 Leon P Smith |
|---|---|
| License | BSD3 |
| Maintainer | leon@melding-monads.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.PostgreSQL.Simple.LargeObjects
Description
Support for PostgreSQL's Large Objects; see https://www.postgresql.org/docs/9.5/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.
Documentation
loCreat :: Connection -> IO Oid Source #
loImport :: Connection -> FilePath -> IO Oid Source #
loImportWithOid :: Connection -> FilePath -> Oid -> IO Oid Source #
loExport :: Connection -> Oid -> FilePath -> IO () Source #
loWrite :: Connection -> LoFd -> ByteString -> IO Int Source #
loRead :: Connection -> LoFd -> Int -> IO ByteString Source #
loTell :: Connection -> LoFd -> IO Int Source #
loTruncate :: Connection -> LoFd -> Int -> IO () Source #
loClose :: Connection -> LoFd -> IO () Source #
loUnlink :: Connection -> Oid -> IO () Source #
Constructors
| Oid CUInt |
Instances
| Storable Oid # | |
Defined in Database.PostgreSQL.LibPQ.Oid Methods peekElemOff :: Ptr Oid -> Int -> IO Oid pokeElemOff :: Ptr Oid -> Int -> Oid -> IO () peekByteOff :: Ptr b -> Int -> IO Oid pokeByteOff :: Ptr b -> Int -> Oid -> IO () | |
| Read Oid # | |
Defined in Database.PostgreSQL.LibPQ.Oid | |
| Show Oid # | |
| Eq Oid # | |
| Ord Oid # | |
| FromField Oid Source # | oid |
Defined in Database.PostgreSQL.Simple.FromField Methods | |
| ToField Oid Source # | |
Constructors
| ReadMode | |
| WriteMode | |
| AppendMode | |
| ReadWriteMode |
Constructors
| AbsoluteSeek | |
| RelativeSeek | |
| SeekFromEnd |
Instances
| Enum SeekMode # | |
Defined in GHC.Internal.IO.Device | |
| Ix SeekMode # | |
Defined in GHC.Internal.IO.Device | |
| Read SeekMode # | |
Defined in GHC.Internal.IO.Device | |
| Show SeekMode # | |
| Eq SeekMode # | |
| Ord SeekMode # | |
Defined in GHC.Internal.IO.Device | |
| ToCInt SeekMode # | |
Defined in Database.PostgreSQL.LibPQ.Enums | |