Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

pqxx::LargeObjectAccess Class Reference

Accessor for large object's contents.
Warning:
Still experimental!
More...

#include <largeobject.h>

Inheritance diagram for pqxx::LargeObjectAccess:

pqxx::LargeObject List of all members.

Public Member Functions

 LargeObjectAccess (TransactionItf &T, PGSTD::ios_base::openmode mode=PGSTD::ios_base::in|PGSTD::ios_base::out)
 Create new large object and open it.

 LargeObjectAccess (TransactionItf &T, Oid O, PGSTD::ios_base::openmode mode=PGSTD::ios_base::in|PGSTD::ios_base::out)
 Open large object with given Oid.

 LargeObjectAccess (TransactionItf &T, LargeObject O, PGSTD::ios_base::openmode mode=PGSTD::ios_base::in|PGSTD::ios_base::out)
 Open given large object.

 LargeObjectAccess (TransactionItf &T, const PGSTD::string &File, PGSTD::ios_base::openmode mode=PGSTD::ios_base::in|PGSTD::ios_base::out)
 Import large object from a local file and open it.

 ~LargeObjectAccess ()
void to_file (const char File[]) const
 Export large object's contents to a local file.

void to_file (const PGSTD::string &File) const
 Export large object's contents to a local file.

long cseek (long dest, PGSTD::ios_base::seekdir dir) throw ()
 Seek in large object's data stream.

long cwrite (const char Buf[], size_t Len) throw ()
 Write to large object's data stream.

long cread (char Buf[], size_t Len) throw ()
 Read from large object's data stream.

Oid id () const throw ()
 Object identifier.


Detailed Description

Accessor for large object's contents.
Warning:
Still experimental!


Constructor & Destructor Documentation

pqxx::LargeObjectAccess::LargeObjectAccess TransactionItf   T,
PGSTD::ios_base::openmode    mode = PGSTD::ios_base::in|PGSTD::ios_base::out
[explicit]
 

Create new large object and open it.

Parameters:
T backend transaction in which the object is to be created
mode access mode, defaults to ios_base::in | ios_base::out

pqxx::LargeObjectAccess::LargeObjectAccess TransactionItf   T,
Oid    O,
PGSTD::ios_base::openmode    mode = PGSTD::ios_base::in|PGSTD::ios_base::out
[explicit]
 

Open large object with given Oid.

Convert combination of a transaction and object identifier into a large object identity. Does not affect the database.

Parameters:
T the transaction in which the object is to be accessed
O object identifier for the given object
mode access mode, defaults to ios_base::in | ios_base::out

pqxx::LargeObjectAccess::LargeObjectAccess TransactionItf   T,
LargeObject    O,
PGSTD::ios_base::openmode    mode = PGSTD::ios_base::in|PGSTD::ios_base::out
[explicit]
 

Open given large object.

Open a large object with the given identity for reading and/or writing

Parameters:
T the transaction in which the object is to be accessed
O identity for the large object to be accessed
mode access mode, defaults to ios_base::in | ios_base::out

pqxx::LargeObjectAccess::LargeObjectAccess TransactionItf   T,
const PGSTD::string &    File,
PGSTD::ios_base::openmode    mode = PGSTD::ios_base::in|PGSTD::ios_base::out
 

Import large object from a local file and open it.

Creates a large object containing the data found in the given file.

Parameters:
T the backend transaction in which the large object is to be created
File a filename on the client program's filesystem
mode access mode, defaults to ios_base::in | ios_base::out

pqxx::LargeObjectAccess::~LargeObjectAccess  
 


Member Function Documentation

long pqxx::LargeObjectAccess::cread char    Buf[],
size_t    Len
throw ()
 

Read from large object's data stream.

Does not throw exception in case of error; inspect return value instead.

Parameters:
Buf area where bytes should be stored
Len number of bytes to read

long pqxx::LargeObjectAccess::cseek long    dest,
PGSTD::ios_base::seekdir    dir
throw ()
 

Seek in large object's data stream.

Does not throw exception in case of error; inspect return value instead.

Parameters:
dest offset to go to
dir origin to which dest is relative: ios_base::beg (from beginning of the object), ios_base::cur (from current access position), or ios_base;:end (from end of object)

long pqxx::LargeObjectAccess::cwrite const char    Buf[],
size_t    Len
throw ()
 

Write to large object's data stream.

Does not throw exception in case of error; inspect return value instead.

Parameters:
Buf bytes to write
Len number of bytes to write

Oid pqxx::LargeObject::id   const throw ()
 

Object identifier.

The number returned by this function identifies the large object in the database we're connected to.

void pqxx::LargeObjectAccess::to_file const PGSTD::string &    File const
 

Export large object's contents to a local file.

Writes the data stored in the large object to the given file.

Parameters:
File a filename on the client's filesystem

void pqxx::LargeObjectAccess::to_file const char    File[] const
 

Export large object's contents to a local file.

Writes the data stored in the large object to the given file.

Parameters:
File a filename on the client's filesystem


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 20:47:41 2003 for libpqxx by doxygen1.3-rc3