#include <largeobject.h>
Inheritance diagram for pqxx::largeobjectaccess:
Public Types | |
typedef long | off_type |
typedef size_type | pos_type |
typedef PGSTD::ios::openmode | openmode |
Open mode: in, out (can be combined with the "or" operator). | |
typedef PGSTD::ios::seekdir | seekdir |
Seek direction: beg, cur, end. | |
typedef long | size_type |
Public Member Functions | |
largeobjectaccess (dbtransaction &T, openmode mode=PGSTD::ios::in|PGSTD::ios::out) | |
Create new large object and open it. | |
largeobjectaccess (dbtransaction &T, oid O, openmode mode=PGSTD::ios::in|PGSTD::ios::out) | |
Open large object with given oid. | |
largeobjectaccess (dbtransaction &T, largeobject O, openmode mode=PGSTD::ios::in|PGSTD::ios::out) | |
Open given large object. | |
largeobjectaccess (dbtransaction &T, const PGSTD::string &File, openmode mode=PGSTD::ios::in|PGSTD::ios::out) | |
Import large object from a local file and open it. | |
~largeobjectaccess () | |
void | to_file (const PGSTD::string &File) const |
Export large object's contents to a local file. | |
void | write (const char Buf[], size_type Len) |
Write data to large object. | |
void | write (const PGSTD::string &Buf) |
Write string to large object. | |
size_type | read (char Buf[], size_type Len) |
Read data from large object. | |
size_type | seek (size_type dest, seekdir dir) |
Seek in large object's data stream. | |
pos_type | cseek (off_type dest, seekdir dir) throw () |
Seek in large object's data stream. | |
off_type | cwrite (const char Buf[], size_type Len) throw () |
Write to large object's data stream. | |
off_type | cread (char Buf[], size_type Len) throw () |
Read from large object's data stream. | |
oid | id () const throw () |
Object identifier. |
|
|
|
Open mode: in, out (can be combined with the "or" operator). According to the C++ standard, these should be in std::ios_base. We take them from std::ios instead, which should be safe because it inherits the same definition, to accomodate gcc 2.95 & 2.96. |
|
|
|
Seek direction: beg, cur, end. According to the C++ standard, these should be in std::ios_base. We take them from std::ios instead, which should be safe because it inherits the same definition, to accomodate gcc 2.95 & 2.96. |
|
|
|
Create new large object and open it.
|
|
Open large object with given oid. Convert combination of a transaction and object identifier into a large object identity. Does not affect the database.
|
|
Open given large object. Open a large object with the given identity for reading and/or writing
|
|
Import large object from a local file and open it. Creates a large object containing the data found in the given file.
|
|
|
|
Read from large object's data stream. Does not throw exception in case of error; inspect return value and errno instead. Returns number of bytes actually read, or -1 if an error occurred.
|
|
Seek in large object's data stream. Does not throw exception in case of error; inspect return value and errno instead. Returns new position in large object, or -1 if an error occurred.
|
|
Write to large object's data stream. Does not throw exception in case of error; inspect return value and errno instead. Returns number of bytes actually written, or -1 if an error occurred.
|
|
Object identifier. The number returned by this function identifies the large object in the database we're connected to. |
|
Read data from large object. Returns the number of bytes read, which may be less than the number of bytes requested if the end of the large object is reached. Throws an exception if an error occurs while reading.
|
|
Seek in large object's data stream. Returns the new position in the large object. Throws an exception if an error occurs. |
|
Export large object's contents to a local file. Writes the data stored in the large object to the given file.
|
|
Write string to large object. If not all bytes could be written, an exception is thrown.
|
|
Write data to large object. If not all bytes could be written, an exception is thrown.
|