* New source tree layout: separate includes from sources, separate public includes from private ones, the file names are now in lowercase, put tutorial in the examples directory. * Tested to build on Windows 8 with MS Visual Studio 2013 and with Boost 1.53. * Enable building dynamic libraries (.dll) on Windows. This option now is used by default. You can still turn on static linking in src/util/CMakeLists.txt and src/orm/CMakeLists.txt. * Fixed Autoconf/Automake scripts to build on Ubuntu 14.04, as well as on FreeBSD 10, Cygwin. * Use third party boost.m4 to detect Boost at ./configure stage. * Added stuff to make Debian packages. Tested on Ubuntu 12.04. * Many little API improvements: proper handling of for_update flag, etc. * Basic means to create indices from schema. * Updated tutorials. * Auth example: refactor micro_http server.
* New SQL driver for SOCI library (http://soci.sourceforge.net/). If you build with SOCI then you can use connection URL like this: "mysql+soci://user=test1 pass=test1_pwd host=localhost service=test1_db" - this example shows usage of native MySQL driver, and the following one shows usage of ODBC through SOCI - "mysql+soci_odbc://DSN=test1_dsn;UID=test1;PWD=test1_pwd". * Support for floating point numeric types (Value::FLOAT), i.e. float and double in C++. * Did some profiling and made significant improvements in speed, in particular: fixed input parameter binding; removed excessive use of shared pointers, replaced them with intrusive pointers, especially where thread-safety makes no sense; now the variant type Yb::Value is optimized to make fewer memory allocations. * Pre-built packages for Windows now make use of single configuration file bin\yborm_env.bat, this is the place to set PATH environment variable and to specify the connection string for the test database. * Auth sample: TcpSocket::accept() now can return source address of incoming connection; fixed exception handing in micro_http.cpp. * Tested with Borland C++ Builder 6: kind of works. Yes, the compiler is an old piece of crap, I know. * NOTE: there is a new field named 'D' in test table 'T_ORM_TEST', so you may encounter problems in case you run tests on existing table, things can be altered like this (example shown for MySQL): mysql> alter table T_ORM_TEST add (D double precision); * Updated docs, see "doc" directory.
* Implement order-by relationship property. * Implement use-list='false' relationship property: useful for one-to-one relation. * Add Engine::create_schema(), Engine::drop_schema(). * Basic JSON serializer from ElementTree. * Optimize DataObject and RelationObject structures algorithmically. * CodeGen: move Holder typedef into domain class. * Fix domain object comparison, allowing to put them in maps and sets. * Fix to allow actually use tables without a surrogate key and tables with a manually assigned surrogate key. * Fixes for better support of tables with compound keys. * Fix flushing of new keyed DataObjects. * Bunch of fixed typos.
* Add tut4.cpp: tree structure stored in a table. Fixes to make it work. * Fixes to build under MacOSX. * Refactor Engine classes hierarchy. * Refactor methods Engine::insert(), Engine::update(), Engine::delete(). * Implement OrderedDict class template. * Fix finding tables and columns by name, improve speed. * Set FK value on linking of two objects if posible. * Add distinct and for update flags to SelectExpr. * Extended logging for delete_object() operation. * DDL statements generated from Schema are now iterable. * Rename class Filter -> Expression. * Rename some files to follow common style and to better reflect their contents. * Fix per request from nbuyvich: chained property references. * Fix delete_object() to behave properly when deleting a row from a link-table (n-to-n relation). * Fix yborm_gen: default value setter. * Fix per request from nbuyvich: Make it work: pg1->parent->id.is_null()
* New more intuitive syntax for filters in queries:
it's done via operator overloading.
* Domain classes now have static variable 'c' for convenient
metadata referencing, useful e.g. for filtering.
* When querying a tuple of Domain classes there will be issued
a query with join of corresponding tables.
* Query object now has got methods .one() and .count()
in addition to old method .all().
* Added Tutorial3: Querying objects.
* Fix subtle bug with compiler reordering function calls that leads to
wrong parameter orders.
* Fix assertion with re-adding object into session.
* Fix: Session must always do rollback on releasing Engine.
* Auth sample: Improve App class, use theApp::instance().new_session()
for creating sessions.
* Integrate native SQLITE driver for use in non-QT builds.
Now this driver is used in Windows examples by default.
Thanx to Andrey Skobenkov.
* Improved logging in the ORM core.
* Support URL for specifying connection thruout the examples
and the build system.
Now it's possible to just use --with-test-db-url option
and YBORM_URL environment variable.
* Applied patches from Sebastian Lauwers,
See closed tasks here: http://code.google.com/p/yb-orm/issues
* Fixed Session::flush_delete(): respect the depth.
* Fixed Engine::on_delete(): once prepare, many times exec.
* Cleaned up MetaData classes' interfaces for sake of convenience.
Now the generated code looks more readable.
* New class Expression replaced old Filter class.
This is the first step to develop a comprehensive query language.
* For convenience added --with-yborm-root to configure script
in Auth sample.
* Application singleton for Auth example.
* New and more convenient method of access to domain object properties:
via property-proxy accessors, instead of old setters/getters.
The generated domain class code becomes much cleaner.
Property accessors are implemented for simple data types,
as well as for object references and object collections.
To implement recurrent object references there is DomainHolder class.
Take a look at ProductGroup class from examples/ex2_schema.xml.
I.e. all object references are implemented using DomainHolder, and
therefore they must be dereferenced using arrow (->), not just dot (.).
This change breaks the backward compatibility of the generated code.
* The code generator utility itself is named yborm_gen now and
and is able to produce C++ domain classes as well as SQL DDL statements.
No more need for xsltproc tool. See tutorial1 for example.
Also, internally the code generator has moved to libyborm.
* Initial support for SQLite3 dialect, via QtSql driver.
* Construct SqlSource from URL, using simple URL parser.
See examples in CHANGES file.
You can pass single environment variable YBORM_URL to Engine instance,
instead of combination of YBORM_DBTYPE, YBORM_DRIVER, YBORM_DB,
YBORM_USER, YBORM_PASSWD environment variables. This is mostly
useful for testing.
The Big Change: now you can build YB.ORM against wxWidgets or QT, and use their native data structures. Boost and LibXml are not required. Look at the "configure" script options, please.
On Windows cmake script is capable of building with QT from Nokia QT SDK.
QT build utilizes native QtSqlDriver instead of OdbcDriver.
query<>() function now accepts tuples of Domain classes (boost::tuple), useful for joining tables.
New method Session::commit() = Session::flush() + Engine::commit().
Better support for compound foreign keys.
Better diagnostics when yborm_gen_domain checks schema structure.
Now the only thread that opens and closes all connections when using SqlPool is the monitor thread.
Propagate exceptions back from the monitor thread in SqlPool to report about 'failed to connect' conditions immediately.
Rename SqlConnect -> SqlConnection.
Introduce SqlCursor: an SqlConnection now may have more than one open SqlCursor (and SqlResultSet).
Fix Auth example: Fix micro HTTP server in case the client connection is closed unexpectedly. Support POST queries, other than application/x-www-form-urlencoded.
Added SqlPool for database connection pooling, thanx to Nikita Buyvich.
ResultSet is now able to cache all rows, i.e. it is not necessary lazy.
Support for two or more distinct relations on the same table using different foreign keys.
Added support for 32bit integer SQL data type in schema.
Build script for CMake and MinGW.
Support for Postgres SQL dialect.
Auth example: Allow to register the first user when users table is empty just by visiting special link, like this:
Fixed a long lasted bug with misuse of ODBC function SQLBindParameter.
Added a simple logger implementation.
Reimplemented xml Writer classes from scratch (no need to use libxml2).
Replaced Xml::Node with more convenient class ElementTree::Element,
still depending on libxml2, but not exposing any of its internals.
Auth is a separate demo project contributed by Nikita Buyvich,
the demo is a minimal HTTP server, which implements a toy auth
ptotocol using XML. Look in examples/auth.
As always, the prebuilt version for MSVC2010 is available.
Build in schema pieces into generated classes.
Update of autogenerated code now works (AUTOGEN sections only).
Use smart pointers for Tables and Relations metadata objects.
Automatic registration of domain classes at DomainFactory singleton.
Wide Unicode partial support.
Start to work on a tutorial.
Prebuilt version for MSVC2010 available
Implement load_collection() using DataObjectResultSet with iterator.
Three levels of lazy result sets: SqlResultSet, DataObjectResultSet and
DomainObjectResultSet template class.
Row becomes a vector of named values.
Diffenetiate Session.save() and save_or_update().
Prebuilt version for MSVC2010
I know, building YB.ORM and friends from scratch is a headacke. So here are two prebuilt packages for two different Windows-hosted C++ compilers. Have less trouble trying out YB.ORM :)
The Big Change: new internal weak-typed row representation DataObject class
replaces old RowData class. Session class has been also rewritten from scratch.
This solves old big problems with how object relations are represented and
who shall be responsible for holding object reference.
Now deletion (including cascading) works for objects and relations.
Take a look at new tests at lib/orm/test/TestDataObject.cpp