mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
I found the following useful - just a way of using PQgetisnull from
libpq++. Patrick Welche
This commit is contained in:
parent
79434a3d54
commit
4b06f6f9c8
@ -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));
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
|||||||
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 @@
|
|||||||
* 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:
|
|||||||
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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user