ODB C++ ORM 2.0.0 released, adds support for C++11, polymorphism

ODB C++ ORM 2.0.0 released, adds support for C++11, polymorphism

Post by Boris Kolpacko » Thu, 03 May 2012 21:35:40



I am pleased to announce the release of ODB 2.0.0.

ODB is an open source object-relational mapping (ORM) system for C++. It
allows you to persist C++ objects to a relational database without having
to deal with tables, columns, or SQL and without manually writing any of
the mapping code.

Major new features in this release:

  * Support for C++11 which adds integration with the new C++11 standard
    library components, including smart pointers and containers. Now you
    can use std::unique_ptr and std::shared_ptr as object pointers (their
    lazy versions are also provided). For containers, support was added
    for std::array, std::forward_list, and the unordered containers.

  * Support for polymorphism which allows you to persist, load, update,
    erase, and query objects of derived classes using their base class
    interfaces. Persistent class hierarchies are mapped to the relational
    database model using the table-per-difference mapping.

  * Support for composite object ids which are translated to composite
    primary keys in the relational database.

  * Support for the NULL semantics for composite values.

This release has also been tested with GCC 4.7 and Clang 3.0 with the
ODB compiler now supporting the GCC 4.7 series plugin interface. With
this release we are also introducing a free proprietary license for
small object models.

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

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

For the complete list of new features in this version see the official
release announcement:

http://www.codesynthesis.com/pipermail/odb-announcements/2012/000013....

ODB is written in portable C++ and you should be able to use it with any
modern C++ compiler. In particular, we have tested this release on GNU/Linux
(x86/x86-64), Windows (x86/x86-64), Mac OS X, and Solaris (x86/x86-64/SPARC)
with GNU g++ 4.2.x-4.7.x, MS Visual C++ 2008 and 2010, Sun Studio 12, and
Clang 3.0.

The currently supported database systems are MySQL, SQLite, PostgreSQL,
Oracle, and SQL Server. ODB also provides profiles for Boost and Qt, which
allow you to seamlessly use value types, containers, and smart pointers
from these libraries in your persistent classes.

More information, documentation, source code, and pre-compiled binaries are
available from:

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

Enjoy,
        Boris

 
 
 

1. ODB C++ ORM 1.6.0 released, adds object projections

Hi,

I am pleased to announce the release of ODB 1.6.0.

ODB is an open-source object-relational mapping (ORM) system for C++. It
allows you to persist C++ objects to a relational database without having
to deal with tables, columns, or SQL and without manually writing any of
the mapping code.

The major new feature in this release is the introduction of the view
concept. A view is a light-weight, read-only projection of one or more
persistent objects or database tables or the result of a native SQL query
execution.

Views can be used to load a subset of data members from objects or columns
from database tables, execute and handle results of arbitrary SQL queries,
including aggregate queries, as well as join multiple objects and/or
database tables using object relationships or custom join conditions.

For example, given this persistent class:

  #pragma db object
  class person
  {
    ...

    #pragma db id auto
    unsigned long id_;

    std::string first_, last_;
    unsigned short age_;
  };

We can define a view that returns the number of people stored in the
database:

  #pragma db view object(person)
  struct person_count
  {
    #pragma db column("count(" + person::id_ + ")")
    std::size_t count;
  };

And then use this view to find out how many people are younger than 30:

  typedef odb::query<person_count> query;
  typedef odb::result<person_count> result;

  result r (db.query<person_count> (query::age < 30));
  cout << r.begin ()->count << endl;

Other important new features in this release are:

  * Support for the NULL semantics and the odb::nullable container.

  * Support for the boost::optional container (mapped to columns
    with NULL values).

  * Support for deleting persistent objects using query expressions.

  * Support for storing BLOB data as std::vector<char>.

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

http://www.codesynthesis.com/~boris/blog/2011/10/04/odb-1-6-0-released/

For the complete list of new features in this version see the official
release announcement:

http://www.codesynthesis.com/pipermail/odb-announcements/2011/000007....

ODB is written in portable C++ and you should be able to use it with any
modern C++ compiler. In particular, we have tested this release on GNU/Linux
(x86/x86-64), Windows (x86/x86-64), Mac OS X, and Solaris (x86/x86-64/SPARC)
with GNU g++ 4.2.x-4.6.x, MS Visual C++ 2008 and 2010, and Sun Studio 12.
The currently supported database systems are MySQL, SQLite, and PostgreSQL.
This release has also been tested with the recently released PostgreSQL 9.1.

More information, documentation, source code, and pre-compiled binaries are
available from:

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

Enjoy,
        Boris

2. Possible to see files in three view?

3. ODB C++ ORM adds support for PostgreSQL

4. Adding network to existing one. - How to - Using cisco 25xx

5. ODB C++ ORM 1.7.0 adds support for optimistic concurrency

6. Test, Please Ignore

7. MySQL 5.0.11-beta has been released

8. MySQL 4.0.11 is released

9. MySQL Connector/J 3.0.11 STABLE Has Been Released

10. MySQL Connector/ODBC 5.00.11 Beta has been released

11. NEW Release: ODDIS-2.11 Database Adminstration/Information Tool

12. MyODBC 3.51.11 and unicode support.