diff options
Diffstat (limited to 'odb/relational/context.hxx')
-rw-r--r-- | odb/relational/context.hxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/odb/relational/context.hxx b/odb/relational/context.hxx index ca55650..990e0aa 100644 --- a/odb/relational/context.hxx +++ b/odb/relational/context.hxx @@ -23,6 +23,41 @@ namespace relational statement_where // WHERE clause. }; + // Index. + // + struct index + { + location_t loc; // Location of this index definition. + std::string name; // If empty, then derive from the member name. + std::string type; // E.g., "UNIQUE", etc. + std::string method; // E.g., "BTREE", etc. + std::string options; // Database-specific index options. + + struct member + { + location_t loc; // Location of this member specifier. + std::string name; // Member name, e.g., foo_, foo_.bar_. + data_member_path path; // Member path. + std::string options; // Member options, e.g., "ASC", etc. + }; + typedef std::vector<member> members_type; + + members_type members; + }; + + typedef std::vector<index> indexes; + + // Indexes in the above vector are in location order. + // + struct index_comparator + { + bool + operator() (index const& x, index const& y) const + { + return x.loc < y.loc; + } + }; + // Custom database type mapping. // struct custom_db_type |