Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

gql++/database-metadata.h

Go to the documentation of this file.
00001 /* This is for emacs: -*-Mode: C++;-*- */ 00002 #if !defined(__INC_DATABASE_METADATA_H) 00003 #define __INC_DATABASE_METADATA_H 00004 00005 #include "gql++/result-set.h" 00006 00007 namespace GQL 00008 { 00009 00013 class DatabaseMetaData : public SigC::Object 00014 { 00015 public: 00016 enum ImportedKeyUpdateRule 00017 { 00018 ImportedKeyNoAction, 00019 ImportedKeySetDefault, 00020 ImportedKeySetNull, 00021 ImportedKeyCascade, 00022 ImportedKeyRestrict 00023 }; 00024 00025 enum ImportedKeyDeferrability 00026 { 00027 ImportedKeyInitiallyDeferred, 00028 ImportedKeyInitiallyImmediate, 00029 ImportedKeyNotDeferrable 00030 }; 00031 00032 enum ColumnNullability 00033 { 00034 ColumnNoNulls, 00035 ColumnNullable, 00036 ColumnNullableUnknown 00037 }; 00038 00039 enum TableIndexType 00040 { 00041 TableIndexStatistic, 00042 TableIndexClustered, 00043 TableIndexHashed, 00044 TableIndexOther 00045 }; 00046 00070 virtual ResultSet *get_tables(const std::string& catalog, 00071 const std::string& schema, 00072 const std::string& table_name_pattern, 00073 const std::vector<std::string>& types) = 0; 00074 00075 /* Get information about table columns. 00076 * 00077 * \return ResultSet of column descriptions, having the following 00078 * columns: 00079 * <ul> 00080 * <li>0. \b TABLE_CAT String => table catalog (may be null) 00081 * <li>1. \b TABLE_SCHEM String => table schema (may be null) 00082 * <li>2. \b TABLE_NAME String => table name 00083 * <li>3. \b COLUMN_NAME String => column name 00084 * <li>4. \b DATA_TYPE SQLType => data type 00085 * <li>5. \b NULLABLE ColumnNullability => is NULL allowed. 00086 * <li>6. REMARKS String => comment describing column (may be null) 00087 * <li>7. COLUMN_DEF String => default value (may be null) 00088 * <li>8. ORDINAL_POSITION int => index of column in table 00089 * (starting at 0) 00090 * </ul> */ 00091 virtual ResultSet *get_columns(const std::string& catalog, 00092 const std::string& schema, 00093 const std::string& table_name_pattern, 00094 const std::string& column_name_pattern) = 0; 00095 00114 virtual ResultSet *get_primary_keys(const std::string& catalog, 00115 const std::string& schema, 00116 const std::string& table) = 0; 00117 00140 virtual ResultSet *get_cross_reference( 00141 const std::string& primary_catalog, 00142 const std::string& primary_schema, 00143 const std::string& primary_table, 00144 const std::string& foreign_catalog, 00145 const std::string& foreign_schema, 00146 const std::string& foreign_table) = 0; 00147 00148 virtual ResultSet *get_imported_keys(const std::string& catalog, 00149 const std::string& schema, 00150 const std::string& table) = 0; 00151 00152 virtual ResultSet *get_exported_keys(const std::string& catalog, 00153 const std::string& schema, 00154 const std::string& table) = 0; 00155 00205 virtual ResultSet *get_index_info(const std::string& catalog, 00206 const std::string& schema, 00207 const std::string& table, 00208 bool unique, 00209 bool approximate) = 0; 00210 }; 00211 00212 } 00213 00214 #endif

Generated on Fri Aug 13 14:16:18 2004 for gql by doxygen 1.3.7