Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSQLDatabaseMetaData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TSQLDatabaseMetaData.h
1 // $Id: TSQLDatabaseMetaData.h,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
2 
3 #ifndef RDBC_TSQLDatabaseMetaData_h
4 #define RDBC_TSQLDatabaseMetaData_h
5 
6 //
7 // Provides several tons of information about a data source
8 //
9 
10 #ifndef RDBC_TSQL_h
11 #include <RDBC/TSQL.h>
12 #endif
13 
14 class TSQLResultSet;
15 class TSQLConnection;
18 {
19 friend class TSQLConnection;
20 
21 protected:
22  TSQLConnection* fConnection; // connection that produced this metadata object
23  TString fUrl; // url/dsn
24 
25  TSQLDatabaseMetaData( TSQLConnection* connection,void* imp=0 );
26  virtual ~TSQLDatabaseMetaData();
27 
28  void SetURL(const TString& url) { fUrl=url; }
29  void Set(TSQLConnection* connection,void* imp=0)
30  { fConnection=connection; fImp=imp; }
31 public:
33  kBestRowTemporary = 0, // SQL_SCOPE_CURROW
34  kBestRowTransaction = 1, // SQL_SCOPE_TRANSACTION
35  kBestRowSession = 2, // SQL_SCOPE_SESSION
36 
37  kBestRowUnknown = 0, // SQL_PC_UNKNOWN,
38  kBestRowPseudo = 2, // SQL_PC_PSEUDO,
39  kBestRowNotPseudo = 1, // SQL_PC_NOT_PSEUDO
40 
41  kVersionColumnNotPseudo = 1, // SQL_PC_NOT_PSEUDO,
42  kVersionColumnPseudo = 2, // SQL_PC_PSEUDO,
43  kVersionColumnUnknown = 0, // SQL_PC_UNKNOWN
44 
45  kTypeNoNulls = 0, // SQL_NO_NULLS,
46  kTypeNullable = 1, // SQL_NULLABLE,
47  kTypeNullableUnknown = 2, // SQL_NULLABLE_UNKNOWN
48 
49  kColumnNoNulls = 0, // SQL_NO_NULLS,
50  kColumnNullable = 1, // SQL_NULLABLE,
51  kColumnNullableUnknown = 2, // SQL_NULLABLE_UNKNOWN
52 
53  kTypePredNone = 0, // SQL_UNSEARCHABLE,
54  kTypePredChar = 1, // SQL_LIKE_ONLY,
55  kTypePredBasic = 2, // SQL_ALL_EXCEPT_LIKE,
56  kTypeSearchable = 3, // SQL_SEARCHABLE
57 
58  kImportedKeyCascade = 0x00000020L, // SQL_CASCADE,
59  kImportedKeySetNull = 2, // SQL_SET_NULL,
60  kImportedKeySetDefault = 4, // SQL_SET_DEFAULT,
61  kImportedKeyNoAction = 3, // SQL_NO_ACTION,
62  kImportedKeyRestrict = 1, // SQL_RESTRICT
63 
64  kImportedKeyInitiallyDeferred = 5, // SQL_INITIALLY_DEFERRED,
65  kImportedKeyInitiallyImmediate = 6, // SQL_INITIALLY_IMMEDIATE,
66  kImportedKeyNotDeferrable = 7, // SQL_NOT_DEFERRABLE
67 
68  kTableIndexClustered = 1, // SQL_INDEX_CLUSTERED,
69  kTableIndexHashed = 2, // SQL_INDEX_HASHED,
70  kTableIndexOther = 3, // SQL_INDEX_OTHER,
71  kTableIndexStatistic = 0, // SQL_TABLE_STAT
72 
73  kProcedureColumnIn = 1, // SQL_PARAM_INPUT,
74  kProcedureColumnInOut = 2, // SQL_PARAM_INPUT_OUTPUT,
75  kProcedureColumnOut = 4, // SQL_PARAM_OUTPUT,
76  kProcedureColumnResult = 3, // SQL_RESULT_COL,
77  kProcedureColumnReturn = 5, // SQL_RETURN_VALUE,
78  kProcedureColumnUnknown = 0, // SQL_PARAM_TYPE_UNKNOWN
79 
80  kProcedureNoNulls = 0, // SQL_NO_NULLS,
81  kProcedureNullable = 1, // SQL_NULLABLE,
82  kProcedureNullableUnknown = 2, // SQL_NULLABLE_UNKNOWN
83 
84  kProcedureReturnsResult = 2, // SQL_PT_FUNCTION,
85  kProcedureNoResult = 1, // SQL_PT_PROCEDURE,
86  kProcedureResultUnknown = 0 // SQL_PT_UNKNOWN
87  };
88 
89 public:
90  virtual Bool_t AllProceduresAreCallable() = 0;
91  virtual Bool_t AllTablesAreSelectable() = 0;
92  virtual TString GetUserName() = 0;
93  virtual Bool_t IsReadOnly() = 0;
94  virtual Bool_t NullsAreSortedHigh() = 0;
95  virtual Bool_t NullsAreSortedLow() = 0;
96  virtual Bool_t NullsAreSortedAtStart() = 0;
97  virtual Bool_t NullsAreSortedAtEnd() = 0;
98  virtual TString GetDatabaseProductName() = 0;
99  virtual TString GetDatabaseProductVersion() = 0;
100  virtual TString GetDriverName() = 0;
101  virtual TString GetDriverVersion() = 0;
102  virtual Int_t GetDriverMajorVersion() = 0;
103  virtual Int_t GetDriverMinorVersion() = 0;
104  virtual Bool_t UsesLocalFiles() = 0;
105  virtual Bool_t UsesLocalFilePerTable() = 0;
106  virtual Bool_t SupportsMixedCaseIdentifiers() = 0;
107  virtual Bool_t StoresUpperCaseIdentifiers() = 0;
108  virtual Bool_t StoresLowerCaseIdentifiers() = 0;
109  virtual Bool_t StoresMixedCaseIdentifiers() = 0;
110  virtual Bool_t SupportsMixedCaseQuotedIdentifiers() = 0;
111  virtual Bool_t StoresUpperCaseQuotedIdentifiers() = 0;
112  virtual Bool_t StoresLowerCaseQuotedIdentifiers() = 0;
113  virtual Bool_t StoresMixedCaseQuotedIdentifiers() = 0;
114  virtual TString GetIdentifierQuoteString() = 0;
115  virtual TString GetSQLKeywords() = 0;
116  virtual TString GetNumericFunctions() = 0;
117  virtual TString GetStringFunctions() = 0;
118  virtual TString GetSystemFunctions() = 0;
119  virtual TString GetTimeDateFunctions() = 0;
120  virtual TString GetSearchStringEscape() = 0;
121  virtual TString GetExtraNameCharacters() = 0;
122  virtual Bool_t SupportsAlterTableWithAddColumn() = 0;
123  virtual Bool_t SupportsAlterTableWithDropColumn() = 0;
124  virtual Bool_t SupportsColumnAliasing() = 0;
125  virtual Bool_t NullPlusNonNullIsNull() = 0;
126  virtual Bool_t SupportsConvert() = 0;
127  virtual Bool_t SupportsConvert(Int_t fromType,Int_t toType) = 0;
128  virtual Bool_t SupportsTableCorrelationNames() = 0;
129  virtual Bool_t SupportsDifferentTableCorrelationNames() = 0;
130  virtual Bool_t SupportsExpressionsInOrderBy() = 0;
131  virtual Bool_t SupportsOrderByUnrelated() = 0;
132  virtual Bool_t SupportsGroupBy() = 0;
133  virtual Bool_t SupportsGroupByUnrelated() = 0;
134  virtual Bool_t SupportsGroupByBeyondSelect() = 0;
135  virtual Bool_t SupportsLikeEscapeClause() = 0;
136  virtual Bool_t SupportsMultipleResultSets() = 0;
137  virtual Bool_t SupportsMultipleTransactions() = 0;
138  virtual Bool_t SupportsNonNullableColumns() = 0;
139  virtual Bool_t SupportsMinimumSQLGrammar() = 0;
140  virtual Bool_t SupportsCoreSQLGrammar() = 0;
141  virtual Bool_t SupportsExtendedSQLGrammar() = 0;
142  virtual Bool_t SupportsANSI92EntryLevelSQL() = 0;
143  virtual Bool_t SupportsANSI92IntermediateSQL() = 0;
144  virtual Bool_t SupportsANSI92FullSQL() = 0;
145  virtual Bool_t SupportsIntegrityEnhancementFacility() = 0;
146  virtual Bool_t SupportsOuterJoins() = 0;
147  virtual Bool_t SupportsFullOuterJoins() = 0;
148  virtual Bool_t SupportsLimitedOuterJoins() = 0;
149  virtual TString GetSchemaTerm() = 0;
150  virtual TString GetTableTerm() = 0;
151  virtual TString GetProcedureTerm() = 0;
152  virtual TString GetCatalogTerm() = 0;
153  virtual Bool_t IsCatalogAtStart() = 0;
154  virtual TString GetCatalogSeparator() = 0;
155  virtual Bool_t SupportsSchemasInDataManipulation() = 0;
156  virtual Bool_t SupportsSchemasInProcedureCalls() = 0;
157  virtual Bool_t SupportsSchemasInTableDefinitions() = 0;
158  virtual Bool_t SupportsSchemasInIndexDefinitions() = 0;
159  virtual Bool_t SupportsSchemasInPrivilegeDefinitions() = 0;
160  virtual Bool_t SupportsCatalogsInDataManipulation() = 0;
161  virtual Bool_t SupportsCatalogsInProcedureCalls() = 0;
162  virtual Bool_t SupportsCatalogsInTableDefinitions() = 0;
163  virtual Bool_t SupportsCatalogsInIndexDefinitions() = 0;
164  virtual Bool_t SupportsCatalogsInPrivilegeDefinitions() = 0;
165  virtual Bool_t SupportsPositionedDelete() = 0;
166  virtual Bool_t SupportsPositionedUpdate() = 0;
167  virtual Bool_t SupportsSelectForUpdate() = 0;
168  virtual Bool_t SupportsStoredProcedures() = 0;
169  virtual Bool_t SupportsSubqueriesInComparisons() = 0;
170  virtual Bool_t SupportsSubqueriesInExists() = 0;
171  virtual Bool_t SupportsSubqueriesInIns() = 0;
172  virtual Bool_t SupportsSubqueriesInQuantifieds() = 0;
173  virtual Bool_t SupportsCorrelatedSubqueries() = 0;
174  virtual Bool_t SupportsUnion() = 0;
175  virtual Bool_t SupportsUnionAll() = 0;
176  virtual Bool_t SupportsOpenCursorsAcrossRollback() = 0;
177  virtual Bool_t SupportsOpenStatementsAcrossCommit() = 0;
178  virtual Bool_t SupportsOpenStatementsAcrossRollback() = 0;
179  virtual Int_t GetMaxBinaryLiteralLength() = 0;
180  virtual Int_t GetMaxCharLiteralLength() = 0;
181  virtual Int_t GetMaxColumnNameLength() = 0;
182  virtual Int_t GetMaxColumnsInGroupBy() = 0;
183  virtual Int_t GetMaxColumnsInIndex() = 0;
184  virtual Int_t GetMaxColumnsInOrderBy() = 0;
185  virtual Int_t GetMaxColumnsInSelect() = 0;
186  virtual Int_t GetMaxColumnsInTable() = 0;
187  virtual Int_t GetMaxConnections() = 0;
188  virtual Int_t GetMaxCursorNameLength() = 0;
189  virtual Int_t GetMaxIndexLength() = 0;
190  virtual Int_t GetMaxSchemaNameLength() = 0;
191  virtual Int_t GetMaxProcedureNameLength() = 0;
192  virtual Int_t GetMaxCatalogNameLength() = 0;
193  virtual Int_t GetMaxRowSize() = 0;
194  virtual Bool_t DoesMaxRowSizeIncludeBlobs() = 0;
195  virtual Int_t GetMaxStatementLength() = 0;
196  virtual Int_t GetMaxStatements() = 0;
197  virtual Int_t GetMaxTableNameLength() = 0;
198  virtual Int_t GetMaxTablesInSelect() = 0;
199  virtual Int_t GetMaxUserNameLength() = 0;
200  virtual Int_t GetDefaultTransactionIsolation() = 0;
201  virtual Bool_t SupportsTransactions() = 0;
202  virtual Bool_t SupportsTransactionIsolationLevel(Int_t level) = 0;
204  virtual Bool_t SupportsDataManipulationTransactionsOnly() = 0;
205  virtual Bool_t DataDefinitionCausesTransactionCommit() = 0;
206  virtual Bool_t DataDefinitionIgnoredInTransactions() = 0;
207  virtual Bool_t SupportsResultSetType(Int_t type) = 0;
208  virtual Bool_t SupportsResultSetConcurrency( Int_t type,Int_t concurrency ) = 0;
209  virtual Bool_t OwnUpdatesAreVisible(Int_t type) = 0;
210  virtual Bool_t OwnDeletesAreVisible(Int_t type) = 0;
211  virtual Bool_t OwnInsertsAreVisible(Int_t type) = 0;
212  virtual Bool_t OthersUpdatesAreVisible(Int_t type) = 0;
213  virtual Bool_t OthersDeletesAreVisible(Int_t type) = 0;
214  virtual Bool_t OthersInsertsAreVisible(Int_t type) = 0;
215  virtual Bool_t UpdatesAreDetected(Int_t type) = 0;
216  virtual Bool_t DeletesAreDetected(Int_t type) = 0;
217  virtual Bool_t InsertsAreDetected(Int_t type) = 0;
218  virtual Bool_t SupportsBatchUpdates() = 0;
219  virtual TSQLResultSet* GetProcedures( const TString& catalog,
220  const TString& schemaPattern,
221  const TString& procedureNamePattern ) = 0;
222  virtual TSQLResultSet* GetProcedureColumns( const TString& catalog,
223  const TString& schemaPattern,
224  const TString& procedureNamePattern,
225  const TString& columnNamePattern ) = 0;
226  virtual TSQLResultSet* GetTables( const TString& catalog,
227  const TString& schemaPattern,
228  const TString& tableNamePattern,
229  const TString& types ) = 0;
230  virtual TSQLResultSet* GetSchemas() = 0;
231  virtual TSQLResultSet* GetCatalogs() = 0;
232  virtual TSQLResultSet* GetTableTypes() = 0;
233  virtual TSQLResultSet* GetColumns( const TString& catalog,
234  const TString& schemaPattern,
235  const TString& tableNamePattern,
236  const TString& columnNamePattern ) = 0;
237  virtual TSQLResultSet* GetColumnPrivileges( const TString& catalog,
238  const TString& schema,
239  const TString& table,
240  const TString& columnNamePattern ) = 0;
241  virtual TSQLResultSet* GetTablePrivileges( const TString& catalog,
242  const TString& schemaPattern,
243  const TString& tableNamePattern ) = 0;
244  virtual TSQLResultSet* GetBestRowIdentifier( const TString& catalog,
245  const TString& schema,
246  const TString& table,
247  Int_t scope,
248  Bool_t nullable ) = 0;
249  virtual TSQLResultSet* GetVersionColumns( const TString& catalog,
250  const TString& schema,
251  const TString& table ) = 0;
252  virtual TSQLResultSet* GetPrimaryKeys( const TString& catalog,
253  const TString& schema,
254  const TString& table) = 0;
255  virtual TSQLResultSet* GetImportedKeys( const TString& catalog,
256  const TString& schema,
257  const TString& table ) = 0;
258  virtual TSQLResultSet* GetExportedKeys( const TString& catalog,
259  const TString& schema,
260  const TString& table ) = 0;
261  virtual TSQLResultSet* GetCrossReference( const TString& primaryCatalog,
262  const TString& primarySchema,
263  const TString& primaryTable,
264  const TString& foreignCatalog,
265  const TString& foreignSchema,
266  const TString& foreignTable ) = 0;
267  virtual TSQLResultSet* GetTypeInfo() = 0;
268  virtual TSQLResultSet* GetIndexInfo( const TString& catalog,
269  const TString& schema,
270  const TString& table,
271  Bool_t unique,
272  Bool_t approximate ) = 0;
273 
275  virtual TString GetURL() const { return fUrl; }
276 
277 ClassDef(TSQLDatabaseMetaData,0) // Provides information about the database as a whole
278 };
279 
280 #endif // RDBC_TSQLDatabaseMetaData_h