Debian Codegraph @

NEWS

raw
1 Version 2.4.0
2
3 * Support for object loading views. Object loading views allow loading of
4 one or more complete objects instead of, or in addition to, a subset of
5 data member and with a single SELECT statement execution. For details,
6 refer to Section 10.2, "Object Loading Views" in the ODB manual.
7
8 * Support for bulk operations in Oracle and SQL Server. Bulk operations
9 persist, update, or erase a range of objects using a single database
10 statement execution which often translates to a significantly better
11 performance. For details, refer to Section 15.3, "Bulk Database
12 Operations" in the ODB manual.
13
14 * New database class functions, query_one() and query_value(), provide
15 convenient shortcuts for situations where the query is known to return
16 at most one element (query_one) or exactly one element (query_value).
17 Corresponding execute_one() and execute_value() functions for prepared
18 queries are also provided. For details, refer to Sections 4.3, "Executing
19 a Query" and 4.5, "Prepared Queries" in the ODB manual.
20
21 * Support for defining persistent objects as instantiations of C++ class
22 templates, similar to composite value types. For details, refer to
23 Section 15.2, "Persistent Class Template Instantiations" in the ODB
24 manual.
25
26 * Support for object and table join types in views. Supported join type
27 are left, right, full, inner, and cross with left being the default.
28 For details, refer to Sections 10.1, "Object Views" and 10.3, "Table
29 Views" in the ODB manual.
30
31 * Support for result modifiers in view query conditions. Currently
32 supported result modifiers are 'distinct' (which is translated to
33 SELECT DISTINCT) and 'for_update' (which is translated to FOR UPDATE or
34 equivalent for database systems that support it). For details, refer to
35 Section 10.5, "View Query Conditions" in the ODB manual.
36
37 * Support for persisting std::deque containers.
38
39 * New pragma, on_delete, allows the specification of an on-delete semantics
40 (translated to the ON DELETE SQL clause) for an object pointer. For more
41 information, refer to Section 14.4.15, "on_delete" in the ODB manual.
42
43 * Besides odb::stderr_tracer there is now odb::stderr_full_tracer that
44 traces statement preparations and deallocations in addition to their
45 executions. This new implementation can be useful when you want to see
46 the text of a statement that contains a syntax error and therefore
47 will not actually be executed. For more information, refer to Section
48 3.13, "Tracing SQL Statement Execution" in the ODB manual.
49
50 * ODB can now compile headers that use #pragma once instead of include
51 guards.
52
53 * User-supplied prologues and epilogues are now generated outside the
54 pre.hxx/post.hxx includes. This allows the use of precompiled headers
55 with the generated files.
56
57 * Support for calling MySQL stored procedures. For details and limitations
58 refer to Section 17.7, "MySQL Stored Procedures" in the ODB manual.
59
60 * Support for calling SQL Server stored procedures. For details and
61 limitations refer to Section 21.7, "SQL Server Stored Procedures" in
62 the ODB manual.
63
64 * New option, --oracle-warn-truncation, makes ODB warn about SQL names
65 that are longer than 30 characters and are therefore truncated. ODB
66 now also detects when such truncations lead to Oracle name conflicts
67 and issues diagnostics even without this option specified.
68
69 * For MySQL, PostgreSQL, and SQL Server, ODB now warns when an SQL name
70 exceeds the database limit (64, 63, and 128 characters, respectively).
71 SQLite has no limitation on name lengths. For Oracle, which has a limit
72 that is much more likely to be reached in normal circumstances (30
73 characters), a more comprehensive detection is implemented (see the item
74 above).
75
76 * New option, --statement-regex, can be used to process prepared statement
77 names that are used by PostgreSQL. This can be useful, for example, to
78 shorten names that exceed the PostgreSQL name limit.
79
80 * The --std option now accepts the 'c++14' value.
81
82 Version 2.3.0
83
84 * Support for database schema evolution, including schema migration, data
85 migration, and soft model changes. For more information, refer to Chapter
86 13, "Database Schema Evolution" in the ODB manual.
87
88 * Support for object sections. Sections are an optimization mechanism that
89 allows the partitioning of data members of a persistent class into groups
90 that can be loaded and/or updated separately. For more information, refer
91 to Chapter 9, "Sections" in the ODB manual as well as the 'section'
92 example in the odb-examples package.
93
94 * Support for automatic mapping of C++11 enum classes in addition to "old"
95 enums. For more information, refer to the ODB manual "Type Mapping"
96 sections for each database system.
97
98 * Support for defining composite value types inside persistent classes,
99 views, and other composite values. For more information, refer to Section
100 7.2, "Composite Value Types" in the ODB manual.
101
102 * Support for pattern matching (SQL LIKE operator) in the C++-integrated
103 queries. For more information, refer to Section 4.1, "ODB Query Language"
104 in the ODB manual.
105
106 * The schema_catalog::create_schema() function now has a third argument
107 which indicates whether to drop the schema prior to creating the new one.
108 The default is true which is backwards-compatible. The schema_catalog
109 class now also provides the drop_schema() function which allows you to
110 drop the schema without creating the new one. Finally, the exists()
111 function now has the schema name argument which by default is an empty
112 string (the default schema name). For more information, refer to Section
113 3.4, "Database" in the ODB manual.
114
115 * The transaction class now provides the default constructor that allows
116 the creation of finalized transactions which can then be re-initialized
117 with the reset() function. The finalized() accessor has also been added
118 which allows querying of the finalization state. For more information,
119 refer to Section 3.5, "Transactions" in the ODB manual.
120
121 * New option, --fkeys-deferrable-mode, specifies the alternative deferrable
122 mode for foreign keys. By default, the ODB compiler generates deferred
123 foreign keys for databases that support them (SQLite, PostgreSQL, and
124 Oracle) and comments the foreign keys out for databases that don't (MySQL
125 and SQL Server). This option can be used to override this behavior. Refer
126 to the ODB compiler command line interface documentation (man pages) for
127 details.
128
129 * Starting with MySQL version 5.6.4 it is possible to store fractional
130 seconds up to microsecond precision in TIME, DATETIME, and TIMESTAMP
131 columns. Both Boost and Qt profiles have been updated to support this
132 new functionality. Note, however, that to enable sub-second precision,
133 the corresponding type with the desired precision has to be specified
134 explicitly. For details, refer to the "MySQL Database Type Mapping"
135 sections in the Boost and Qt profile chapters.
136
137 * New SQLite-specific exception, odb::sqlite::forced_rollback, which is
138 thrown if SQLite forces a transaction to roll back. For more information,
139 refer to Section 16.5.6, "Forced Rollback" in the ODB manual.
140
141 * New options, --pgsql-server-version, can be used to specify the minimum
142 PostgreSQL server version with which the generated C++ code and schema
143 will be used. Right now this information is used to enable the use of
144 the IF NOT EXISTS clause in the CREATE TABLE statement for the schema
145 version table creation in PostgreSQL 9.1 and later. Refer to the ODB
146 compiler command line interface documentation (man pages) for details.
147
148 * The --output-name option has been renamed to --input-name, which is more
149 semantically correct.
150
151 * The generated database schema now explicitly specify NULL for nullable
152 columns.
153
154 * The generated separate C++ schema file (--schema-format separate) no
155 longer includes the generated header file (-odb.hxx). As a result, it is
156 now possible to use the --generate-schema-only and --at-once options to
157 generate a combined C++ schema file for several headers.
158
159 Version 2.2.0
160
161 * Multi-database support. This mechanism allows an application to
162 simultaneously work with multiple database systems and comes in two
163 flavors: static and dynamic. With static support the application uses
164 the static database interfaces (that is, odb::<db>::database instead
165 of odb::database). With dynamic support the same application code can
166 access multiple databases via a common interface. Dynamic multi-database
167 supports also allows the application to dynamically load the database
168 support code for individual database systems if and when necessary. For
169 more information, refer to Chapter 14, "Multi-Database Support" in the
170 ODB manual.
171
172 * Support for prepared queries. Prepared queries are a thin wrapper around
173 the underlying database system's prepared statements functionality. They
174 provide a way to perform potentially expensive query preparation tasks
175 only once and then execute the query multiple times. For more information,
176 refer to Section 4.5, "Prepared Queries" in the ODB manual as well as the
177 'prepared' example in the odb-examples package.
178
179 * Mapping for char[N] and std::array<char, N> to database VARCHAR(N-1) (or
180 similar) as well as for char to database CHAR(1) (or similar). For SQL
181 Server and SQLite on Windows equivalent mappings for wchar_t are also
182 provided. Also the query support for arrays has been improved to allow
183 passing a value of the decayed type (pointer) as a query parameter.
184 For more information, refer to the ODB manual "Type Mapping" sections
185 for each database system.
186
187 * Support for change-tracking std::vector and QList container equivalents.
188 Change-tracking containers minimize the number of database operations
189 necessary to synchronize the container state with the database. For
190 more information, refer to Sections 5.4, "Change-Tracking Containers",
191 5.4.1 "Change-Tracking vector", and 22.3.1, "Change-Tracking QList"
192 in the ODB manual.
193
194 * Support for automatically-derived SQL name transformations (table, column,
195 index, etc). At the higher level, it is possible to assign prefixes and
196 suffixes (--table-prefix, --{index,fkey,sequence}--suffix options) as
197 well as to convert to upper or lower case (--sql-name-case option). At
198 the lower level, it is possible to specify transformations as regular
199 expressions (--{table,column,index,fkey,sequence,sql-name}-regex options).
200 For more information, refer to the SQL NAME TRANSFORMATIONS section in
201 the ODB compiler command line interface documentation (man pages).
202
203 * New options, --export-symbol and --extern-symbol, allow DLL-exporting of
204 the generated database support code.
205
206 * Support for transaction post- commit/rollback callbacks. For more
207 information, refer to Section 13.1, "Transaction Callbacks" in the ODB
208 manual.
209
210 * Support for custom session implementations. For more information, refer
211 to Section 10.2, "Custom Sessions" in the ODB manual.
212
213 * Support for early connection release. Now the database connection is
214 released when commit()/rollback() is called rather than when the
215 transaction instance goes out of scope.
216
217 * New odb::schema_catalog function, exists(), can be used to check whether
218 a schema with the specified name exists in the catalog.
219
220 * Support for SQL Server ROWVERSION-based optimistic concurrency. For more
221 information, refer to Section 19.1.1, "ROWVERSION Support" in the ODB
222 manual.
223
224 * Support for specifying the SQL Server transaction isolation level. For
225 more information, refer to Section 19.2, "SQL Server Database Class" in
226 the ODB manual.
227
228 * Support for "smart" containers. A smart container is provided with
229 additional functions which allow it to insert, update, and delete
230 individual elements in the database. Change-tracking containers are
231 examples of smart containers that utilizes this new functionality.
232 Currently only ordered smart containers are supported. Note also that
233 with this addition the names of the database functions provided by the
234 ODB compiler (see libodb/odb/container-traits.hxx) have changed. This
235 will only affect you if you have added ODB persistence support for a
236 custom container.
237
238 Version 2.1.0
239
240 * The ODB compiler is now capable of automatically discovering accessor and
241 modifier functions for inaccessible data members in persistent classes,
242 composite value types, and views. It will then use these accessors and
243 modifiers in the generated code instead of trying to access such data
244 members directly. The names of these functions are derived from the
245 data member names and, by default, the ODB compiler will look for names
246 in the form: get_foo/set_foo, getFoo/setFoo, getfoo/setfoo, and just
247 foo. You can also add custom name derivations with the --accessor-regex
248 and --modifier-regex ODB compiler options. For more information, refer
249 to Section 3.2, "Declaring Persistent Objects and Values" in the ODB
250 manual.
251
252 * New pragmas, get, set, and access, allow the specification of custom
253 accessor and modifier expressions for data members in persistent classes,
254 composite value types, and views. For more information, refer to Section
255 12.4.5, "get/set/access" in the ODB manual as well as the 'access' example
256 in the odb-examples package.
257
258 * New pragma, virtual, allows the declaration of virtual data members. A
259 virtual data member is an imaginary data member that is only used for
260 the purpose of database persistence. This mechanism can be useful to
261 aggregate or dis-aggregate real data members, implement the pimpl idiom,
262 and to handle third-party types for which names of real data members may
263 not be known. For more information, refer to Section 12.4.13, "virtual"
264 in the ODB manual as well as the 'access' and 'pimpl' examples in the
265 odb-examples package.
266
267 * Support for defining database indexes. Both simple and composite indexes
268 can be defined with support for database-specific index types, methods,
269 and options. For more information, refer to Section 12.6, "Index
270 Definition Pragmas" as well as Sections [13-17].16, "<Database> Index
271 Definition" in the ODB manual.
272
273 * Support for mapping extended database types, such as geospatial types,
274 user-defined types, and collections. This mechanism allows you to map
275 any database type to one of the types for which ODB provides built-in
276 support (normally string or binary). The text or binary representation
277 of the data can then be extracted into a C++ data type of your choice.
278 For more information, refer to Section 12.7, "Database Type Mapping
279 Pragmas" in the ODB manual.
280
281 * The Boost profile now provides persistence support for the Boost Multi-
282 Index container (boost::multi_index_container). For more information,
283 refer to Section 19.3, "Multi-Index Container Library" in the ODB manual.
284
285 * The Boost profile now provides persistence support for the Boost uuid type
286 (boost::uuids::uuid). For more information, refer to Section 19.6, "Uuid
287 Library" in the ODB manual as well as the 'boost' example in the odb-
288 examples package.
289
290 * The Qt profile now provides persistence support for the QUuid type. For
291 more information, refer to Section 20.1, "Basic Types" in the ODB manual
292 as well as the 'qt' example in the odb-examples package.
293
294 * SQLite improvements: Persistence support for std::wstring on Windows
295 (Section 14.1, "SQLite Type Mapping"). Ability to pass the database
296 name as std::wstring on Windows (Section 14.2, "SQLite Database Class").
297 Ability to specify the virtual filesystem (vfs) module in the database
298 constructors (Section 14.2, "SQLite Database Class").
299
300 * Support for mapping C++11 std::array<char, N> and std::array<unsigned
301 char, N> types to BLOB/BINARY database types. For more information,
302 refer to Sections [13-17].1, "<Database> Type Mapping" in the ODB manual.
303
304 * Support for mapping the char[16] array to PostgreSQL UUID and SQL Server
305 UNIQUEIDENTIFIER types. For more information, refer to Sections 15.1,
306 "PostgreSQL Type Mapping" and 17.1, "SQL Server Type Mapping" in the
307 ODB manual.
308
309 * New option, --output-name, specifies the alternative base name used to
310 construct the names of the generated files. Refer to the ODB compiler
311 command line interface documentation (man pages) for details.
312
313 * New option, --generate-schema-only, instructs the ODB compiler to
314 generate the database schema only. Refer to the ODB compiler command
315 line interface documentation (man pages) for details.
316
317 * New option, --at-once, triggers the generation of code for all the input
318 files as well as for all the files that they include at once. Refer to
319 the ODB compiler command line interface documentation (man pages) for
320 details.
321
322 * New options, --sql-interlude and --sql-interlude-file, allow the insertion
323 of custom SQL between the DROP and CREATE statements in the generated
324 database schema file.
325
326 * New options, --omit-drop and --omit-create, trigger the omission of DROP
327 and CREATE statements, respectively, from the generated database schema.
328
329 * New ODB manual Section, 6.3 "Circular Relationships", explains how to
330 handle persistent classes with circular dependencies that are defined
331 in separate headers.
332
333 * The id() pragma that was used to declare a persistent class without an
334 object id has been renamed to no_id.
335
336 * New pragma, definition, allows the specification of an alternative code
337 generation point for persistent classes, views, and composite value
338 types. This mechanism is primarily useful for converting third-party
339 types to ODB composite value types. For more information, refer to
340 Section 12.3.7, "Definition" in the ODB manual.
341
342 * The session constructor now accepts an optional bool argument (true by
343 default) which indicates whether to make this session current for this
344 thread. For more information, refer to Chapter 10, "Session" in the ODB
345 manual.
346
347 * Simplified Oracle automatically-assigned object id implementation that
348 does not rely on triggers.
349
350 * Support for mapping boost::posix_time::ptime and QDateTime to the DATE
351 Oracle type. For more information, refer to Sections 19.4.4 (Boost) and
352 20.4.4 (Qt) in the ODB manual.
353
354 * Default SQLite mapping for float and double now allows NULL since SQLite
355 treats NaN FLOAT values as NULL. For more information, refer to Section
356 14.1, "SQLite Type Mapping" in the ODB manual.
357
358 Version 2.0.0
359
360 * Support for C++11. The newly supported C++11 standard library components
361 include:
362 - std::unique_ptr as object pointer or value wrapper
363 - odb::lazy_unique_ptr lazy counterpart
364 - std::shared_ptr/weak_ptr as object pointer or value wrapper
365 - odb::lazy_shared_ptr/lazy_weak_ptr lazy counterparts
366 - support for array, forward_list, and unordered containers
367 - connection factory can be passed to the database constructor as
368 std::unique_ptr instead of std::auto_ptr
369
370 The ODB compiler now recognizes the --std option. Valid values for this
371 option are 'c++98' (default) and 'c++11'. In the runtime libraries the
372 C++11 support is header-only which means that the same build of a runtime
373 library can be used in both the C++98 and C++11 modes. On UNIX, the tests
374 and examples can be compiled in the C++11 mode by passing the necessary
375 options to turn the C++ compiler into this mode (e.g., -std=c++0x GCC
376 option). On Windows, the tests and examples are always built in the C++11
377 mode with VC++ 10 and later. The new 'c++11' example in the odb-examples
378 package shows ODB support for some of the C++11 features.
379
380 * Support for polymorphism. Now a persistent class hierarchy can be
381 declared polymorphic which makes it possible to persist, load, update,
382 erase, and query objects of derived classes using their base class
383 interfaces. For more information, refer to Chapter 8, "Inheritance" in
384 the ODB manual as well as the 'inheritance/polymorphism' example in the
385 odb-examples package.
386
387 * Support for composite object ids. Now a composite value type can be used
388 to declare an object id member. For more information, refer to Section
389 7.2.1, "Composite Object Ids" in the ODB manual as well as the 'composite'
390 example in the odb-examples package.
391
392 * Support for the NULL value semantics for composite values. For more
393 information, refer to Section 7.3, "Pointers and NULL Value Semantics"
394 in the ODB manual.
395
396 * New schema format (--schema-format), 'separate', allows the generation
397 of the schema creation code into a separate C++ source file (called
398 '<name>-schema.cxx' by default). This value is primarily useful if you
399 want to place the schema creation functionality into a separate program
400 or library.
401
402 * New namespace-level pragmas: table, pointer. The table pragma specifies
403 the table prefix that is added to table names for all the persistent
404 classes inside a namespace. The pointer pragma specifies the default
405 pointer type to be used for persistent classes and views inside a
406 namespace. For more information, refer to Section 12.5.1, "pointer" and
407 Section 12.5.2, "table" in the ODB manual.
408
409 * Session support is now optional and is disabled by default. This is a
410 backwards-incompatible change. Session support can be enabled on the
411 per class basis or at the namespace level using the new session pragma.
412 It can also be enabled by default for all the persistent classes using
413 the --generate-session ODB compiler option. Thus, to get the old behavior
414 where all the objects were session-enabled, simply add --generate-session
415 to your ODB compiler command line. For more information, refer to Chapter
416 10, "Session" in the ODB manual.
417
418 * The semantics of the database operations callbacks has changed with
419 respect to object const-ness. This is a backwards-incompatible change.
420 Now the callback function for the *_persist, *_update, and *_erase events
421 is always called on the constant object reference while for the *_load
422 events -- always on the unrestricted reference. For more information,
423 refer to Section 12.1.7, "callback" in the ODB manual.
424
425 * New function, transaction::reset(), allows the reuse of the same
426 transaction instance to complete several database transactions. For more
427 information, refer to Section 3.4, "Transactions" in the ODB manual.
428
429 * New exception, odb::session_required, is thrown when ODB detects that
430 correctly loading a bidirectional object relationship requires a session
431 but one is not used. For more information, refer to Section 6.2,
432 "Bidirectional Relationships" in the ODB manual.
433
434 Version 1.8.0
435
436 * Support for the Microsoft SQL Server database. The provided connection
437 factories include 'new' (a new connection is created every time one is
438 requested) and 'pool' (a pool of connections is maintained). The Boost
439 and Qt profiles have been updated to support this database. For more
440 information, refer to Chapter 17, "Microsoft SQL Server Database" in
441 the ODB manual.
442
443 * Support for defining composite value types as C++ class template
444 instantiations. For more information, refer to Section 7.2, "Composite
445 Value Types" in the ODB manual as well as the 'composite' example in the
446 odb-examples package.
447
448 * Support for database schemas ("database namespaces"). A schema can be
449 specified for a persistent class, for a C++ namespace (the schema then
450 applies to all the persistent classes within this namespace), and for a
451 file with the --schema ODB compiler option. For more information, refer
452 to Section 12.1.8, "schema" in the ODB manual.
453
454 * The --default-schema option has been renamed to --schema-name.
455
456 * The default Oracle mapping for std::string has changed from VARCHAR2(4000)
457 to VARCHAR2(512).
458
459 Version 1.7.0
460
461 * Support for the Oracle database. The provided connection factories
462 include 'new' (a new connection is created every time one is requested)
463 and 'pool' (a pool of connections is maintained). The Boost and Qt
464 profiles have been updated to support this database. For more information,
465 refer to Chapter 16, "Oracle Database" in the ODB manual.
466
467 * Support for optimistic concurrency. For more information refer to Chapter
468 11, "Optimistic Concurrency" in the ODB manual as well as the 'optimistic'
469 example in the odb-examples package.
470
471 * Support for read-only objects, composite value types, and data members.
472 The new readonly pragma can be used to declare one of these entities as
473 read-only. Constant data members are automatically treated as read-only.
474 For more information, refer to Section 12.1.4 "readonly (object)",
475 Section 12.3.6 "readonly (composite value)", and Section 12.4.10
476 "readonly (data member)" in the ODB manual.
477
478 * Support for persistent classes without object identifiers. Such classes
479 have to be explicitly declared as not having an object id and they have
480 limited functionality. For more information, refer to Section 12.1.5
481 "id" in the ODB manual.
482
483 * Support for SQL statement execution tracing. For more information, refer
484 to Section 3.12 "Tracing SQL Statement Execution" in the ODB manual.
485
486 * Support for mapping char[N], unsigned char[N], and std::vector<unsigned
487 char> to the BLOB (or equivalent) types. For more information, refer to
488 Chapters 13 (for MySQL), 14 (for SQLite), 15 (for PostgreSQL), and 16
489 (for Oracle) in the ODB manual.
490
491 * Query result iterator now provides the id() function which allows one
492 to get the object id without loading the object. For more information,
493 refer to Section 4.4 "Query Result" in the ODB manual.
494
495 * Support for microsecond precision in Boost and Qt date-time types
496 mapping to PostgreSQL date-time data types. Additionally, Qt QDateTime
497 values stored in a PostgreSQL database can now be earlier than the UNIX
498 epoch.
499
500 Version 1.6.0
501
502 * New concept, view, is a C++ class that embodies a light-weight, read-
503 only projection of one or more persistent objects or database tables
504 or the result of a native SQL query execution. Some of the common
505 applications of views include loading a subset of data members from
506 objects or columns from database tables, executing and handling
507 results of arbitrary SQL queries, including aggregate queries, as
508 well as joining multiple objects and/or database tables using object
509 relationships or custom join conditions. For more information refer
510 to Chapter 9, "Views" in the ODB manual as well as the 'view' example
511 in the odb-examples package.
512
513 * New function, database::erase_query(), allows the deletion of the
514 database state of multiple objects matching certain criteria. It uses
515 the same query expression as the database::query() function. For more
516 information, refer to Section 3.10, "Deleting Persistent Objects" in
517 the ODB manual.
518
519 * Support for value wrappers. An ODB value wrapper is a class template
520 that wraps a value type or a container. Common examples of wrappers
521 are smart pointers, holders, and "optional value" containers such as
522 boost::optional. A wrapper can be transparent or it can handle the
523 NULL semantics. To allow the easy conversion of value types that do
524 not support the NULL semantics into the ones that do, the odb::nullable
525 class template has been added. ODB now also includes built-in support for
526 std::auto_ptr and std::tr1::shared_ptr smart pointers as value wrappers
527 as well as for boost::shared_ptr and QSharedPointer via the Boost and Qt
528 profiles. Currently, the NULL semantics is only supported for simple
529 values but smart pointers can still be used with composite values and
530 containers. For more information, refer to Section 7.3, "NULL Value
531 Semantics" in the ODB manual.
532
533 * Support for the boost::optional container in the Boost profile. A data
534 member of the boost::optional type is mapped to a column that can have
535 a NULL value. For more information, refer to Section 15.3 "Optional
536 Library" in the ODB manual.
537
538 * Support for mapping std::vector<char> to the BLOB (or equivalent) types.
539 For more information, refer to Chapters 11 (for MySQL), 12 (for SQLite)
540 and 13 (for PostgreSQL) in the ODB manual.
541
542 * New option, --table-prefix, allows the specification of a prefix that
543 is added to table and index names. For more information, refer to the
544 ODB compiler command line interface documentation (man pages).
545
546 * New ODB runtime library interface, odb::connection, represents a
547 connection to the database. The primary use case for a connection is to
548 execute native statements outside of a transaction. For more information,
549 refer to Section 3.5, "Connections" in the ODB manual.
550
551 * Support for multiplexing several transactions on the same thread. For
552 more information, refer to Section 3.4, "Transactions" in the ODB
553 manual.
554
555 * All the concrete connection classes now have a second constructor which
556 allows the creation of a connection instance from an already established
557 underlying connection handle. The connection_pool_factory and, in case of
558 SQLite, single_connection_factory now have a virtual create() function
559 that can be overridden to implement custom connection establishment and
560 configuration.
561
562 * The query expression syntax for object pointers and composite values has
563 changed. Now, instead of using the scope resolution operator ('::'), the
564 member access via a pointer operator (->) is used for object pointers and
565 the member access operator (.) is used for composite values. Examples of
566 old and new syntax for pointers, old: query<employee>::employer::name,
567 new: query<employee>::employer->name. For composites values, old:
568 query<employee>::name::first, new: query<employee>::name.first.
569
570 * SQLite ODB runtime now enables foreign key constraints checking by
571 default. While this should not affect correct applications, due to
572 bugs in SQLite DDL foreign keys support, you may need to temporarily
573 disable foreign key constraints checking when re-creating the database
574 schema (the sign that you may need to do so is the "foreign key
575 constraint failed" exception thrown by the commit() function after the
576 call to schema_catalog::create_schema()). For more information, refer
577 to Section 12.5.3, "Foreign Key Constraints" in the ODB manual.
578
579 * Support for specifying the client character set for the MySQL database.
580 For more information, refer to Section 11.2, "MySQL Database Class" in
581 the ODB manual.
582
583 * Object cache maintained by a session no longer distinguishes between
584 const and non-const objects. Instead, const objects are treated as
585 non-const by casting away constness. For more information on this new
586 behavior, refer to Section 9.1, "Object Cache" in the ODB manual.
587
588 Version 1.5.0
589
590 * Support for the PostgreSQL database. The provided connection factories
591 include 'new' (a new connection is created every time one is requested)
592 and 'pool' (a pool of connections is maintained). The Boost and Qt
593 profiles have been updated to support this database. For more information,
594 refer to Chapter 13, "PostgreSQL Database" in the ODB manual.
595
596 * New handling of the NULL semantics. Now, instead of being specified as
597 part of the SQL type with the type pragma, there are separate null and
598 not_null pragmas. The not_null pragma was used to control the NULL
599 semantics of object pointers. Now the two pragmas are used consistently
600 for object pointers and simple values (and, in the future, they will work
601 for composite values and containers). To control the NULL semantics of
602 the container's element values, the value_null and value_not_null pragmas
603 have been added, similar to the value_type, value_column, etc., pragmas.
604 For more information about the new mechanism, refer to Sections 10.2.3,
605 10.2.8, 10.3.4, and 10.3.13 in the ODB manual.
606
607 This is a backwards-incompatible change. Existing use cases that will
608 require manual changes are listed below.
609
610 For pragmas that apply to simple value types and data members of
611 such types:
612
613 #pragma db type("TEXT NOT NULL") => #pragma db type("TEXT")
614 #pragma db type("TEXT NULL") => #pragma db type("TEXT") null
615 #pragma db type("TEXT") => #pragma db type("TEXT") null
616
617 For pragmas that apply to containers of pointers and data members of
618 such types:
619
620 #pragma db not_null => #pragma db value_not_null
621
622 * New pragma, default, allows the specification of the database default
623 value. For more information, refer to Section 10.3.5, "default" in the
624 ODB manual.
625
626 * New pragmas, options, id_options, index_options, key_options, and
627 value_options, allow the specification of additional column definition
628 options. For more information, refer to Section 10.3.6, "options" in
629 the ODB manual.
630
631 * Support for database operations callbacks. Now a persistent class can
632 register a callback function that will be called before and after every
633 database operation (such as persist, load, update, or erase) is performed
634 on an object of this class. A database operations callback can be used to
635 implement object-specific pre and post initializations, registrations,
636 and cleanups. For more information and an example, refer to Section
637 10.1.4, "callback" in the ODB manual.
638
639 * New option, --include-regex, allows the modification of the #include
640 directive paths generated by the ODB compiler. This is primarily useful
641 when placing the generated code into subdirectories and the #include
642 directives have to be adjusted accordingly. The --include-regex-trace
643 option is useful for debugging the expressions specified with
644 --include-regex.
645
646 Version 1.4.0
647
648 * New profile, qt, provides persistence support for the Qt framework. This
649 version covers the most commonly used basic types, date-time types, smart
650 pointers, and containers. The qt profile implementation is provided by the
651 libodb-qt library. For more information refer to Chapter 13, "Profiles
652 Introduction" and Chapter 15, "Qt Profile" in the ODB manual as well as
653 the 'qt' example in the odb-examples package.
654
655 * Support for non-polymorphic object inheritance, including the new abstract
656 pragma. For more information refer to Chapter 8, "Inheritance" in the ODB
657 manual as well as the 'inheritance' example in the odb-examples package.
658
659 * Automatic mapping of C++ enumerations to suitable database types. In
660 database systems that support enumeration types (such as MySQL), a C++
661 enum is mapped to such a type (for example, ENUM('red', 'green', 'blue')
662 in MySQL). Otherwise, it is mapped to a suitable integer type. Refer to
663 Part II, "Database Systems" in the ODB manual for more details on the
664 provided mappings.
665
666 * New pragma, id_type, allows the specification of the native database type
667 that should be used for data members designated as object identifiers. In
668 combination with the type pragma, id_type allows you to map a C++ type
669 differently depending on whether it is used in an ordinary member or an
670 object id.
671
672 * New options, --odb-prologue-file and --odb-epilogue-file, allow the
673 inclusion of file contents into the ODB compilation.
674
675 * Default mapping of the size_t and std::size_t types to a 64-bit integer
676 database type irrespective of the platform width. This can be overridden
677 with the type pragma.
678
679 Version 1.3.0
680
681 * Support for the SQLite database. The provided connection factories include
682 'new' (a new connection is created every time one is requested), 'single'
683 (single connection is shared among all the callers), and 'pool' (a pool
684 of connections is maintained). In multi-threaded applications the runtime
685 uses the SQLite shared cache and unlock notification features to aid
686 concurrency. For more information, refer to Chapter 11, "SQLite Database"
687 in the ODB manual.
688
689 * Support for database-specific profiles. Now the ODB compiler first looks
690 for the <profile>-<database>.options file and only if this file is not
691 found, does it fall back to <profile>.options.
692
693 * Support for the GCC 4.6 plugin interface changes.
694
695 Version 1.2.0
696
697 * New profile, boost, provides persistence support for the Boost libraries.
698 This version covers the most commonly used types from the smart_ptr,
699 unordered, and date_time libraries. The boost profile implementation is
700 provided by the libodb-boost library. For more information refer to
701 Chapter 11, "Profiles Introduction" and Chapter 12, "Boost Profile" in
702 the ODB manual as well as the 'boost' example in the odb-examples package.
703
704 * Support for embedded database schemas. The new option, --schema-format,
705 allows the selection of the schema format. The valid values for this
706 option are 'sql' for a standalone SQL file and 'embedded' for a schema
707 embedded into the generated C++ code. The new odb::schema_catalog class
708 provides support for accessing embedded schemas from within the
709 application. For details refer to Section 3.3, "Database" in the ODB
710 manual as well as the 'schema/embedded' example in the odb-examples
711 package.
712
713 * New exceptions: odb::recoverable, odb::connection_lost, and odb::timeout.
714 The odb::recoverable exception is a common base class for all recoverable
715 ODB exceptions. The other two exceptions plus odb::deadlock now inherit
716 from this base. Refer to Section 3.5, "Error Handling and Recovery" for
717 details.
718
719 * Support for connection validation (ping) in MySQL connection_pool_factory.
720 This transparently deals with the MySQL server closing connections after
721 a certain period of inactivity.
722
723 * New namespace, odb::core, contains using-declarations for the core ODB
724 constructs, such as the database, transaction, etc. The primary use of
725 this namespace is in the using-directives:
726
727 using namespace odb::core;
728
729 The above form should be preferred over the old variant:
730
731 using namespace odb;
732
733 The new approach brings all the essential ODB names into the current
734 namespace without any of the auxiliary objects such as traits, etc., which
735 minimizes the likelihood of conflicts with other libraries. Note that you
736 should still use the odb namespace when qualifying individual names, for
737 example, odb::database.
738
739 * New option aliases: -q for --generate-query and -s for --generate-schema.
740
741 * Support for the default options file. Now, if configured, the ODB compiler
742 loads the default options file (by default ../etc/odb/default.options,
743 relative to the ODB compiler binary). This file can be used for
744 installation-wide customization, such as adding extra include search
745 paths.
746
747 Version 1.1.0
748
749 * Support for storing containers in the database. For more information refer
750 to Chapter 5, "Containers" in the ODB manual as well as the 'container'
751 example in the odb-examples package.
752
753 * Support for unidirectional and bidirectional object relationships,
754 including lazy loading. For more information refer to Chapter 6,
755 "Relationships" in the ODB manual as well as the 'relationship' and
756 'inverse' examples in the odb-examples package.
757
758 * Support for composite value types. For more information refer to Chapter
759 7, "Composite Value Types" in the ODB manual as well as the 'composite'
760 example in the odb-examples package.
761
762 * Support for sessions. A session is an application's unit of work that
763 may encompass several database transactions. In this version of ODB a
764 session is just an object cache. For more information refer to Chapter
765 8, "Session" in the ODB manual.
766
767 * Support for custom object pointers that allows you to use smart pointers
768 to return, pass, and cache persistent objects. See Section 3.2, "Object
769 Pointers" in the ODB manual for details.
770
771 * Support for native SQL statement execution. See Section 3.9, "Executing
772 Native SQL Statements" in the ODB manual for details.
773
774 * New option, --profile/-p, instructs the ODB compiler to use the specified
775 profile library. See the ODB compiler command line manual for details.
776
777 * Support for literal names (template-id, derived type declarator such as
778 pointers, etc) in data member declarations. Now, for example, you can use
779 std::vector<std::string> directly instead of having to create a typedef
780 alias for it.
781
782 * Support for inheritance from transient base types for object types and
783 composite value types.
784
785 * New example, 'schema/custom', shows how to map persistent C++ classes to
786 a custom database schema.
787
788 * New options, --odb-prologue, --odb-epilogue, allow inclusion of extra code
789 into the ODB compilation process. This can be useful for making additional
790 traits specializations or ODB pragmas known to the ODB compiler.
791
792 * Support for persistent classes without default constructors. For objects
793 of such classes only the load() and find() database functions that
794 populate an existing instance can be used. Similarly, only the load()
795 query result iterator function which populates an existing instance can
796 be used.
797
798 Version 1.0.0
799
800 * Initial release.