diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-05-23 01:04:07 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-05-23 01:04:07 +0000 |
commit | b14c99d8d6bdb3155fe54e6f24e8aac32a09ed81 (patch) | |
tree | 0b63fc00dfff28c643cfafe587777ab11e5733c5 /src/interfaces/libpq++/pglobject.h | |
parent | 795f6ca66ab734559e6eed7a9466eb19b58f3166 (diff) | |
download | postgresql-b14c99d8d6bdb3155fe54e6f24e8aac32a09ed81.tar.gz postgresql-b14c99d8d6bdb3155fe54e6f24e8aac32a09ed81.zip |
Here it is. Remove or rename the current interfaces/libpq++ and untar
this file in interfaces/
It will all need to be checked in. I used the char *rcsid[] method for
cvs ids so it can be strings | grep'd to find version numbers. The new
version for the library is 3.0.
Run configure from src/ to create the Makefile and it should be good to
go.
I did minimal documentation references in the README, I'll see if I can
get something to Tom Lockhart rather quickly.
Vince.
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. |