summaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-02-27 12:34:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-02-27 12:34:08 +0200
commite286f8e078a29dec70e4c515d6afa5b000638980 (patch)
treedb681e30720809387b2489c76fa0e149c60a395b /odb/context.hxx
parent1695dc152f25a1806ce0539da5120bba718cbd12 (diff)
Add support for specifying table prefix on namespace
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index 7e62161..3865e88 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -474,6 +474,11 @@ public:
qname
schema (semantics::scope&) const;
+ // Table name prefix for a namespace.
+ //
+ string
+ table_name_prefix (semantics::scope&) const;
+
//
//
qname
@@ -485,10 +490,11 @@ public:
struct table_prefix
{
table_prefix (): level (0) {}
- table_prefix (qname const& s, qname const& p, size_t l)
- : schema (s), prefix (p), level (l) {}
+ table_prefix (qname const& ns_s, string const& ns_p, qname const& p)
+ : ns_schema (ns_s), ns_prefix (ns_p), prefix (p), level (1) {}
- qname schema; // Object's namespace schema.
+ qname ns_schema; // Object's namespace schema.
+ string ns_prefix; // Object's namespace table prefix.
qname prefix;
size_t level;
};