summaryrefslogtreecommitdiff
path: root/libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-02-01 20:50:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-02-01 20:50:43 +0300
commit5f1cd97b9727fe10df79e1eb316ff493d9dfc2a9 (patch)
tree3f0d866222115bd1b42cb538efaac2219ef2afa8 /libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx
parentc020bda61fe4a8108772309561d1f8e2f089aec0 (diff)
Turn libodb-qt repository into package for muti-package repositorylibodb-qt
Diffstat (limited to 'libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx')
-rw-r--r--libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx b/libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx
new file mode 100644
index 0000000..32a733a
--- /dev/null
+++ b/libodb-qt/odb/qt/date-time/oracle/default-mapping.hxx
@@ -0,0 +1,29 @@
+// file : odb/qt/date-time/oracle/default-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_QT_DATE_TIME_ORACLE_DEFAULT_MAPPING_HXX
+#define ODB_QT_DATE_TIME_ORACLE_DEFAULT_MAPPING_HXX
+
+#include <QtCore/QDate>
+#include <QtCore/QTime>
+#include <QtCore/QDateTime>
+
+// Map QDate to Oracle DATE by default. QDate provides a null representation
+// so allow NULL values by default.
+//
+#pragma db value(QDate) type("DATE") null
+
+// Map QTime to Oracle INTERVAL DAY(0) TO SECOND(3) by default. QTime can
+// only represent clock times with a maximum precision of milliseconds.
+// QTime provides a null representation so allow NULL values by default.
+//
+#pragma db value(QTime) type("INTERVAL DAY(0) TO SECOND(3)") null
+
+// Map QDateTime to Oracle TIMESTAMP(3) by default. QDateTime can only
+// represent clock times with a maximum precision of milliseconds.
+// QDateTime provides a null representation so allow NULL values by
+// default.
+//
+#pragma db value(QDateTime) type("TIMESTAMP(3)") null
+
+#endif // ODB_QT_DATE_TIME_ORACLE_DEFAULT_MAPPING_HXX