#define DPL_ORM_GENERATOR_H
+#include <boost/optional.hpp>
#include <dpl/string.h>
-#include <dpl/optional.h>
#include <dpl/type_list.h>
#include <dpl/db/sql_connection.h>
#include <dpl/db/orm.h>
#define SQL(...)
#define TABLE_CONSTRAINTS(...)
-#define OPTIONAL(type) DPL::Optional< type >
+#define OPTIONAL(type) boost::optional< type >
#define DATABASE_START(db_name) \
namespace db_name \
{ \
#define CREATE_TABLE(name) std::ostream& name::operator<<(std::ostream& ostr, const RowBase& row) { using ::operator<< ; ostr << STRINGIFY(name) << " (";
#define COLUMN_NOT_NULL(name, type, ...) ostr << " '" << row.name << "'" ;
-#define COLUMN(name, type, ...) ostr << " '" << row.name << "'" ;
+#define COLUMN(name, type, ...) if (!!(row.name)) { ostr << " '" << *(row.name) << "'"; } else { ostr << " '" << "NULL" << "'"; }
#define CREATE_TABLE_END() ostr << " )" ; return ostr; }
#include ORM_GENERATOR_DATABASE_NAME_LOCAL