diff options
Diffstat (limited to 'src/interfaces/libpq++/pglobject.h')
-rw-r--r-- | src/interfaces/libpq++/pglobject.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/interfaces/libpq++/pglobject.h b/src/interfaces/libpq++/pglobject.h index 9fcd3449a26..7d7c160583a 100644 --- a/src/interfaces/libpq++/pglobject.h +++ b/src/interfaces/libpq++/pglobject.h @@ -9,8 +9,8 @@ * * Copyright (c) 1994, Regents of the University of California * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pglobject.h,v 1.1 1997/02/13 10:00:35 scrappy Exp $ + * + * $Id: pglobject.h,v 1.2 1999/05/23 01:04:03 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -33,32 +33,30 @@ class PgLargeObject : public PgConnection { private: int pgFd; Oid pgObject; + string loStatus; public: - PgLargeObject(const char* dbName = 0); // use reasonable defaults and create large object - PgLargeObject(Oid lobjId, const char* dbName = 0); // use reasonable defaults and open large object - PgLargeObject(const PgEnv& env, const char* dbName); // create large object - PgLargeObject(const PgEnv& env, const char* dbName, Oid lobjId); // open large object + PgLargeObject(const char* conninfo = 0); // use reasonable defaults and create large object + PgLargeObject(Oid lobjId, const char* conninfo = 0); // use reasonable defaults and open large object ~PgLargeObject(); // close connection and clean up void Create(); void Open(); - void Close() - { if (pgFd >= 0) lo_close(pgConn, pgFd); } - int Read(char* buf, int len) - { return lo_read(pgConn, pgFd, buf, len); } - int Write(const char* buf, int len) - { return lo_write(pgConn, pgFd, (char*)buf, len); } - int LSeek(int offset, int whence) - { return lo_lseek(pgConn, pgFd, offset, whence); } - int Tell() - { return lo_tell(pgConn, pgFd); } + void Close(); + int Read(char* buf, int len); + int Write(const char* buf, int len); + int LSeek(int offset, int whence); + int Tell(); int Unlink(); - Oid Import(const char* filename) { return pgObject = lo_import(pgConn, (char*)filename); } - int Export(const char* filename) { return lo_export(pgConn, pgObject, (char*)filename); } + Oid LOid(); + Oid Import(const char* filename); + int Export(const char* filename); + string Status(); private: void Init(Oid lobjId = 0); }; #endif // PGLOBJ_H + +// sig 11's if the filename points to a binary file. |