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