summaryrefslogtreecommitdiff
path: root/odb/relational/source.hxx
AgeCommit message (Collapse)AuthorFilesLines
2011-10-03Use traditional const placementBoris Kolpackov1-2/+2
2011-10-02If query substituting placeholder is empty, pass true expression insteadBoris Kolpackov1-5/+15
This allows uniform usage of views both with and without any extra conditions. Also optimize some common cases so that we don't have useless WHERE TRUE clauses or (...) AND (TRUE) expressions.
2011-09-27Add support for associating tables with viewsBoris Kolpackov1-30/+106
2011-09-21Rework const object handlingBoris Kolpackov1-57/+13
Now objects are always loaded as non-const and the object cache in session treats all objects as non-const.
2011-09-20Rename query_clause to query_statement for consistencyBoris Kolpackov1-7/+7
2011-09-19Rename generation_failed exception to operation_failedBoris Kolpackov1-6/+6
A more generic name is required since it is now used in both generator and processor (and in the future may be used validator).
2011-09-19Use query_base_type instead of query_type as argument typeBoris Kolpackov1-5/+5
The base type is sufficient.
2011-09-19Rename error.?xx to diagnostics.?xxBoris Kolpackov1-1/+1
2011-09-16Don't use DISTINCT in generated SELECT statementsBoris Kolpackov1-4/+1
We needed it before for objects that involved relationships (and therefore JOINs) but it appears with the new JOIN handling approach (no merging of multiple relationships into a single JOIN), we don't need DISTINCT anymore. All the tests pass and all the examples produce identical output with and without DISTINCT.
2011-09-16Support for views; integrated partBoris Kolpackov1-21/+756
2011-09-09New templated query_columns architectureBoris Kolpackov1-119/+62
We also now use the correct separate "role"-base join approach instead of having a single merged join for each table.
2011-09-05Support for views; native partBoris Kolpackov1-48/+209
2011-08-31Rename comp_value() predicate to composite()Boris Kolpackov1-10/+10
2011-08-31Cosmetic changes and cleanupsBoris Kolpackov1-30/+35
Rename some functions to have consistent names. Add object() predicate.
2011-08-28Add wrapper support for containersBoris Kolpackov1-10/+23
2011-08-28Add wrapper support for composite valuesBoris Kolpackov1-10/+32
NULL semantics for composite values is not yet supported.
2011-08-25Add experimental code (commented out) for DELETE JOIN supportBoris Kolpackov1-1/+11
This would be needed to support object relationships in the erase_query() functionality.
2011-08-22Add database::erase_query() functionBoris Kolpackov1-19/+58
New test: common/erase-query. Documentation is in Section 3.9, "Deleting Persistent Objects". The current implementation does not work well with the session (no removal of the erased objects from the cache).
2011-08-21Add support for multi-pass database schema dropBoris Kolpackov1-20/+45
2011-08-19Rework query machinery not to use '_' as primary table aliasBoris Kolpackov1-21/+54
Now we always qualify with the actual table name and use the '_' alias for situations where an object is referencing itself.
2011-08-19Make container object_id reference the objectBoris Kolpackov1-4/+10
Make it ON DELETE CASCADE. Also in erase(), delete the container rows first.
2011-08-18Fix custom recursive loading in post_load callbackBoris Kolpackov1-2/+2
Before we called the callback while holding the statements locked. As a result, if the callback tried to load another object of this type, it failed. Now we unlock the statements (since we have completely loaded the object from ODB's point of view) and then call the callback. The callback test has been updated to test this situation.
2011-07-08Have separate table set for each schema generation passBoris Kolpackov1-17/+11
2011-07-05Add support for multi-pass database schema generationBoris Kolpackov1-50/+129
2011-07-05Add query_statment_ctor and post_query_ hooks to relational source generationConstantin Michael1-7/+25
2011-07-05Fully qualify all references to odb::details namespaceConstantin Michael1-8/+8
2011-07-05Add hooks for generating extra code in container traitsConstantin Michael1-0/+7
2011-07-05Add base typedef to relational::query_parametersConstantin Michael1-0/+2
2011-07-04Implement support for database operations callbacksBoris Kolpackov1-2/+4
New object pragma: callback. New test: common/callback. New manual section: 10.1.4, "callback".
2011-06-21Distinguish between normal and auto-id params in persist statementBoris Kolpackov1-11/+43
This can be necessary to handle auto-id assignment in some databases, such as PostgreSQL.
2011-06-21Add hooks for generating extra code in object traitsBoris Kolpackov1-0/+7
2011-05-04Add support for customizing query parameter formatBoris Kolpackov1-41/+82
2011-05-04Cosmetic changesBoris Kolpackov1-1/+1
2011-04-25Add support for abstract object typesBoris Kolpackov1-133/+150
2011-04-25Reuse container traits from composite valuesBoris Kolpackov1-161/+204
2011-04-25Reuse container traits from base objectsBoris Kolpackov1-7/+11
2011-04-25Pass id binding instead of id image in container traitsBoris Kolpackov1-58/+68
This will allow us to reuse things more.
2011-04-22Initial support for non-polymorphic inheritanceBoris Kolpackov1-71/+105
Every class gets a separate table. New test: common/inheritance.
2011-04-19Move extra headers hook to the beginningBoris Kolpackov1-2/+2
2011-04-19Output object columns via traverserBoris Kolpackov1-50/+65
2011-03-28Mark parameter in create_schema as potentially unusedBoris Kolpackov1-1/+3
This can happen if more than one class is mapped to the same table.
2011-03-25Further generalization work for SQLite supportBoris Kolpackov1-7/+16
2011-03-24Generalization work for MySQL and SQLite supportBoris Kolpackov1-167/+259
2011-03-21Create indexes in separate SQL statementsBoris Kolpackov1-2/+5
This is more vendor-neutral.
2011-03-21Add default_ctor() to semantics::class_Boris Kolpackov1-4/+1
Use it in the code generators instead of calling the GCC AST macro.
2011-03-21Split MySQL code generator into common and db-specific partsBoris Kolpackov1-0/+2424
The common part (in relational/) still has some MySQL-specific parts. Also, add the notion of the current context which is used to avoid explicitly passing the context object to every generator's c-tor.