Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Index.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file basic/database/schema_generator/Index.hh
11 /// @brief Index class for the schema generator framework
12 /// @author Matthew O'Meara (mattjomeara@gmail.com)
13 
14 
15 #ifndef INCLUDED_basic_database_schema_generator_Index_HH
16 #define INCLUDED_basic_database_schema_generator_Index_HH
17 
18 #include <utility/vector1.hh>
22 
23 //C++ Headers
24 #include <string>
25 
26 namespace basic {
27 namespace database {
28 namespace schema_generator {
29 
30 class Index {
31 public:
32 
33  Index(
34  Column column,
35  bool unique=true);
36 
37  Index(
39  bool unique=true);
40 
41  Index(
42  Index const & src);
43 
44  Columns
45  columns();
46 
47  bool
48  unique() { return unique_; }
49 
50  std::string
51  print(
52  std::string const & table_name,
54  ) const ;
55 
56 private:
57  bool unique_;
59 };
60 
61 
62 } // schema_generator
63 } // namespace database
64 } // namespace utility
65 
66 #endif
std::string print(std::string const &table_name, utility::sql_database::sessionOP db_session) const
Definition: Index.cc:73
tuple database
vector1: std::vector with 1-based indexing
forward hearder for the Column class in the schema generator framework
pointer::shared_ptr< session > sessionOP
Index(Column column, bool unique=true)
Definition: Index.cc:42