aboutsummaryrefslogtreecommitdiff
path: root/odb/boost/date-time
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-07-19 13:42:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-07-19 13:42:18 +0200
commite0cfcb1f9e9ab1b468189a5ee45c46f7f22bd174 (patch)
treed4befaa7f03ab375c0f70400a034377fa691ffdd /odb/boost/date-time
parentf608bb17cdd1de94006691b73ac9adcf755916ff (diff)
New design for NULL semantics
Now, instead of being specified as part of the SQL type with the type pragma, there are separate null and not_null pragmas. The not_null pragma was used to control NULL-ness of object pointers. Now the two pragmas are used consistently for object pointers and simple values (and in the future will work for composite values and containers).
Diffstat (limited to 'odb/boost/date-time')
-rw-r--r--odb/boost/date-time/mysql/gregorian-mapping.hxx2
-rw-r--r--odb/boost/date-time/mysql/posix-time-mapping.hxx4
-rw-r--r--odb/boost/date-time/sqlite/gregorian-mapping.hxx2
-rw-r--r--odb/boost/date-time/sqlite/posix-time-mapping.hxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/odb/boost/date-time/mysql/gregorian-mapping.hxx b/odb/boost/date-time/mysql/gregorian-mapping.hxx
index 3ebe5e3..7816b9c 100644
--- a/odb/boost/date-time/mysql/gregorian-mapping.hxx
+++ b/odb/boost/date-time/mysql/gregorian-mapping.hxx
@@ -12,6 +12,6 @@
// By default map boost::gregorian::date to MySQL DATE. We use the
// NULL value to represent not_a_date_time.
//
-#pragma db value(boost::gregorian::date) type("DATE")
+#pragma db value(boost::gregorian::date) type("DATE") null
#endif // ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX
diff --git a/odb/boost/date-time/mysql/posix-time-mapping.hxx b/odb/boost/date-time/mysql/posix-time-mapping.hxx
index 257d391..8d083ca 100644
--- a/odb/boost/date-time/mysql/posix-time-mapping.hxx
+++ b/odb/boost/date-time/mysql/posix-time-mapping.hxx
@@ -11,11 +11,11 @@
// By default map boost::posix_time::ptime to MySQL DATETIME. We use
// the NULL value to represent not_a_date_time.
//
-#pragma db value(boost::posix_time::ptime) type("DATETIME")
+#pragma db value(boost::posix_time::ptime) type("DATETIME") null
// By default map boost::posix_time::time_duration to MySQL TIME. We
// use the NULL value to represent not_a_date_time.
//
-#pragma db value(boost::posix_time::time_duration) type("TIME")
+#pragma db value(boost::posix_time::time_duration) type("TIME") null
#endif // ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX
diff --git a/odb/boost/date-time/sqlite/gregorian-mapping.hxx b/odb/boost/date-time/sqlite/gregorian-mapping.hxx
index 0a58a6c..1baffac 100644
--- a/odb/boost/date-time/sqlite/gregorian-mapping.hxx
+++ b/odb/boost/date-time/sqlite/gregorian-mapping.hxx
@@ -11,6 +11,6 @@
// By default map boost::gregorian::date to TEXT. We use the
// NULL value to represent not_a_date_time.
//
-#pragma db value(boost::gregorian::date) type("TEXT")
+#pragma db value(boost::gregorian::date) type("TEXT") null
#endif // ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX
diff --git a/odb/boost/date-time/sqlite/posix-time-mapping.hxx b/odb/boost/date-time/sqlite/posix-time-mapping.hxx
index 69a83df..a0efca0 100644
--- a/odb/boost/date-time/sqlite/posix-time-mapping.hxx
+++ b/odb/boost/date-time/sqlite/posix-time-mapping.hxx
@@ -11,11 +11,11 @@
// By default map boost::posix_time::ptime to TEXT. We use
// the NULL value to represent not_a_date_time.
//
-#pragma db value(boost::posix_time::ptime) type("TEXT")
+#pragma db value(boost::posix_time::ptime) type("TEXT") null
// By default map boost::posix_time::time_duration to TEXT. We
// use the NULL value to represent not_a_date_time.
//
-#pragma db value(boost::posix_time::time_duration) type("TEXT")
+#pragma db value(boost::posix_time::time_duration) type("TEXT") null
#endif // ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX