00001
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
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
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