Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4b06f6f

Browse files
committed
I found the following useful - just a way of using PQgetisnull from
libpq++.Patrick Welche
1 parent79434a3 commit4b06f6f

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

‎src/interfaces/libpq++/pgdatabase.cc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.3 1999/06/05 18:05:17 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.4 1999/09/21 21:19:31 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -115,6 +115,18 @@ return PQgetvalue(pgResult, tup_num, FieldNum(field_name));
115115
}
116116

117117

118+
intPgDatabase::GetIsNull(int tup_num,int field_num)
119+
{
120+
returnPQgetisnull(pgResult, tup_num, field_num);
121+
}
122+
123+
124+
intPgDatabase::GetIsNull(int tup_num,constchar* field_name)
125+
{
126+
returnPQgetisnull(pgResult, tup_num,FieldNum(field_name));
127+
}
128+
129+
118130
intPgDatabase::GetLength(int tup_num,int field_num)
119131
{
120132
returnPQgetlength(pgResult, tup_num, field_num);
@@ -126,6 +138,7 @@ int PgDatabase::GetLength(int tup_num, const char* field_name)
126138
returnPQgetlength(pgResult, tup_num,FieldNum(field_name));
127139
}
128140

141+
129142
intPgDatabase::GetLine(char* string,int length)
130143
{
131144
returnPQgetline(pgConn, string, length);

‎src/interfaces/libpq++/pgdatabase.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 1994, Regents of the University of California
1414
*
1515
*
16-
* $Id: pgdatabase.h,v 1.2 1999/05/23 01:04:01 momjian Exp $
16+
* $Id: pgdatabase.h,v 1.3 1999/09/21 21:19:31 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -48,6 +48,8 @@ class PgDatabase : public PgConnection {
4848
shortFieldSize(constchar* field_name);
4949
constchar*GetValue(int tup_num,int field_num);
5050
constchar*GetValue(int tup_num,constchar* field_name);
51+
intGetIsNull(int tup_num,int field_num);
52+
intGetIsNull(int tup_num,constchar* field_name);
5153
intGetLength(int tup_num,int field_num);
5254
intGetLength(int tup_num,constchar* field_name);
5355
voidDisplayTuples(FILE *out =0,int fillAlign =1,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp