[odb-users] ODB 2.0.0 released

Boris Kolpackov boris at codesynthesis.com
Wed May 2 04:20:19 EDT 2012


Hi,

We have released ODB 2.0.0. Besides major new features, this release also
includes a few backwards-incompatible changes (thus the major version
increment; see below for details). The NEWS file entries for this release
are as follows:

  * Support for C++11. The newly supported C++11 standard library components
    include:
      - std::unique_ptr as object pointer or value wrapper
      - odb::lazy_unique_ptr lazy counterpart
      - std::shared_ptr/weak_ptr as object pointer or value wrapper
      - odb::lazy_shared_ptr/lazy_weak_ptr lazy counterparts
      - support for array, forward_list, and unordered containers
      - connection factory can be passed to the database constructor as
        std::unique_ptr instead of std::auto_ptr

    The ODB compiler now recognizes the --std option. Valid values for this
    option are 'c++98' (default) and 'c++11'. In the runtime libraries the
    C++11 support is header-only which means that the same build of a runtime
    library can be used in both the C++98 and C++11 modes. On UNIX, the tests
    and examples can be compiled in the C++11 mode by passing the necessary
    options to turn the C++ compiler into this mode (e.g., -std=c++0x GCC
    option). On Windows, the tests and examples are always built in the C++11
    mode with VC++ 10 and later. The new 'c++11' example in the odb-examples
    package shows ODB support for some of the C++11 features.

  * Support for polymorphism. Now a persistent class hierarchy can be
    declared polymorphic which makes it possible to persist, load, update,
    erase, and query objects of derived classes using their base class
    interfaces. For more information, refer to Chapter 8, "Inheritance" in
    the ODB manual as well as the 'inheritance/polymorphism' example in the
    odb-examples package.

  * Support for composite object ids. Now a composite value type can be used
    to declare an object id member. For more information, refer to Section
    7.2.1, "Composite Object Ids" in the ODB manual as well as the 'composite'
    example in the odb-examples package.

  * Support for the NULL value semantics for composite values. For more
    information, refer to Section 7.3, "Pointers and NULL Value Semantics"
    in the ODB manual.

  * New schema format (--schema-format), 'separate', allows the generation
    of the schema creation code into a separate C++ source file (called
    '<name>-schema.cxx' by default). This value is primarily useful if you
    want to place the schema creation functionality into a separate program
    or library.

  * New namespace-level pragmas: table, pointer. The table pragma specifies
    the table prefix that is added to table names for all the persistent
    classes inside a namespace. The pointer pragma specifies the default
    pointer type to be used for persistent classes and views inside a
    namespace. For more information, refer to Section 12.5.1, "pointer" and
    Section 12.5.2, "table" in the ODB manual.

  * Session support is now optional and is disabled by default. This is a
    backwards-incompatible change. Session support can be enabled on the
    per class basis or at the namespace level using the new session pragma.
    It can also be enabled by default for all the persistent classes using
    the --generate-session ODB compiler option. Thus, to get the old behavior
    where all the objects were session-enabled, simply add --generate-session
    to your ODB compiler command line. For more information, refer to Chapter
    10, "Session" in the ODB manual.

  * The semantics of the database operations callbacks has changed with
    respect to object const-ness. This is a backwards-incompatible change.
    Now the callback function for the *_persist, *_update, and *_erase events
    is always called on the constant object reference while for the *_load
    events -- always on the unrestricted reference. For more information,
    refer to Section 12.1.7, "callback" in the ODB manual.

  * New function, transaction::reset(), allows the reuse of the same
    transaction instance to complete several database transactions. For more
    information, refer to Section 3.4, "Transactions" in the ODB manual.

  * New exception, odb::session_required, is thrown when ODB detects that
    correctly loading a bidirectional object relationship requires a session
    but one is not used. For more information, refer to Section 6.2,
    "Bidirectional Relationships" in the ODB manual.

Additionally, this release includes a number of bug fixes and performance
improvements in the database-specific runtimes. We have also added GCC 4.7
and Clang 3.0 to the list of compilers that we use for testing each release.
Specifically, the ODB compiler has been updated to be compatible with with
the GCC 4.7 series plugin API. For the complete list of compilers that were
used to test this release, refer to the ODB Platforms and Compilers page:

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

With this release we are also introducing a change to the ODB licensing
terms. In addition to all the licensing options we currently have (open
source and commercial proprietary licenses) we now offer a free proprietary
license for small object models. This license allows you to use ODB in a
proprietary (closed-source) application free of charge and without any of
the GPL restrictions provided that the amount of the generated database
support code does not exceed 10,000 lines. The ODB compiler now includes
the --show-sloc command line option that can be used to show the amount of
code being generated. For more information on the free proprietary license,
including a Q&A section, refer to the ODB Licensing page:

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

