32 #ifndef MYSQLPP_NULL_H 
   33 #define MYSQLPP_NULL_H 
   42 extern const std::string null_str;      
 
   52 #if !defined(DOXYGEN_IGNORE) 
   54         template <
typename CannotConvertNullToAnyOtherDataType>
 
   55         operator CannotConvertNullToAnyOtherDataType()
 const 
   57                 return CannotConvertNullToAnyOtherDataType();
 
   59 #endif // !defined(DOXYGEN_IGNORE) 
   96 #if !defined(DOXYGEN_IGNORE) 
   98         static null_type null_is() { 
return null; }
 
  100         static std::ostream& null_ostr(std::ostream& o)
 
  105 #endif // !defined(DOXYGEN_IGNORE) 
  117 #if !defined(DOXYGEN_IGNORE) 
  119         static int null_is() { 
return 0; }
 
  121         static std::ostream& null_ostr(std::ostream& o)
 
  126 #endif // !defined(DOXYGEN_IGNORE) 
  137 #if !defined(DOXYGEN_IGNORE) 
  139         static const char *null_is() { 
return ""; }
 
  141         static std::ostream& null_ostr(std::ostream& o)
 
  146 #endif // !defined(DOXYGEN_IGNORE) 
  169 template <
class Type, 
class Behavior = NullIsNull>
 
  229         operator Type()
 const 
  232                         return Behavior::null_is();
 
  284                         { 
return !(*
this == rhs); }
 
  288                         { 
return !(*
this == rhs); }
 
  295         bool operator <(const Null<Type>& rhs) 
const 
  300                 else if (rhs.is_null) {
 
  304                         return data < rhs.data; 
 
  316 #if !defined(DOXYGEN_IGNORE) 
  320 template <> 
class Null<void>
 
  331         Null(
const null_type&) :
 
  343 #endif // !defined(DOXYGEN_IGNORE) 
  349 template <
class Type, 
class Behavior>
 
  350 inline std::ostream& operator <<(std::ostream& o,
 
  351                 const Null<Type, Behavior>& n)
 
  354                 return Behavior::null_ostr(o);
 
bool operator==(const Null< Type > &rhs) const 
Do equality comparison of two nullable values. 
Definition: null.h:264
Type value_type
Type of the data stored in this object, when it is not equal to SQL null. 
Definition: null.h:183
bool operator<(const Null< Type > &rhs) const 
Do less-than comparison of two nullable values. 
Definition: null.h:295
Null(const null_type &)
Construct a Null equal to SQL null. 
Definition: null.h:216
Null(const Type &x)
Initialize the object with a particular value. 
Definition: null.h:202
Class for objects that define SQL null as 0. 
Definition: null.h:115
Class for objects that define SQL null as a blank C string. 
Definition: null.h:135
The type of the global mysqlpp::null object. 
Definition: null.h:49
Declares the MySQL++-specific exception classes. 
Type data
The object's value, when it is not SQL null. 
Definition: null.h:174
Null()
Default constructor. 
Definition: null.h:189
Null & operator=(const Type &x)
Assign a value to the object. 
Definition: null.h:242
bool operator!=(const Null< Type > &rhs) const 
Do inequality comparison of two nullable values. 
Definition: null.h:283
bool is_null
If set, this object is considered equal to SQL null. 
Definition: null.h:179
Class for holding data from a SQL column with the NULL attribute. 
Definition: null.h:170
Class for objects that define SQL null in terms of MySQL++'s null_type. 
Definition: null.h:94