diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-27 14:55:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-27 14:55:46 +0200 |
commit | 37a46b66c7805a5282cb868773f9d4211c1b11d0 (patch) | |
tree | f975f7215c19ceb60855c145efb1d77296508c38 /doc/manual.xhtml | |
parent | 6aef6b62bbb7c49e958ee4b160687fec1cb18ef7 (diff) |
Add support for mapping posix_time::ptime and QDateTime to DATE Oracle type
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r-- | doc/manual.xhtml | 36 |
1 files changed, 36 insertions, 0 deletions
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 |