From 1a7a85f1ebdc9b1392457114ee2718b86120e0a5 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Fri, 22 Jul 2011 10:05:02 +0200 Subject: Add sections to ODB manual for PostgreSQL support of Boost and QT profiles --- doc/manual.xhtml | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/doc/manual.xhtml b/doc/manual.xhtml index c691f12..c5abb3b 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -550,6 +550,7 @@ for consistency. +
15.3.1MySQL Database Type Mapping
15.3.2SQLite Database Type Mapping
15.3.3PostgreSQL Database Type Mapping
@@ -565,7 +566,7 @@ for consistency. -
16.1.1MySQL Database Type Mapping
16.1.2SQLite Database Type Mapping
+ 16.1.3PostgreSQL Database Type Mapping 16.2Smart Pointers Library @@ -575,6 +576,7 @@ for consistency. +
16.4.1MySQL Database Type Mapping
16.4.2SQLite Database Type Mapping
16.4.3PostgreSQL Database Type Mapping
@@ -9124,6 +9126,59 @@ class person will result in the out_of_range exception.

+

15.3.3 PostgreSQL Database Type Mapping

+ +

The following table summarizes the default mapping between the currently + supported Boost date_time types and the PostgreSQL database + types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Boost date_time TypePostgreSQL TypeDefault NULL Semantics
gregorian::dateDATENULL
posix_time::ptimeTIMESTAMPNULL
posix_time::time_durationTIMENULL
+ +

The Boost special value date_time::not_a_date_time is stored + as a NULL value in a PostgreSQL database. + posix_time::ptime values representing the special values + date_time::pos_infin and date_time::neg_infin + are stored as the special PostgreSQL TIMESTAMP values + infinity and -infinity respectively.

+ +

Some valid Boost date-time values cannot be stored in a PostgreSQL + database. The PostgreSQL TIME type represents a clock time, and can + therefore only store positive durations with a total length of time less + than 24 hours. An attempt to persist a + posix_time::time_duration value outside of this range as + PostgreSQL TIME will result in the + value_out_of_range exception. An attempt to persist a + posix_time::time_duration value representing any special + value other than date_time::not_a_date_time as PostgreSQL + TIME will result in the special_value + exception.

+ + @@ -9244,6 +9299,36 @@ class Person are stored as a NULL value if their isNull() member function returns true.

+

16.1.3 PostgreSQL Database Type Mapping

+ +

The following table summarizes the default mapping between the currently + supported basic Qt types and the PostgreSQL database types.

+ + + + + + + + + + + + + + + + + + + + +
Qt TypePostgreSQL TypeDefault NULL Semantics
QStringTEXTNULL
QByteArrayBYTEANULL
+ +

Instances of the QString and QByteArray types + are stored as a NULL value if their isNull() member + function returns true.

+

16.2 Smart Pointers

The smart-ptr sub-profile provides persistence support the @@ -9495,6 +9580,49 @@ class Person epoch) as an SQLite INTEGER will result in the out_of_range exception.

+

16.4.3 PostgreSQL Database Type Mapping

+ +

The following table summarizes the default mapping between the currently + supported Qt date-time types and the PostgreSQL database types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Qt Date Time TypePostgreSQL TypeDefault NULL Semantics
QDateDATENULL
QTimeTIMENULL
QDateTimeTIMESTAMPNULL
+ +

Instances of the QDate, QTime, and + QDateTime types are stored as a NULL value if their + isNull() member function returns true.

+ +

Some valid Qt date-time values cannot be stored in a PostgreSQL database. + An attempt to persist a QDateTime value representing a + negative UNIX time (any point in time prior to the + 1970-01-01 00:00:00 UNIX time epoch) as a PostgreSQL + TIMESTAMP result in the out_of_range + exception.

+ -- cgit v1.1