diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-17 10:08:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-22 12:29:43 +0200 |
commit | 3a1eed21d4d5d0e7f6a9f400420fdc28d7be9b61 (patch) | |
tree | 97ba7338fb804c264c9eaaaa41085b08f6483c68 /odb/context.hxx | |
parent | 3f73cc933b64d7d9a88325d33a3c33a0e28720c6 (diff) |
Add support for composite object ids
New pragma id_type (member). New test: common/composite-id. The composite
example has also been updated.
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/odb/context.hxx b/odb/context.hxx index e67af48..7e62161 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -364,6 +364,12 @@ public: return t.get<semantics::class_*> ("element-type", 0); } + // If this data member is or is part of an object pointer, then + // return the member that is the pointer. Otherwise, return 0. + // + static semantics::data_member* + object_pointer (data_member_path const&); + static bool abstract (semantics::class_& c) { @@ -385,6 +391,12 @@ public: return m.count ("id"); } + // If this data member is or is part of an id member, then return + // the member that is marked as the id. Otherwise, return 0. + // + static semantics::data_member* + id (data_member_path const&); + static bool auto_ (semantics::data_member& m) { @@ -500,6 +512,11 @@ public: string const& default_name) const; string + column_type (const data_member_path&, + string const& key_prefix = string (), + bool id = false); // Pass true if this type is object id other + // than because of the members in the path. + string column_type (semantics::data_member&, string const& key_prefix = string ()); string |