SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Provides a way to determine whether some given data is NULL
.
More...
#include <rw/db/nullind.h>
Public Member Functions | |
RWDBNullIndicator (bool value=0) | |
operator bool () const | |
RWDBNullIndicator allows application code:
NULL
NULL
when using an RWDBBoundExprAn RWDBNullIndicator instance may be interpreted as a boolean value: true
means a data item is NULL
; false
means a data item is not NULL
.
RWDBNullIndicator is designed specifically to detect NULL
values as they are extracted from an RWDBReader. See RWDBReader for more details.
The setting of RWDBDatabase::emptyStringIsNull can affect the way that empty strings are inserted and read. For more details, see RWDBManager::emptyStringIsNull(bool).
This code fragment selects an integer and a string from a table, and checks for NULL
before processing the results:
|
inline |
Constructs an RWDBNullIndicator with the given initial value.
|
inline |
Returns the current boolean value of self.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |