diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-04 11:22:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-04 11:22:07 +0200 |
commit | c1877f84f3596f67245abe6658b08c050bd1e686 (patch) | |
tree | 57ae8ba5818a752abc763b1510b296a4a46d1ad4 /doc/manual.xhtml | |
parent | e288ee241317773c77d954c8c286f53a963e7c19 (diff) |
NULL handling improvements
Add support for specifying NULL-ness for types with built-in mapping.
Handle Oracle [N]VARCHAR2 and SQLite FLOAT oddities using this mechanism
instead of overriding it at the schema generation level.
Also use the is_null argument that is passed to value_traits::init_image()
to indicate whether the value can be NULL.
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r-- | doc/manual.xhtml | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml index ab0ab65..a1e0360 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -13878,13 +13878,13 @@ class object <tr> <td><code>float</code></td> <td><code>REAL</code></td> - <td><code>NOT NULL</code></td> + <td><code>NULL</code></td> </tr> <tr> <td><code>double</code></td> <td><code>REAL</code></td> - <td><code>NOT NULL</code></td> + <td><code>NULL</code></td> </tr> <tr> @@ -13894,6 +13894,14 @@ class object </tr> </table> + <p>SQLite represents <code>NaN</code> <code>FLOAT</code> values + as <code>NULL</code> values. As a result, columns of the + <code>float</code> and <code>double</code> types are by default + declared as <code>NULL</code>. However, you can override this by + explicitly declaring them as <code>NOT NULL</code> with the + <code>db not_null</code> pragma (<a href="#12.4.6">Section + 12.4.6, "<code>null/not_null</code>"</a>).</p> + <p>The SQLite ODB runtime library also provides support for mapping the <code>std::vector<char></code>, <code>std::vector<unsigned char></code>, @@ -15344,13 +15352,13 @@ class object <p>In Oracle empty <code>VARCHAR2</code> and <code>NVARCHAR2</code> strings are represented as <code>NULL</code> values. As a result, - in the generated schema, columns of these types are declared as - <code>NULL</code> even if explicitly declared as - <code>NOT NULL</code> with the <code>db not_null</code> pragma - (<a href="#12.4.6">Section 12.4.6, "<code>null/not_null</code>"</a>), - except for primary key columns. This also means that for object ids - that are mapped to these Oracle types, an empty string is an invalid - value.</p> + columns of the <code>std::string</code> type are by default declared + as <code>NULL</code> except for primary key columns. However, you + can override this by explicitly declaring them as <code>NOT NULL</code> + with the <code>db not_null</code> pragma (<a href="#12.4.6">Section + 12.4.6, "<code>null/not_null</code>"</a>). This also means that for + object ids that are mapped to these Oracle types, an empty string is + an invalid value.</p> <p>The Oracle ODB runtime library also provides support for mapping the <code>std::string</code> type to the Oracle <code>CHAR</code>, |