| libpqxx
    4.0.1
    | 
Identity of a large object. More...
#include <largeobject.hxx>
 
  
 | 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 std::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. | |
| void | to_file (dbtransaction &T, const std::string &File) const | 
| Export large object's contents to a local file. | |
| void | remove (dbtransaction &T) const | 
| Delete large object from database. | |
| Identity comparisons | |
| These operators compare the object identifiers of large objects. This has nothing to do with the objects' actual contents; use them only for keeping track of containers of references to large objects and such. | |
| 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. | |
| Protected Member Functions | |
| std::string | Reason (int err) const | 
| Static Protected Member Functions | |
| static internal::pq::PGconn *PQXX_PURE | RawConnection (const dbtransaction &T) | 
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.
| typedef long pqxx::largeobject::size_type | 
| pqxx::largeobject::largeobject | ( | ) | throw () | 
Refer to a nonexistent large object (similar to what a null pointer does)
| 
 | explicit | 
Create new large object.
| T | Backend transaction in which the object is to be created | 
References pqxx::oid_none, RawConnection(), and Reason().
| 
 | explicit | 
Wrap object with given oid.
Convert combination of a transaction and object identifier into a large object identity. Does not affect the database.
| O | Object identifier for the given object | 
| pqxx::largeobject::largeobject | ( | dbtransaction & | T, | 
| const std::string & | File | ||
| ) | 
Import large object from a local file.
Creates a large object containing the data found in the given file.
| T | Backend transaction in which the large object is to be created | 
| File | A filename on the client program's filesystem | 
References pqxx::oid_none, RawConnection(), and Reason().
| 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.
| O | Already opened large object to copy identity from | 
| 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.
| bool pqxx::largeobject::operator< | ( | const largeobject & | other | ) | const | 
Compare object identities.
| bool pqxx::largeobject::operator<= | ( | const largeobject & | other | ) | const | 
Compare object identities.
| bool pqxx::largeobject::operator== | ( | const largeobject & | other | ) | const | 
Compare object identities.
| bool pqxx::largeobject::operator> | ( | const largeobject & | other | ) | const | 
Compare object identities.
| bool pqxx::largeobject::operator>= | ( | const largeobject & | other | ) | const | 
Compare object identities.
| 
 | staticprotected | 
References pqxx::transaction_base::conn().
Referenced by largeobject().
| 
 | protected | 
References pqxx::oid_none, and pqxx::internal::strerror_wrapper().
Referenced by largeobject().
| 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.
| T | Transaction in which the object is to be deleted | 
References pqxx::to_string().
| void pqxx::largeobject::to_file | ( | dbtransaction & | T, | 
| const std::string & | File | ||
| ) | const | 
Export large object's contents to a local file.
Writes the data stored in the large object to the given file.
| T | Transaction in which the object is to be accessed | 
| File | A filename on the client's filesystem | 
References pqxx::to_string().
Referenced by pqxx::largeobjectaccess::to_file().