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

pqxx::LargeObject Class Reference

Identity of a large object. More...

#include <largeobject.h>

Inheritance diagram for pqxx::LargeObject:

pqxx::LargeObjectAccess List of all members.

Public Types

typedef long size_type

Public Member Functions

 LargeObject ()
 Refer to a nonexistent large object (similar to what a null pointer does).

 LargeObject (Transaction_base &T)
 Create new large object.

 LargeObject (Oid O)
 Wrap object with given Oid.

 LargeObject (Transaction_base &T, const PGSTD::string &File)
 Import large object from a local file.

 LargeObject (const LargeObjectAccess &O)
 Take identity of an opened large object.

Oid id () const throw ()
 Object identifier.

bool operator== (const LargeObject &other) const
 Comparison is only valid between large objects in the same database.

bool operator!= (const LargeObject &other) const
 Comparison is only valid between large objects in the same database.

bool operator<= (const LargeObject &other) const
 Comparison is only valid between large objects in the same database.

bool operator>= (const LargeObject &other) const
 Comparison is only valid between large objects in the same database.

bool operator< (const LargeObject &other) const
 Comparison is only valid between large objects in the same database.

bool operator> (const LargeObject &other) const
 Comparison is only valid between large objects in the same database.

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

void remove (Transaction_base &T) const
 Delete large object from database.


Protected Member Functions

PGSTD::string Reason () const

Static Protected Member Functions

PGconn * RawConnection (const Transaction_base &T)

Detailed Description

Identity of a large object.

This class encapsulates the identity of a large object. To access the contents of the object, create a LargeObjectAccess, a largeobject_streambuf, or an ilostream, an olostream or a lostream around the LargeObject.

A LargeObject must be accessed only from within a backend transaction, but the object's identity remains valid.


Member Typedef Documentation

typedef long pqxx::LargeObject::size_type
 


Constructor & Destructor Documentation

pqxx::LargeObject::LargeObject  
 

Refer to a nonexistent large object (similar to what a null pointer does).

pqxx::LargeObject::LargeObject Transaction_base   T [explicit]
 

Create new large object.

Parameters:
T backend transaction in which the object is to be created

pqxx::LargeObject::LargeObject Oid    O [explicit]
 

Wrap object with given Oid.

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

Parameters:
O object identifier for the given object

pqxx::LargeObject::LargeObject Transaction_base   T,
const PGSTD::string &    File
 

Import large object from a local file.

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

pqxx::LargeObject::LargeObject const LargeObjectAccess   O
 

Take identity of an opened large object.

Copy identity of already opened large object. Note that this may be done as an implicit conversion.

Parameters:
O already opened large object to copy identity from


Member Function Documentation

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.

bool pqxx::LargeObject::operator!= const LargeObject &    other const
 

Comparison is only valid between large objects in the same database.

bool pqxx::LargeObject::operator< const LargeObject &    other const
 

Comparison is only valid between large objects in the same database.

bool pqxx::LargeObject::operator<= const LargeObject &    other const
 

Comparison is only valid between large objects in the same database.

bool pqxx::LargeObject::operator== const LargeObject &    other const
 

Comparison is only valid between large objects in the same database.

bool pqxx::LargeObject::operator> const LargeObject &    other const
 

Comparison is only valid between large objects in the same database.

bool pqxx::LargeObject::operator>= const LargeObject &    other const
 

Comparison is only valid between large objects in the same database.

PGconn* pqxx::LargeObject::RawConnection const Transaction_base   T [static, protected]
 

string pqxx::LargeObject::Reason   const [protected]
 

void pqxx::LargeObject::remove Transaction_base   T const
 

Delete large object from database.

As opposed to its low-level equivalent cunlink, this will throw an exception if deletion fails.

Parameters:
T the transaction in which the object is to be deleted

void pqxx::LargeObject::to_file Transaction_base   T,
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:
T the transaction in which the object is to be accessed
File a filename on the client's filesystem


The documentation for this class was generated from the following files:
Generated on Sat May 24 02:03:12 2003 for libpqxx by doxygen1.3-rc3