summaryrefslogtreecommitdiff
path: root/odb/semantics/relational
diff options
context:
space:
mode:
Diffstat (limited to 'odb/semantics/relational')
-rw-r--r--odb/semantics/relational/index.hxx31
-rw-r--r--odb/semantics/relational/key.hxx9
2 files changed, 39 insertions, 1 deletions
diff --git a/odb/semantics/relational/index.hxx b/odb/semantics/relational/index.hxx
index af90b12..bf08a23 100644
--- a/odb/semantics/relational/index.hxx
+++ b/odb/semantics/relational/index.hxx
@@ -17,13 +17,42 @@ namespace semantics
class index: public key
{
public:
- index (string const& id): key (id) {}
+ index (string const& id,
+ string const& t = string (),
+ string const& m = string (),
+ string const& o = string ())
+ : key (id), type_ (t), method_ (m), options_ (o)
+ {
+ }
+
+ string const&
+ type () const
+ {
+ return type_;
+ }
+
+ string const&
+ method () const
+ {
+ return method_;
+ }
+
+ string const&
+ options () const
+ {
+ return options_;
+ }
virtual string
kind () const
{
return "index";
}
+
+ private:
+ string type_; // E.g., "UNIQUE", etc.
+ string method_; // E.g., "BTREE", etc.
+ string options_; // Database-specific index options.
};
}
}
diff --git a/odb/semantics/relational/key.hxx b/odb/semantics/relational/key.hxx
index 40e7499..3b86f1c 100644
--- a/odb/semantics/relational/key.hxx
+++ b/odb/semantics/relational/key.hxx
@@ -32,7 +32,15 @@ namespace semantics
return *column_;
}
+ string const&
+ options () const
+ {
+ return options_;
+ }
+
public:
+ contains (string const& o = string ()) : options_ (o) {}
+
void
set_left_node (key_type& n)
{
@@ -48,6 +56,7 @@ namespace semantics
protected:
key_type* key_;
column_type* column_;
+ string options_;
};
class key: public unameable