From 5ad4f467561511175c314018e0b3c6e30a3d145b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Feb 2016 12:13:04 +0200 Subject: Document MySQL DECIMAL mapping --- doc/manual.xhtml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/manual.xhtml b/doc/manual.xhtml index d98474f..2787129 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -19991,6 +19991,24 @@ class object }; +

The only built-in mapping provided for the MySQL DECIMAL + type is to std::string/char[N], for example:

+ +
+#pragma db object
+class object
+{
+  ...
+
+  #pragma db type ("DECIMAL(6,3)")
+  std::string value_;
+};
+  
+ +

You can, however, map DECIMAL to a custom C++ type by + providing a suitable odb::mysql::value_traits + specialization.

+

It is also possible to add support for additional MySQL types, such as geospatial types. For more information, refer to Section 14.8, "Database Type Mapping -- cgit v1.1