diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | doc/manual.xhtml | 36 |
2 files changed, 40 insertions, 0 deletions
@@ -5,6 +5,10 @@ Version 2.1.0 thread. For more information, refer to Chapter 10, "Session" in the ODB manual. + * Support for mapping boost::posix_time::ptime and QDateTime to the DATE + Oracle type. For more information, refer to Sections 19.4.4 (Boost) and + 20.4.4 (Qt) in the ODB manual. + Version 2.0.0 * Support for C++11. The newly supported C++11 standard library components diff --git a/doc/manual.xhtml b/doc/manual.xhtml index 73b4e61..095f540 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -16114,6 +16114,24 @@ class person <p>The Boost special value <code>date_time::not_a_date_time</code> is stored as a <code>NULL</code> value in an Oracle database.</p> + <p>The <code>date-time</code> sub-profile implementation also provides + support for mapping <code>posix_time::ptime</code> to the + <code>DATE</code> Oracle type with fractional seconds that may be + stored in a <code>ptime</code> instance being ignored. This + alternative mapping has to be explicitly requested using the + <code>db type</code> pragma (<a href="#12.4.3">Section 12.4.3, + "<code>type</code>"</a>), as shown in the following example:</p> + + <pre class="cxx"> +#pragma db object +class person +{ + ... + #pragma db type("DATE") + boost::posix_time::ptime updated_; +}; + </pre> + <p>Some valid Boost date-time values cannot be stored in an Oracle database. An attempt to persist a <code>gregorian::date</code>, <code>posix_time::ptime</code>, or @@ -16836,6 +16854,24 @@ class Person <code>QDateTime</code> types are stored as a NULL value if their <code>isNull()</code> member function returns true.</p> + <p>The <code>date-time</code> sub-profile implementation also provides + support for mapping <code>QDateTime</code> to the + <code>DATE</code> Oracle type with fractional seconds that may be + stored in a <code>QDateTime</code> instance being ignored. This + alternative mapping has to be explicitly requested using the + <code>db type</code> pragma (<a href="#12.4.3">Section 12.4.3, + "<code>type</code>"</a>), as shown in the following example:</p> + + <pre class="cxx"> +#pragma db object +class person +{ + ... + #pragma db type("DATE") + QDateTime updated_; +}; + </pre> + <h3><a name="20.4.5">20.4.5 SQL Server Database Type Mapping</a></h3> <p>The following table summarizes the default mapping between the currently |