summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS114
1 files changed, 93 insertions, 21 deletions
diff --git a/NEWS b/NEWS
index 0d001db..ab46536 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,31 @@
Version 2.5.0
+ * Database classes are now move-constructible. This means they can be
+ returned by value from functions in C++11 and later.
+
* Support for mapping C++ types as other C++ types. For example:
- #pragma db map type(bool) as(std::string) \
- to((?) ? "true" : "false") from((?) == "true")
+ #pragma db map type(bool) \
+ as(std::string) \
+ to((?) ? "true" : "false") \
+ from((?) == "true")
+
+ See Section 14.8.1, "C++ Type Mapping Pragmas" in the ODB manual for
+ details.
+
+ * Support for custom table definition options in addition to column
+ definition options. For details, refer to Section 14.1.16, "options" in
+ the ODB manual.
+
+ * New helper header, <odb/nested-container.hxx>, provides manual nested
+ container support. For details, see the container-nested example in
+ odb-examples.
- @@ Ref to the manual.
+ * New helper header, <odb/c-array-traits.hxx>, provides optional
+ mapping of C arrays as containers. Note that this mapping is not
+ enabled by default. See instructions inside the header for details.
- * Support for nested object ids. Now the 'id' pragma specifier can optionally
+ * Support for nested object ids. Now the `id` pragma specifier can optionally
include the data member path to the id inside a composite value. For
example:
@@ -15,39 +33,93 @@ Version 2.5.0
std::pair<int, int> p;
Note that one somewhat counter-intuitive aspect of this new feature is
- that the whole member marked with id ('p' in the above example) and not
- just the actual id member ('p.first' in the above example) is treated as
- readonly.
+ that the whole member marked with id (`p` in the above example) and not
+ just the actual id member (p.first in the above example) is treated as
+ read-only.
+
+ Such nested id also cannot be automatically assigned (that is, use the
+ `auto` specifier).
- Such nested id also cannot be automatically assigned ('auto' specifier).
+ To match this support the `inverse` pragma specifier now also allows
+ nested data members.
* Support for defining views as instantiations of C++ class templates,
similar to objects and composite value types.
- * Allow the use of object pointers as map keys. Also remove the restriction
- for map keys and set values to be NOT NULL.
+ * Support for using object pointers as map keys. Also the restriction for map
+ keys and set values to be NOT NULL was removed.
- * New 'points_to' pragma allows the establishment of relationship without
- using object pointers.
+ * New `points_to` pragma allows the establishment of relationships without
+ using object pointers. See Section 14.4.37, "points_to" in the ODB manual
+ for details.
- * The 'inverse' pragma now supports nested data members.
+ * A statement in a view that is prefixed with the /*SELECT*/ comment is
+ recognized and handled as a SELECT statement. This can be used to work
+ around unrecognized SELECT query prefixes.
- * Helper header (<odb/nested-container.hxx>) for nested container emulation.
- It is still fairly experimental and only supports vector<vector<T>>.
+ * Support for ordering virtual data members. For details, see Section
+ 14.4.13, "virtual" in the ODB manual.
- * Database classes are now move-constructible. This means they can be
- returned by value from a function in C++11.
+ * The special (!) placeholder denotes the database instance in the modifier
+ expressions. For details, see Section 14.4.5, "get/set/access" in the
+ ODB manual.
+
+ * Support for bulk operations in PostgreSQL 14 using the new pipeline mode.
+ For details on bulk operations see Section 15.3, "Bulk Database Operations"
+ in the ODB manual. Note that while this functionality requires libpq
+ version 14 or later, it should be usable with PostgreSQL servers version
+ 7.4 or later. The development of this support was sponsored by Qube
+ Research & Technologies Limited.
+
+ * Support for calling PostgreSQL stored procedures and functions. For
+ details and limitations refer to Section 19.7, "PostgreSQL Stored
+ Procedures and Functions" in the ODB manual.
+
+ * New serial_connection_factory in the SQLite runtime.
+
+ This factory can be used when the database access is guaranteed to be
+ serial. See Section 18.3, "SQLite Connection and Connection Factory"
+ in the ODB manual for details.
+
+ * Support for attaching additional SQLite databases to the main database
+ connections (ATTACH DATABASE statement). See Section 18.4, "Attached
+ SQLite Databases" in the ODB manual for details.
* Support for SQLite incremental BLOB/TEXT I/O (the sqlite3_blob_open()
functionality). For details, refer to Section 18.1.3, "Incremental
BLOB/TEXT I/O" in the ODB manual.
- * In PostgreSQL a SELECT statement in a view that is prefixed with the
- /*CALL*/ comment is recognized and handled as a stored procedure call.
+ * Support for mixed auto/manual id assignment in SQLite.
+
+ Now one can do:
+
+ #pragma db id auto
+ odb::nullable<int64_t> id;
+
+ And then set the id to NULL to get auto-assignment or to the actual value
+ to use a manual id.
+
+ * Support for mixed auto/0 id assignment in MySQL.
+
+ Now one can do:
+
+ #pragma db id auto
+ odb::nullable<int64_t> id;
+
+ And then, when used with NO_AUTO_VALUE_ON_ZERO, set the id to NULL to get
+ auto-assignment or to 0 to use 0 as the id.
+
+ * Map string object ids to MySQL VARCHAR(128) instead of 255 to support
+ 4-byte UTF-8.
+
+ This is a backwards-incompatible change in that it may change your schema.
+ To obtain the old behavior you will have to explicitly re-map std::string
+ with the id_type pragma or explicitly specify the database type for each
+ affected id member with the type pragma.
* Due to warnings issued by some compiler, std::auto_ptr is no longer mapped
- as an object pointer or wrapper in the C++11 mode. Use std::unique_ptr
- instead.
+ as an object pointer or wrapper in the C++11 and later modes. Use
+ std::unique_ptr instead.
Version 2.4.0