[odb-users] ODB 1.6.0 released

Boris Kolpackov boris at codesynthesis.com
Tue Oct 4 03:58:47 EDT 2011


Hi,

We have released ODB 1.6.0. The NEWS file entries for this release are
as follows:

  * New concept, view, is a C++ class that embodies a light-weight, read-
    only projection of one or more persistent objects or database tables
    or the result of a native SQL query execution. Some of the common
    applications of views include loading a subset of data members from
    objects or columns from database tables, executing and handling
    results of arbitrary SQL queries, including aggregate queries, as
    well as joining multiple objects and/or database tables using object
    relationships or custom join conditions. For more information refer
    to Chapter 9, "Views" in the ODB manual as well as the 'view' example
    in the odb-examples package.

  * New function, database::erase_query(), allows the deletion of the
    database state of multiple objects matching certain criteria. It uses
    the same query expression as the database::query() function. For more
    information, refer to Section 3.10, "Deleting Persistent Objects" in
    the ODB manual.

  * Support for value wrappers. An ODB value wrapper is a class template
    that wraps a value type or a container. Common examples of wrappers
    are smart pointers, holders, and "optional value" containers such as
    boost::optional. A wrapper can be transparent or it can handle the
    NULL semantics. To allow the easy conversion of value types that do
    not support the NULL semantics into the ones that do, the odb::nullable
    class template has been added. ODB now also includes built-in support for
    std::auto_ptr and std::tr1::shared_ptr smart pointers as value wrappers
    as well as for boost::shared_ptr and QSharedPointer via the Boost and Qt
    profiles. Currently, the NULL semantics is only supported for simple
    values but smart pointers can still be used with composite values and
    containers. For more information, refer to Section 7.3, "NULL Value
    Semantics" in the ODB manual.

  * Support for the boost::optional container in the Boost profile. A data
    member of the boost::optional type is mapped to a column that can have
    a NULL value. For more information, refer to Section 15.3 "Optional
    Library" in the ODB manual.

  * Support for mapping std::vector<char> to the BLOB (or equivalent) types.
    For more information, refer to Chapters 11 (for MySQL), 12 (for SQLite)
    and 13 (for PostgreSQL) in the ODB manual.

  * New option, --table-prefix, allows the specification of a prefix that
    is added to table and index names. For more information, refer to the
    ODB compiler command line interface documentation (man pages).

  * New ODB runtime library interface, odb::connection, represents a
    connection to the database. The primary use case for a connection is to
    execute native statements outside of a transaction. For more information,
    refer to Section 3.5, "Connections" in the ODB manual.

  * Support for multiplexing several transactions on the same thread. For
    more information, refer to Section 3.4, "Transactions" in the ODB
    manual.

  * All the concrete connection classes now have a second constructor which
    allows the creation of a connection instance from an already established
    underlying connection handle. The connection_pool_factory and, in case of
    SQLite, single_connection_factory now have a virtual create() function
    that can be overridden to implement custom connection establishment and
    configuration.

  * The query expression syntax for object pointers and composite values has
    changed. Now, instead of using the scope resolution operator ('::'), the
    member access via a pointer operator (->) is used for object pointers and
    the member access operator (.) is used for composite values. Examples of
    old and new syntax for pointers, old: query<employee>::employer::name,
    new: query<employee>::employer->name. For composites values, old:
    query<employee>::name::first, new: query<employee>::name.first.

  * SQLite ODB runtime now enables foreign key constraints checking by
    default. While this should not affect correct applications, due to
    bugs in SQLite DDL foreign keys support, you may need to temporarily
    disable foreign key constraints checking when re-creating the database
    schema (the sign that you may need to do so is the "foreign key
    constraint failed" exception thrown by the commit() function after the
    call to schema_catalog::create_schema()). For more information, refer
    to Section 12.5.3, "Foreign Key Constraints" in the ODB manual.

  * Support for specifying the client character set for the MySQL database.
    For more information, refer to Section 11.2, "MySQL Database Class" in
    the ODB manual.

  * Object cache maintained by a session no longer distinguishes between
    const and non-const objects. Instead, const objects are treated as
    non-const by casting away constness. For more information on this new
    behavior, refer to Section 9.1, "Object Cache" in the ODB manual.

This version has also been tested with the recently released PostgreSQL 9.1.

We would like to thank everyone who reported bugs, shared test results, or
helped test one of the alpha releases.