A more detailed discussion of these features and changes can be found in
the following blog post:

http://www.codesynthesis.com/~boris/blog/2012/05/02/odb-2-0-0-released/

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:

4717e5294249f5bde1e77d9476dd6bc4370a0045  libodb-2.0.0.tar.bz2
45cc815f5dd62f07598d60df46365d6f04b5783a  libodb-2.0.0.tar.gz
273ddc2e11880671200a0a70f62a4835a7d90827  libodb-2.0.0.zip
c86f8fa7af2fa74906930ef5333fad62ecd2c728  libodb-boost-2.0.0.tar.bz2
cab3b75d9ed01c875587ad93d204b76b42f1baa8  libodb-boost-2.0.0.tar.gz
057c55221968cc5d7999bf91a0efb35d86cf91e9  libodb-boost-2.0.0.zip
dd954b23014697216004e3e484949df78b2112d0  libodb-mssql-2.0.0.tar.bz2
47d99b8840c71f6ca757e620476438c96037b53c  libodb-mssql-2.0.0.tar.gz
2c619caa50770fa41dc24433326419fbda7c8fe9  libodb-mssql-2.0.0.zip
7b3b7c2bfe3f28156d9c66165f370b401524504f  libodb-mysql-2.0.0.tar.bz2
ee439e87b8012a334584e10bfc2597af4c37f218  libodb-mysql-2.0.0.tar.gz
9e54aa15ed3828298143fb4a2f0eaefaac1f9095  libodb-mysql-2.0.0.zip
127df380417db376ff631f6d9e591fa7278c4638  libodb-oracle-2.0.0.tar.bz2
27d538aa3b2eac3bd204a3a9f4948e559af8c8d8  libodb-oracle-2.0.0.tar.gz
6bdd121b694785cc5524b17dc35e73da78917a09  libodb-oracle-2.0.0.zip
b24559ecd2bd6a90bc28a219c862c84c90e81add  libodb-pgsql-2.0.0.tar.bz2
a765e5f4df9181725159e56f31f37b7749469334  libodb-pgsql-2.0.0.tar.gz
d42721db3b39b94d700411d4bd2e8a3c96e3982d  libodb-pgsql-2.0.0.zip
685312510e6c2f7afdda1d22503647681bd09489  libodb-qt-2.0.0.tar.bz2
1dc3b697e41f5aa628a7353ec7b03ae6ed13c716  libodb-qt-2.0.0.tar.gz
2babed81882d5384ac4179e5183a31a8d09eb1e7  libodb-qt-2.0.0.zip
f76fb3082c66848cc975701c3543a5dab86e3fb4  libodb-sqlite-2.0.0.tar.bz2
89d06be0a237252a4b7823f6b06adf340c61325d  libodb-sqlite-2.0.0.tar.gz
3689d4b76430588f1ca9a7efed5ee5ccc64f83a8  libodb-sqlite-2.0.0.zip
377c8c611ca26cacf786b7b90176e99f34779773  odb-2.0.0-i686-linux-gnu.tar.bz2
49fb83e4ba77d1017675a0ee3486590d43c79bd9  odb-2.0.0-i686-macosx.tar.bz2
a1132d7f2fa6e475330fcf69dc959f6f6a76b994  odb-2.0.0-i686-solaris.tar.bz2
34b7cff972077dbe130d5863cd948db74935c519  odb-2.0.0-i686-windows.zip
4930618dba6fcd3dec704d09870e56b8332f9343  odb-2.0.0-sparc-solaris.tar.bz2
52ff18392acc3df4298c1f307ce2def055c372bc  odb-2.0.0.tar.bz2
f7580043b7999dbb1bd0634e5bdc118ba8edee25  odb-2.0.0.tar.gz
68e66b77eb65c5bc99e1d6f59c3637970e507f10  odb-2.0.0-x86_64-linux-gnu.tar.bz2
87852c635bf43c7f346cce4fdcdd4b6e336a7e52  odb-2.0.0.zip
462082a175ab9c0e114fdf33312ce79fba3441b1  odb-examples-2.0.0.tar.bz2
dbef881b493fbc5ec0a51225c39405e82c136750  odb-examples-2.0.0.tar.gz
b4d7fb39cb1c62630cbc42ebea41c0484f21e881  odb-examples-2.0.0.zip
e81dc9df679046b01caa7600cf1a8df4e62e16f1  odb-tests-2.0.0.tar.bz2
9474c1d8c787485eaa3a82755207d4e96d32a76a  odb-tests-2.0.0.tar.gz
e1e3c05a96f691ec5f8ba427d711bc24677239be  odb-tests-2.0.0.zip

Enjoy,
	Boris



More information about the odb-users mailing list