From 1a7a85f1ebdc9b1392457114ee2718b86120e0a5 Mon Sep 17 00:00:00 2001
From: Constantin Michael
@@ -565,7 +566,7 @@ for consistency.
15.3.1 MySQL Database Type Mapping
+ 15.3.2 SQLite Database Type Mapping 15.3.3 PostgreSQL Database Type Mapping
+ 16.1.1 MySQL Database Type Mapping
- 16.1.2 SQLite Database Type Mapping 16.1.3 PostgreSQL Database Type Mapping
@@ -575,6 +576,7 @@ for consistency.
16.2 Smart Pointers Library
@@ -9124,6 +9126,59 @@ class person
will result in the 16.4.1 MySQL Database Type Mapping
+ 16.4.2 SQLite Database Type Mapping 16.4.3 PostgreSQL Database Type Mapping out_of_range
exception.
The following table summarizes the default mapping between the currently
+ supported Boost date_time
types and the PostgreSQL database
+ types.
Boost date_time Type |
+ PostgreSQL Type | +Default NULL Semantics |
+
---|---|---|
gregorian::date |
+ DATE |
+ NULL |
+
posix_time::ptime |
+ TIMESTAMP |
+ NULL |
+
posix_time::time_duration |
+ TIME |
+ NULL |
+
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.
isNull()
member
function returns true
.
+ The following table summarizes the default mapping between the currently + supported basic Qt types and the PostgreSQL database types.
+ + +Qt Type | +PostgreSQL Type | +Default NULL Semantics |
+
---|---|---|
QString |
+ TEXT |
+ NULL |
+
QByteArray |
+ BYTEA |
+ NULL |
+
Instances of the QString
and QByteArray
types
+ are stored as a NULL value if their isNull()
member
+ function returns true
.
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.
The following table summarizes the default mapping between the currently + supported Qt date-time types and the PostgreSQL database types.
+ + +Qt Date Time Type | +PostgreSQL Type | +Default NULL Semantics |
+
---|---|---|
QDate |
+ DATE |
+ NULL |
+
QTime |
+ TIME |
+ NULL |
+
QDateTime |
+ TIMESTAMP |
+ NULL |
+
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.