aboutsummaryrefslogtreecommitdiff
path: root/qt/oracle
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-06-27 14:55:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-06-27 14:55:47 +0200
commit5e98aad4b067ece803b75cae7f538565da8661c8 (patch)
tree92bdf22c225e22622dd26c5903da4859155c418e /qt/oracle
parent40e8a72ebd1a8bb475b3bb25f23d8c205dadeb06 (diff)
Add support for mapping posix_time::ptime and QDateTime to DATE Oracle type
Diffstat (limited to 'qt/oracle')
-rw-r--r--qt/oracle/date-time/driver.cxx1
-rw-r--r--qt/oracle/date-time/test.hxx4
2 files changed, 5 insertions, 0 deletions
diff --git a/qt/oracle/date-time/driver.cxx b/qt/oracle/date-time/driver.cxx
index 5b3b51a..20fe9db 100644
--- a/qt/oracle/date-time/driver.cxx
+++ b/qt/oracle/date-time/driver.cxx
@@ -56,6 +56,7 @@ main (int argc, char* argv[])
o.date = t.date ();
o.date_time = t;
+ o.date_time_d = QDateTime (QDate (2012, 6, 27), QTime (14, 17, 05, 0));
o.time = t.time ();
{
diff --git a/qt/oracle/date-time/test.hxx b/qt/oracle/date-time/test.hxx
index 2eb8735..45ccfd9 100644
--- a/qt/oracle/date-time/test.hxx
+++ b/qt/oracle/date-time/test.hxx
@@ -19,6 +19,7 @@ struct object
id == x.id &&
date == x.date &&
date_time == x.date_time &&
+ date_time_d == x.date_time_d &&
time == x.time;
}
@@ -28,6 +29,7 @@ struct object
return
date.isNull () &&
date_time.isNull () &&
+ date_time_d.isNull () &&
time.isNull ();
}
@@ -36,6 +38,8 @@ struct object
QDate date;
QDateTime date_time;
+ #pragma db type("DATE")
+ QDateTime date_time_d;
QTime time;
};