aboutsummaryrefslogtreecommitdiff
path: root/odb/relational/pgsql
AgeCommit message (Collapse)AuthorFilesLines
2012-11-20Ignore polymorphic id reference when generating grow()2.1.12.1Boris Kolpackov1-0/+6
2012-09-04NULL handling improvementsBoris Kolpackov1-21/+23
Add support for specifying NULL-ness for types with built-in mapping. Handle Oracle [N]VARCHAR2 and SQLite FLOAT oddities using this mechanism instead of overriding it at the schema generation level. Also use the is_null argument that is passed to value_traits::init_image() to indicate whether the value can be NULL.
2012-08-14Fix potential container statement name conflictBoris Kolpackov1-3/+6
2012-07-27Handle special case of array of zero elementsBoris Kolpackov1-0/+7
2012-07-27Add support for defining indexesBoris Kolpackov1-4/+47
New db pragma qualifier: index. New tests: common/index, mysql/index, pgsql/index.
2012-07-27Move indexes from model scope to table scopeBoris Kolpackov1-2/+6
Conceptually, indexes belong to tables and some databases (MySQL, MSSQL) indeed treat them as such (i.e., you can have indexes with the same name in different tables).
2012-07-25Simplify auto id implementation in OracleBoris Kolpackov1-10/+1
Specifically, instead of using a trigger to assign the next id from the sequence, get the next value directly in the INSERT statement.
2012-07-25Clean up PostgreSQL auto id implementationBoris Kolpackov2-6/+11
Specifically, avoid sending the auto id value.
2012-07-17Remove unnecessary instance<> usageBoris Kolpackov2-25/+25
2012-07-10Add support for custom database type mappingBoris Kolpackov4-44/+131
New pragma qualifier, map, and specifiers: as, to, from. New tests: <database>/custom.
2012-04-27Add support for NULL pointers to objects with composite object idsBoris Kolpackov1-0/+43
2012-04-25Fix auto id handling in polymorphic objectsBoris Kolpackov1-1/+4
2012-04-23Polymorphic inheritance supportBoris Kolpackov4-177/+87
2012-03-07Use RAII to free select statement resultsBoris Kolpackov1-0/+1
2012-02-22Add support for composite object idsBoris Kolpackov6-571/+111
New pragma id_type (member). New test: common/composite-id. The composite example has also been updated.
2012-01-29Update copyright yearBoris Kolpackov8-8/+8
2012-01-29Remove author field from file headerBoris Kolpackov8-8/+0
Too much effort to maintain.
2012-01-26Implement support for database schemaBoris Kolpackov1-3/+17
New pragma qualifier: namespace. New pragma specifier: schema. The table specifier was extended to accept a schema prefix. New option: --default- schema. The common/schema test was extended to cover the new functionality.
2012-01-20Remove unnecessary qualificationBoris Kolpackov1-1/+1
2012-01-20Add support for case where we don't send auto object id in INSERTBoris Kolpackov1-0/+1
2012-01-20ODB compiler implementation, traits, and types test for SQL ServerBoris Kolpackov1-1/+6
2012-01-08Add support for defining composite value type as class template instantiationsBoris Kolpackov1-5/+5
2011-11-09Make sure we can use same type as both container and simple valueBoris Kolpackov4-9/+20
2011-11-01Implement support for optimistic concurrencyBoris Kolpackov2-15/+79
New pragmas: optimistic, version. New test: optimistic. New database function: reload().
2011-10-28Implement returning of auto id using RETURNING clause in PostgreSQLBoris Kolpackov1-0/+12
Before we used a separate SELECT lastval() query which was both inefficient and error-prone in cases where INSERT may cause triggers to override the last value.
2011-10-27Add support for persistent classes without object idsBoris Kolpackov1-14/+20
New pragma id (object). New test: common/no-id.
2011-10-24Generate database schema from database model instead of C++ modelBoris Kolpackov4-243/+216
We now first create the so-called database model from C++ model and then use that to generate the database schema. The new approach also adds more general support for primary/foreign keys, including multi- column keys. Finally, for MySQL we now generate out-of-line foreign key definitions. Because MySQL does not support deferred constraints checking, deferred foreign keys are written commented out, for documentation.
2011-10-21Add support for const data membersBoris Kolpackov4-32/+77
Const data members are automatically treated as readonly. New test: const-member.
2011-10-21Add support for readonly membersBoris Kolpackov1-19/+58
New pragma: readonly. New test: readonly.
2011-10-21Split 'in' binding into insert/update pair; rename 'out' to selectBoris Kolpackov2-32/+100
Also add the initial infrastructure for the readonly members support. Right now the split insert/update bindings allows us to avoid sending object id in UPDATE statements. It will also allows us to support readonly members.
2011-10-21Rename relational::context::use_as to relational::context::need_alias_asConstantin Michael1-1/+1
2011-10-21Add a context flag indicating whether AS SQL keyword should be used for aliasesConstantin Michael1-0/+1
2011-10-21Add flag to context indicating whether to generate grow codeConstantin Michael1-0/+1
2011-09-22Make PG generated code look nicer1.6.0.a2Boris Kolpackov1-8/+7
2011-09-21Rework const object handlingBoris Kolpackov1-1/+1
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-2/+2
2011-09-20Fix indentationBoris Kolpackov1-2/+2
2011-09-19Rename generation_failed exception to operation_failedBoris Kolpackov2-11/+11
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-16Support for views; integrated partBoris Kolpackov2-6/+7
2011-09-09New templated query_columns architectureBoris Kolpackov2-29/+29
We also now use the correct separate "role"-base join approach instead of having a single merged join for each table.
2011-09-09Fix bug in PG type oid generationBoris Kolpackov1-6/+16
2011-09-06View support customizations for PostgreSQLBoris Kolpackov2-10/+43
2011-09-05Support for views; native partBoris Kolpackov1-2/+2
2011-08-31Rename comp_value() predicate to composite()Boris Kolpackov4-13/+13
2011-08-31Add transient() predicateBoris Kolpackov1-1/+1
2011-08-31Cosmetic changes and cleanupsBoris Kolpackov4-15/+17
Rename some functions to have consistent names. Add object() predicate.
2011-08-28Add wrapper support for containersBoris Kolpackov4-16/+18
2011-08-28Add wrapper support for composite valuesBoris Kolpackov4-14/+60
NULL semantics for composite values is not yet supported.
2011-08-22Add database::erase_query() functionBoris Kolpackov2-9/+22
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-19Make container object_id reference the objectBoris Kolpackov1-7/+33
Make it ON DELETE CASCADE. Also in erase(), delete the container rows first.