Source code and pre-compiled binary packages for this release are available
from the ODB download page:

http://www.codesynthesis.com/products/odb/download.xhtml

SHA1 checksums for the files in this release are as follows:

b52a982fa02ea8f6d1f5aa08c6b3e14d6441fdda  libodb-1.6.0.tar.bz2
46ac4f44d50f337163689686c7b50630a5d596ec  libodb-1.6.0.tar.gz
bf56e3ae9c2e2945eaf3b59ae389d9dfd677ba02  libodb-1.6.0.zip
d54ab619de4b49ae051ea874c4448d20f6063fe1  libodb-boost-1.6.0.tar.bz2
f265040f1fd787e8ab16881f38fd494a28029e12  libodb-boost-1.6.0.tar.gz
9a41f5fceed1b96e182c51c85f5c5e6acbda82d4  libodb-boost-1.6.0.zip
7ff5b7f800ea0bf22db272d66d8ee0a3b801da45  libodb-mysql-1.6.0.tar.bz2
9c2c8a4373e01f2c4eb49985e21f4c0b46d2147e  libodb-mysql-1.6.0.tar.gz
519f905797132bd4142d67b055ad89942e40871c  libodb-mysql-1.6.0.zip
1ad31db0215a39865286647738c675f98d6ad9eb  libodb-pgsql-1.6.0.tar.bz2
8a89a85dd5011de379806a7cea341f87d8ee7058  libodb-pgsql-1.6.0.tar.gz
d7b9187579a9217e158ea064889779d3683d1725  libodb-pgsql-1.6.0.zip
061c3af6108bf471e9a7792ca730a1d37a64efd8  libodb-qt-1.6.0.tar.bz2
b5977e3b9c57c0a56651002b41283b140bc5c05c  libodb-qt-1.6.0.tar.gz
09e41a858116b1d557903a57d3735dd722b02490  libodb-qt-1.6.0.zip
b0b63cf469a521bd61fae32eca9467e02b62af0d  libodb-sqlite-1.6.0.tar.bz2
cdf175bd3741bf8c5a8b218410211f3d1162bbae  libodb-sqlite-1.6.0.tar.gz
e1a2f18777bae40e06c49fb6768c7def13c6e5a0  libodb-sqlite-1.6.0.zip
e66a3667731701ae9853d87444e9c8b1afa4f4ff  libodb-tracer-1.6.0.tar.bz2
829b50907d20a05d8f541fb2e87ed5041db20cbb  libodb-tracer-1.6.0.tar.gz
57816e143d02630a75be808300caddaebd2a0b90  libodb-tracer-1.6.0.zip
128e14bd6cb8730222fc3b382cdb2780882173ca  odb-1.6.0-i686-linux-gnu.tar.bz2
6eb1b1397ca76fa327d2d8d9b83fdb03eca25d51  odb-1.6.0-i686-macosx.tar.bz2
28c21fefc973a97ee7508f81f065bbb48c0902a9  odb-1.6.0-i686-solaris.tar.bz2
171ccb99559a615e0945f38a5e6d769f5714afd6  odb-1.6.0-i686-windows.zip
7bf0c43f087f454af04f2ba3c465bda62ce434c4  odb-1.6.0-sparc-solaris.tar.bz2
b839907c1705c1a75222a0143be62f06db5a5e28  odb-1.6.0.tar.bz2
ae0c8fc402ba984c978e7cdcd0df33cb742fea3e  odb-1.6.0.tar.gz
18c95007d83a9f93bf517337f08063f3f80d548a  odb-1.6.0-x86_64-linux-gnu.tar.bz2
e0b244bc6174bf4563546935017c4f9c975a0646  odb-1.6.0.zip
d15d9f71035d2c9edecfeb73b24c3a809ecffa37  odb-examples-1.6.0.tar.bz2
fda3c66dc755e9e9c52f0e48551b289b2104158c  odb-examples-1.6.0.tar.gz
9eb6e19306bd6b736050b5b6a68f04970e48582d  odb-examples-1.6.0.zip
62b89e9f60865f42ad3d6b7a8ee744e13aa032ea  odb-tests-1.6.0.tar.bz2
35354c115a274508481c263c0180492d65f3629b  odb-tests-1.6.0.tar.gz
4e26c332c01d9fb5e46e688cf93acab72730a276  odb-tests-1.6.0.zip

Enjoy,
	Boris



More information about the odb-users mailing list