1 /*-------------------------------------------------------------------------
7 * declaration of the PGlobj class.
8 * PGlobj encapsulates a large object interface to Postgres backend
10 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
11 * Portions Copyright (c) 1994, Regents of the University of California
14 * $Id: pglobject.h,v 1.7 2001/05/09 17:29:10 momjian Exp $
16 *-------------------------------------------------------------------------
22 #ifndef PGCONNECTION_H
23 #include "pgconnection.h"
26 #ifdef HAVE_NAMESPACE_STD
33 // ****************************************************************
35 // PgLargeObject - a class for accessing Large Object in a database
37 // ****************************************************************
38 class PgLargeObject : public PgConnection {
42 PGSTD string loStatus;
43 void Init(Oid lobjId = 0);
46 explicit PgLargeObject(const char* conninfo = 0); // use reasonable defaults and create large object
47 explicit PgLargeObject(Oid lobjId, const char* conninfo = 0); // use reasonable defaults and open large object
48 ~PgLargeObject(); // close connection and clean up
53 int Read(char* buf, int len);
54 int Write(const char* buf, int len);
55 int LSeek(int offset, int whence);
59 Oid Import(const char* filename);
60 int Export(const char* filename);
61 PGSTD string Status() const;
64 // We don't support copying of PgLargeObject objects,
65 // so make copy constructor and assignment op private.
66 PgLargeObject(const PgLargeObject&);
67 PgLargeObject& operator= (const PgLargeObject&);
71 #ifdef HAVE_NAMESPACE_STD