Commit 4b06f6f9 authored by Bruce Momjian's avatar Bruce Momjian

I found the following useful - just a way of using PQgetisnull from

libpq++.

Patrick Welche
parent 79434a3d
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.3 1999/06/05 18:05:17 tgl Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.4 1999/09/21 21:19:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -115,6 +115,18 @@ return PQgetvalue(pgResult, tup_num, FieldNum(field_name)); ...@@ -115,6 +115,18 @@ return PQgetvalue(pgResult, tup_num, FieldNum(field_name));
} }
int PgDatabase::GetIsNull(int tup_num, int field_num)
{
return PQgetisnull(pgResult, tup_num, field_num);
}
int PgDatabase::GetIsNull(int tup_num, const char* field_name)
{
return PQgetisnull(pgResult, tup_num, FieldNum(field_name));
}
int PgDatabase::GetLength(int tup_num, int field_num) int PgDatabase::GetLength(int tup_num, int field_num)
{ {
return PQgetlength(pgResult, tup_num, field_num); return PQgetlength(pgResult, tup_num, field_num);
...@@ -126,6 +138,7 @@ int PgDatabase::GetLength(int tup_num, const char* field_name) ...@@ -126,6 +138,7 @@ int PgDatabase::GetLength(int tup_num, const char* field_name)
return PQgetlength(pgResult, tup_num, FieldNum(field_name)); return PQgetlength(pgResult, tup_num, FieldNum(field_name));
} }
int PgDatabase::GetLine(char* string, int length) int PgDatabase::GetLine(char* string, int length)
{ {
return PQgetline(pgConn, string, length); return PQgetline(pgConn, string, length);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* *
* $Id: pgdatabase.h,v 1.2 1999/05/23 01:04:01 momjian Exp $ * $Id: pgdatabase.h,v 1.3 1999/09/21 21:19:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -48,6 +48,8 @@ public: ...@@ -48,6 +48,8 @@ public:
short FieldSize(const char* field_name); short FieldSize(const char* field_name);
const char* GetValue(int tup_num, int field_num); const char* GetValue(int tup_num, int field_num);
const char* GetValue(int tup_num, const char* field_name); const char* GetValue(int tup_num, const char* field_name);
int GetIsNull(int tup_num, int field_num);
int GetIsNull(int tup_num, const char* field_name);
int GetLength(int tup_num, int field_num); int GetLength(int tup_num, int field_num);
int GetLength(int tup_num, const char* field_name); int GetLength(int tup_num, const char* field_name);
void DisplayTuples(FILE *out = 0, int fillAlign = 1, void DisplayTuples(FILE *out = 0, int fillAlign = 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment