Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

pqxx::largeobject Class Reference

Identity of a large object. More...

#include <largeobject.hxx>

Inheritance diagram for pqxx::largeobject:

pqxx::largeobjectaccess List of all members.

Public Types

typedef long size_type

Public Member Functions

 largeobject () throw ()
 Refer to a nonexistent large object (similar to what a null pointer does).
 largeobject (dbtransaction &T)
 Create new large object.
 largeobject (oid O) throw ()
 Wrap object with given oid.
 largeobject (dbtransaction &T, const PGSTD::string &File)
 Import large object from a local file.
 largeobject (const largeobjectaccess &O) throw ()
 Take identity of an opened large object.
oid id () const throw ()
 Object identifier.
bool operator== (const largeobject &other) const
 Compare object identities.
bool operator!= (const largeobject &other) const
 Compare object identities.
bool operator<= (const largeobject &other) const
 Compare object identities.
bool operator>= (const largeobject &other) const
 Compare object identities.
bool operator< (const largeobject &other) const
 Compare object identities.
bool operator> (const largeobject &other) const
 Compare object identities.
void to_file (dbtransaction &T, const PGSTD::string &File) const
 Export large object's contents to a local file.
void remove (dbtransaction &T) const
 Delete large object from database.

Protected Member Functions

PGSTD::string Reason () const

Static Protected Member Functions

internal::pq::PGconnRawConnection (const dbtransaction &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 as long as the object exists.


Member Typedef Documentation

typedef long pqxx::largeobject::size_type
 


Constructor & Destructor Documentation

pqxx::largeobject::largeobject  )  throw ()
 

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

pqxx::largeobject::largeobject dbtransaction T  )  [explicit]
 

Create new large object.

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

pqxx::largeobject::largeobject oid  O  )  throw () [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 dbtransaction 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 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  )  throw ()
 

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 (or oid_none is returned if we refer to the null object).

bool pqxx::largeobject::operator!= const largeobject other  )  const
 

Compare object identities.

Warning:
Only valid between large objects in the same database.

bool pqxx::largeobject::operator< const largeobject other  )  const
 

Compare object identities.

Warning:
Only valid between large objects in the same database.

bool pqxx::largeobject::operator<= const largeobject other  )  const
 

Compare object identities.

Warning:
Only valid between large objects in the same database.

bool pqxx::largeobject::operator== const largeobject other  )  const
 

Compare object identities.

Warning:
Only valid between large objects in the same database.

bool pqxx::largeobject::operator> const largeobject other  )  const
 

Compare object identities.

Warning:
Only valid between large objects in the same database.

bool pqxx::largeobject::operator>= const largeobject other  )  const
 

Compare object identities.

Warning:
Only valid between large objects in the same database.

internal::pq::PGconn* pqxx::largeobject::RawConnection const dbtransaction T  )  [static, protected]
 

string pqxx::largeobject::Reason  )  const [protected]
 

void pqxx::largeobject::remove dbtransaction T  )  const
 

Delete large object from database.

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

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

void pqxx::largeobject::to_file dbtransaction 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 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 Mon Nov 15 11:28:03 2004 for libpqxx by  doxygen 1.3.9.1