1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
7 * Copyright 2000, 2010 Oracle and/or its affiliates.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
29 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
31 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
32 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *************************************************************************/
36 #ifndef INCLUDED_EXAMPLES_DATABASE_DRIVERSKELETON_SDATABASEMETADATA_HXX
37 #define INCLUDED_EXAMPLES_DATABASE_DRIVERSKELETON_SDATABASEMETADATA_HXX
39 #include "SConnection.hxx"
40 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
41 #include <cppuhelper/implbase1.hxx>
43 namespace connectivity
48 typedef ::cppu::WeakImplHelper1
< ::com::sun::star::sdbc::XDatabaseMetaData
> ODatabaseMetaData_BASE
;
50 class ODatabaseMetaData
: public ODatabaseMetaData_BASE
52 OConnection
* m_pConnection
;
53 sal_Bool m_bUseCatalog
;
56 inline OConnection
* getOwnConnection() const { return m_pConnection
; }
58 ODatabaseMetaData(OConnection
* _pCon
);
59 virtual ~ODatabaseMetaData();
61 // as I mentioned before this interface is really BIG
63 virtual sal_Bool SAL_CALL
allProceduresAreCallable( );
64 virtual sal_Bool SAL_CALL
allTablesAreSelectable( );
65 virtual ::rtl::OUString SAL_CALL
getURL( );
66 virtual ::rtl::OUString SAL_CALL
getUserName( );
67 virtual sal_Bool SAL_CALL
isReadOnly( );
68 virtual sal_Bool SAL_CALL
nullsAreSortedHigh( );
69 virtual sal_Bool SAL_CALL
nullsAreSortedLow( );
70 virtual sal_Bool SAL_CALL
nullsAreSortedAtStart( );
71 virtual sal_Bool SAL_CALL
nullsAreSortedAtEnd( );
72 virtual ::rtl::OUString SAL_CALL
getDatabaseProductName( );
73 virtual ::rtl::OUString SAL_CALL
getDatabaseProductVersion( );
74 virtual ::rtl::OUString SAL_CALL
getDriverName( );
75 virtual ::rtl::OUString SAL_CALL
getDriverVersion( );
76 virtual sal_Int32 SAL_CALL
getDriverMajorVersion( );
77 virtual sal_Int32 SAL_CALL
getDriverMinorVersion( );
78 virtual sal_Bool SAL_CALL
usesLocalFiles( );
79 virtual sal_Bool SAL_CALL
usesLocalFilePerTable( );
80 virtual sal_Bool SAL_CALL
supportsMixedCaseIdentifiers( );
81 virtual sal_Bool SAL_CALL
storesUpperCaseIdentifiers( );
82 virtual sal_Bool SAL_CALL
storesLowerCaseIdentifiers( );
83 virtual sal_Bool SAL_CALL
storesMixedCaseIdentifiers( );
84 virtual sal_Bool SAL_CALL
supportsMixedCaseQuotedIdentifiers( );
85 virtual sal_Bool SAL_CALL
storesUpperCaseQuotedIdentifiers( );
86 virtual sal_Bool SAL_CALL
storesLowerCaseQuotedIdentifiers( );
87 virtual sal_Bool SAL_CALL
storesMixedCaseQuotedIdentifiers( );
88 virtual ::rtl::OUString SAL_CALL
getIdentifierQuoteString( );
89 virtual ::rtl::OUString SAL_CALL
getSQLKeywords( );
90 virtual ::rtl::OUString SAL_CALL
getNumericFunctions( );
91 virtual ::rtl::OUString SAL_CALL
getStringFunctions( );
92 virtual ::rtl::OUString SAL_CALL
getSystemFunctions( );
93 virtual ::rtl::OUString SAL_CALL
getTimeDateFunctions( );
94 virtual ::rtl::OUString SAL_CALL
getSearchStringEscape( );
95 virtual ::rtl::OUString SAL_CALL
getExtraNameCharacters( );
96 virtual sal_Bool SAL_CALL
supportsAlterTableWithAddColumn( );
97 virtual sal_Bool SAL_CALL
supportsAlterTableWithDropColumn( );
98 virtual sal_Bool SAL_CALL
supportsColumnAliasing( );
99 virtual sal_Bool SAL_CALL
nullPlusNonNullIsNull( );
100 virtual sal_Bool SAL_CALL
supportsTypeConversion( );
101 virtual sal_Bool SAL_CALL
supportsConvert( sal_Int32 fromType
, sal_Int32 toType
);
102 virtual sal_Bool SAL_CALL
supportsTableCorrelationNames( );
103 virtual sal_Bool SAL_CALL
supportsDifferentTableCorrelationNames( );
104 virtual sal_Bool SAL_CALL
supportsExpressionsInOrderBy( );
105 virtual sal_Bool SAL_CALL
supportsOrderByUnrelated( );
106 virtual sal_Bool SAL_CALL
supportsGroupBy( );
107 virtual sal_Bool SAL_CALL
supportsGroupByUnrelated( );
108 virtual sal_Bool SAL_CALL
supportsGroupByBeyondSelect( );
109 virtual sal_Bool SAL_CALL
supportsLikeEscapeClause( );
110 virtual sal_Bool SAL_CALL
supportsMultipleResultSets( );
111 virtual sal_Bool SAL_CALL
supportsMultipleTransactions( );
112 virtual sal_Bool SAL_CALL
supportsNonNullableColumns( );
113 virtual sal_Bool SAL_CALL
supportsMinimumSQLGrammar( );
114 virtual sal_Bool SAL_CALL
supportsCoreSQLGrammar( );
115 virtual sal_Bool SAL_CALL
supportsExtendedSQLGrammar( );
116 virtual sal_Bool SAL_CALL
supportsANSI92EntryLevelSQL( );
117 virtual sal_Bool SAL_CALL
supportsANSI92IntermediateSQL( );
118 virtual sal_Bool SAL_CALL
supportsANSI92FullSQL( );
119 virtual sal_Bool SAL_CALL
supportsIntegrityEnhancementFacility( );
120 virtual sal_Bool SAL_CALL
supportsOuterJoins( );
121 virtual sal_Bool SAL_CALL
supportsFullOuterJoins( );
122 virtual sal_Bool SAL_CALL
supportsLimitedOuterJoins( );
123 virtual ::rtl::OUString SAL_CALL
getSchemaTerm( );
124 virtual ::rtl::OUString SAL_CALL
getProcedureTerm( );
125 virtual ::rtl::OUString SAL_CALL
getCatalogTerm( );
126 virtual sal_Bool SAL_CALL
isCatalogAtStart( );
127 virtual ::rtl::OUString SAL_CALL
getCatalogSeparator( );
128 virtual sal_Bool SAL_CALL
supportsSchemasInDataManipulation( );
129 virtual sal_Bool SAL_CALL
supportsSchemasInProcedureCalls( );
130 virtual sal_Bool SAL_CALL
supportsSchemasInTableDefinitions( );
131 virtual sal_Bool SAL_CALL
supportsSchemasInIndexDefinitions( );
132 virtual sal_Bool SAL_CALL
supportsSchemasInPrivilegeDefinitions( );
133 virtual sal_Bool SAL_CALL
supportsCatalogsInDataManipulation( );
134 virtual sal_Bool SAL_CALL
supportsCatalogsInProcedureCalls( );
135 virtual sal_Bool SAL_CALL
supportsCatalogsInTableDefinitions( );
136 virtual sal_Bool SAL_CALL
supportsCatalogsInIndexDefinitions( );
137 virtual sal_Bool SAL_CALL
supportsCatalogsInPrivilegeDefinitions( );
138 virtual sal_Bool SAL_CALL
supportsPositionedDelete( );
139 virtual sal_Bool SAL_CALL
supportsPositionedUpdate( );
140 virtual sal_Bool SAL_CALL
supportsSelectForUpdate( );
141 virtual sal_Bool SAL_CALL
supportsStoredProcedures( );
142 virtual sal_Bool SAL_CALL
supportsSubqueriesInComparisons( );
143 virtual sal_Bool SAL_CALL
supportsSubqueriesInExists( );
144 virtual sal_Bool SAL_CALL
supportsSubqueriesInIns( );
145 virtual sal_Bool SAL_CALL
supportsSubqueriesInQuantifieds( );
146 virtual sal_Bool SAL_CALL
supportsCorrelatedSubqueries( );
147 virtual sal_Bool SAL_CALL
supportsUnion( );
148 virtual sal_Bool SAL_CALL
supportsUnionAll( );
149 virtual sal_Bool SAL_CALL
supportsOpenCursorsAcrossCommit( );
150 virtual sal_Bool SAL_CALL
supportsOpenCursorsAcrossRollback( );
151 virtual sal_Bool SAL_CALL
supportsOpenStatementsAcrossCommit( );
152 virtual sal_Bool SAL_CALL
supportsOpenStatementsAcrossRollback( );
153 virtual sal_Int32 SAL_CALL
getMaxBinaryLiteralLength( );
154 virtual sal_Int32 SAL_CALL
getMaxCharLiteralLength( );
155 virtual sal_Int32 SAL_CALL
getMaxColumnNameLength( );
156 virtual sal_Int32 SAL_CALL
getMaxColumnsInGroupBy( );
157 virtual sal_Int32 SAL_CALL
getMaxColumnsInIndex( );
158 virtual sal_Int32 SAL_CALL
getMaxColumnsInOrderBy( );
159 virtual sal_Int32 SAL_CALL
getMaxColumnsInSelect( );
160 virtual sal_Int32 SAL_CALL
getMaxColumnsInTable( );
161 virtual sal_Int32 SAL_CALL
getMaxConnections( );
162 virtual sal_Int32 SAL_CALL
getMaxCursorNameLength( );
163 virtual sal_Int32 SAL_CALL
getMaxIndexLength( );
164 virtual sal_Int32 SAL_CALL
getMaxSchemaNameLength( );
165 virtual sal_Int32 SAL_CALL
getMaxProcedureNameLength( );
166 virtual sal_Int32 SAL_CALL
getMaxCatalogNameLength( );
167 virtual sal_Int32 SAL_CALL
getMaxRowSize( );
168 virtual sal_Bool SAL_CALL
doesMaxRowSizeIncludeBlobs( );
169 virtual sal_Int32 SAL_CALL
getMaxStatementLength( );
170 virtual sal_Int32 SAL_CALL
getMaxStatements( );
171 virtual sal_Int32 SAL_CALL
getMaxTableNameLength( );
172 virtual sal_Int32 SAL_CALL
getMaxTablesInSelect( );
173 virtual sal_Int32 SAL_CALL
getMaxUserNameLength( );
174 virtual sal_Int32 SAL_CALL
getDefaultTransactionIsolation( );
175 virtual sal_Bool SAL_CALL
supportsTransactions( );
176 virtual sal_Bool SAL_CALL
supportsTransactionIsolationLevel( sal_Int32 level
);
177 virtual sal_Bool SAL_CALL
supportsDataDefinitionAndDataManipulationTransactions( );
178 virtual sal_Bool SAL_CALL
supportsDataManipulationTransactionsOnly( );
179 virtual sal_Bool SAL_CALL
dataDefinitionCausesTransactionCommit( );
180 virtual sal_Bool SAL_CALL
dataDefinitionIgnoredInTransactions( );
181 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getProcedures( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& procedureNamePattern
);
182 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getProcedureColumns( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& procedureNamePattern
, const ::rtl::OUString
& columnNamePattern
);
183 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getTables( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
, const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& types
);
184 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getSchemas( );
185 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getCatalogs( );
186 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getTableTypes( );
187 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getColumns( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
, const ::rtl::OUString
& columnNamePattern
);
188 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getColumnPrivileges( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
, const ::rtl::OUString
& columnNamePattern
);
189 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getTablePrivileges( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
);
190 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getBestRowIdentifier( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
, sal_Int32 scope
, sal_Bool nullable
);
191 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getVersionColumns( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
);
192 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getPrimaryKeys( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
);
193 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getImportedKeys( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
);
194 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getExportedKeys( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
);
195 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getCrossReference( const ::com::sun::star::uno::Any
& primaryCatalog
, const ::rtl::OUString
& primarySchema
, const ::rtl::OUString
& primaryTable
, const ::com::sun::star::uno::Any
& foreignCatalog
, const ::rtl::OUString
& foreignSchema
, const ::rtl::OUString
& foreignTable
);
196 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getTypeInfo( );
197 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getIndexInfo( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
, sal_Bool unique
, sal_Bool approximate
);
198 virtual sal_Bool SAL_CALL
supportsResultSetType( sal_Int32 setType
);
199 virtual sal_Bool SAL_CALL
supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32 concurrency
);
200 virtual sal_Bool SAL_CALL
ownUpdatesAreVisible( sal_Int32 setType
);
201 virtual sal_Bool SAL_CALL
ownDeletesAreVisible( sal_Int32 setType
);
202 virtual sal_Bool SAL_CALL
ownInsertsAreVisible( sal_Int32 setType
);
203 virtual sal_Bool SAL_CALL
othersUpdatesAreVisible( sal_Int32 setType
);
204 virtual sal_Bool SAL_CALL
othersDeletesAreVisible( sal_Int32 setType
);
205 virtual sal_Bool SAL_CALL
othersInsertsAreVisible( sal_Int32 setType
);
206 virtual sal_Bool SAL_CALL
updatesAreDetected( sal_Int32 setType
);
207 virtual sal_Bool SAL_CALL
deletesAreDetected( sal_Int32 setType
);
208 virtual sal_Bool SAL_CALL
insertsAreDetected( sal_Int32 setType
);
209 virtual sal_Bool SAL_CALL
supportsBatchUpdates( );
210 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> SAL_CALL
getUDTs( const ::com::sun::star::uno::Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& typeNamePattern
, const ::com::sun::star::uno::Sequence
< sal_Int32
>& types
);
211 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> SAL_CALL
getConnection( );
216 #endif // INCLUDED_EXAMPLES_DATABASE_DRIVERSKELETON_SDATABASEMETADATA_HXX
218 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */