1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include "mysqlc_connection.hxx"
24 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
25 #include <cppuhelper/implbase1.hxx>
27 namespace connectivity::mysqlc
29 using ::com::sun::star::uno::Any
;
31 //************ Class: ODatabaseMetaData
33 typedef ::cppu::WeakImplHelper1
<css::sdbc::XDatabaseMetaData
> ODatabaseMetaData_BASE
;
35 class ODatabaseMetaData final
: public ODatabaseMetaData_BASE
37 OConnection
& m_rConnection
;
41 const OConnection
& getOwnConnection() const { return m_rConnection
; }
43 explicit ODatabaseMetaData(OConnection
& _rCon
, MYSQL
* pMySql
);
44 virtual ~ODatabaseMetaData() override
;
46 // as I mentioned before this interface is really BIG
48 sal_Bool SAL_CALL
allProceduresAreCallable() override
;
49 sal_Bool SAL_CALL
allTablesAreSelectable() override
;
50 OUString SAL_CALL
getURL() override
;
51 OUString SAL_CALL
getUserName() override
;
52 sal_Bool SAL_CALL
isReadOnly() override
;
53 sal_Bool SAL_CALL
nullsAreSortedHigh() override
;
54 sal_Bool SAL_CALL
nullsAreSortedLow() override
;
55 sal_Bool SAL_CALL
nullsAreSortedAtStart() override
;
56 sal_Bool SAL_CALL
nullsAreSortedAtEnd() override
;
57 OUString SAL_CALL
getDatabaseProductName() override
;
58 OUString SAL_CALL
getDatabaseProductVersion() override
;
59 OUString SAL_CALL
getDriverName() override
;
60 OUString SAL_CALL
getDriverVersion() override
;
61 sal_Int32 SAL_CALL
getDriverMajorVersion() override
;
62 sal_Int32 SAL_CALL
getDriverMinorVersion() override
;
63 sal_Bool SAL_CALL
usesLocalFiles() override
;
64 sal_Bool SAL_CALL
usesLocalFilePerTable() override
;
65 sal_Bool SAL_CALL
supportsMixedCaseIdentifiers() override
;
66 sal_Bool SAL_CALL
storesUpperCaseIdentifiers() override
;
67 sal_Bool SAL_CALL
storesLowerCaseIdentifiers() override
;
68 sal_Bool SAL_CALL
storesMixedCaseIdentifiers() override
;
69 sal_Bool SAL_CALL
supportsMixedCaseQuotedIdentifiers() override
;
70 sal_Bool SAL_CALL
storesUpperCaseQuotedIdentifiers() override
;
71 sal_Bool SAL_CALL
storesLowerCaseQuotedIdentifiers() override
;
72 sal_Bool SAL_CALL
storesMixedCaseQuotedIdentifiers() override
;
73 OUString SAL_CALL
getIdentifierQuoteString() override
;
74 OUString SAL_CALL
getSQLKeywords() override
;
75 OUString SAL_CALL
getNumericFunctions() override
;
76 OUString SAL_CALL
getStringFunctions() override
;
77 OUString SAL_CALL
getSystemFunctions() override
;
78 OUString SAL_CALL
getTimeDateFunctions() override
;
79 OUString SAL_CALL
getSearchStringEscape() override
;
80 OUString SAL_CALL
getExtraNameCharacters() override
;
81 sal_Bool SAL_CALL
supportsAlterTableWithAddColumn() override
;
82 sal_Bool SAL_CALL
supportsAlterTableWithDropColumn() override
;
83 sal_Bool SAL_CALL
supportsColumnAliasing() override
;
84 sal_Bool SAL_CALL
nullPlusNonNullIsNull() override
;
85 sal_Bool SAL_CALL
supportsTypeConversion() override
;
86 sal_Bool SAL_CALL
supportsConvert(sal_Int32 fromType
, sal_Int32 toType
) override
;
87 sal_Bool SAL_CALL
supportsTableCorrelationNames() override
;
88 sal_Bool SAL_CALL
supportsDifferentTableCorrelationNames() override
;
89 sal_Bool SAL_CALL
supportsExpressionsInOrderBy() override
;
90 sal_Bool SAL_CALL
supportsOrderByUnrelated() override
;
91 sal_Bool SAL_CALL
supportsGroupBy() override
;
92 sal_Bool SAL_CALL
supportsGroupByUnrelated() override
;
93 sal_Bool SAL_CALL
supportsGroupByBeyondSelect() override
;
94 sal_Bool SAL_CALL
supportsLikeEscapeClause() override
;
95 sal_Bool SAL_CALL
supportsMultipleResultSets() override
;
96 sal_Bool SAL_CALL
supportsMultipleTransactions() override
;
97 sal_Bool SAL_CALL
supportsNonNullableColumns() override
;
98 sal_Bool SAL_CALL
supportsMinimumSQLGrammar() override
;
99 sal_Bool SAL_CALL
supportsCoreSQLGrammar() override
;
100 sal_Bool SAL_CALL
supportsExtendedSQLGrammar() override
;
101 sal_Bool SAL_CALL
supportsANSI92EntryLevelSQL() override
;
102 sal_Bool SAL_CALL
supportsANSI92IntermediateSQL() override
;
103 sal_Bool SAL_CALL
supportsANSI92FullSQL() override
;
104 sal_Bool SAL_CALL
supportsIntegrityEnhancementFacility() override
;
105 sal_Bool SAL_CALL
supportsOuterJoins() override
;
106 sal_Bool SAL_CALL
supportsFullOuterJoins() override
;
107 sal_Bool SAL_CALL
supportsLimitedOuterJoins() override
;
108 OUString SAL_CALL
getSchemaTerm() override
;
109 OUString SAL_CALL
getProcedureTerm() override
;
110 OUString SAL_CALL
getCatalogTerm() override
;
111 sal_Bool SAL_CALL
isCatalogAtStart() override
;
112 OUString SAL_CALL
getCatalogSeparator() override
;
113 sal_Bool SAL_CALL
supportsSchemasInDataManipulation() override
;
114 sal_Bool SAL_CALL
supportsSchemasInProcedureCalls() override
;
115 sal_Bool SAL_CALL
supportsSchemasInTableDefinitions() override
;
116 sal_Bool SAL_CALL
supportsSchemasInIndexDefinitions() override
;
117 sal_Bool SAL_CALL
supportsSchemasInPrivilegeDefinitions() override
;
118 sal_Bool SAL_CALL
supportsCatalogsInDataManipulation() override
;
119 sal_Bool SAL_CALL
supportsCatalogsInProcedureCalls() override
;
120 sal_Bool SAL_CALL
supportsCatalogsInTableDefinitions() override
;
121 sal_Bool SAL_CALL
supportsCatalogsInIndexDefinitions() override
;
122 sal_Bool SAL_CALL
supportsCatalogsInPrivilegeDefinitions() override
;
123 sal_Bool SAL_CALL
supportsPositionedDelete() override
;
124 sal_Bool SAL_CALL
supportsPositionedUpdate() override
;
125 sal_Bool SAL_CALL
supportsSelectForUpdate() override
;
126 sal_Bool SAL_CALL
supportsStoredProcedures() override
;
127 sal_Bool SAL_CALL
supportsSubqueriesInComparisons() override
;
128 sal_Bool SAL_CALL
supportsSubqueriesInExists() override
;
129 sal_Bool SAL_CALL
supportsSubqueriesInIns() override
;
130 sal_Bool SAL_CALL
supportsSubqueriesInQuantifieds() override
;
131 sal_Bool SAL_CALL
supportsCorrelatedSubqueries() override
;
132 sal_Bool SAL_CALL
supportsUnion() override
;
133 sal_Bool SAL_CALL
supportsUnionAll() override
;
134 sal_Bool SAL_CALL
supportsOpenCursorsAcrossCommit() override
;
135 sal_Bool SAL_CALL
supportsOpenCursorsAcrossRollback() override
;
136 sal_Bool SAL_CALL
supportsOpenStatementsAcrossCommit() override
;
137 sal_Bool SAL_CALL
supportsOpenStatementsAcrossRollback() override
;
138 sal_Int32 SAL_CALL
getMaxBinaryLiteralLength() override
;
139 sal_Int32 SAL_CALL
getMaxCharLiteralLength() override
;
140 sal_Int32 SAL_CALL
getMaxColumnNameLength() override
;
141 sal_Int32 SAL_CALL
getMaxColumnsInGroupBy() override
;
142 sal_Int32 SAL_CALL
getMaxColumnsInIndex() override
;
143 sal_Int32 SAL_CALL
getMaxColumnsInOrderBy() override
;
144 sal_Int32 SAL_CALL
getMaxColumnsInSelect() override
;
145 sal_Int32 SAL_CALL
getMaxColumnsInTable() override
;
146 sal_Int32 SAL_CALL
getMaxConnections() override
;
147 sal_Int32 SAL_CALL
getMaxCursorNameLength() override
;
148 sal_Int32 SAL_CALL
getMaxIndexLength() override
;
149 sal_Int32 SAL_CALL
getMaxSchemaNameLength() override
;
150 sal_Int32 SAL_CALL
getMaxProcedureNameLength() override
;
151 sal_Int32 SAL_CALL
getMaxCatalogNameLength() override
;
152 sal_Int32 SAL_CALL
getMaxRowSize() override
;
153 sal_Bool SAL_CALL
doesMaxRowSizeIncludeBlobs() override
;
154 sal_Int32 SAL_CALL
getMaxStatementLength() override
;
155 sal_Int32 SAL_CALL
getMaxStatements() override
;
156 sal_Int32 SAL_CALL
getMaxTableNameLength() override
;
157 sal_Int32 SAL_CALL
getMaxTablesInSelect() override
;
158 sal_Int32 SAL_CALL
getMaxUserNameLength() override
;
159 sal_Int32 SAL_CALL
getDefaultTransactionIsolation() override
;
160 sal_Bool SAL_CALL
supportsTransactions() override
;
161 sal_Bool SAL_CALL
supportsTransactionIsolationLevel(sal_Int32 level
) override
;
162 sal_Bool SAL_CALL
supportsDataDefinitionAndDataManipulationTransactions() override
;
163 sal_Bool SAL_CALL
supportsDataManipulationTransactionsOnly() override
;
164 sal_Bool SAL_CALL
dataDefinitionCausesTransactionCommit() override
;
165 sal_Bool SAL_CALL
dataDefinitionIgnoredInTransactions() override
;
166 css::uno::Reference
<css::sdbc::XResultSet
>
167 SAL_CALL
getProcedures(const Any
& catalog
, const OUString
& schemaPattern
,
168 const OUString
& procedureNamePattern
) override
;
169 css::uno::Reference
<css::sdbc::XResultSet
>
170 SAL_CALL
getProcedureColumns(const Any
& catalog
, const OUString
& schemaPattern
,
171 const OUString
& procedureNamePattern
,
172 const OUString
& columnNamePattern
) override
;
173 css::uno::Reference
<css::sdbc::XResultSet
>
174 SAL_CALL
getTables(const Any
& catalog
, const OUString
& schemaPattern
,
175 const OUString
& tableNamePattern
,
176 const css::uno::Sequence
<OUString
>& types
) override
;
177 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
getSchemas() override
;
178 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
getCatalogs() override
;
179 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
getTableTypes() override
;
180 css::uno::Reference
<css::sdbc::XResultSet
>
181 SAL_CALL
getColumns(const Any
& catalog
, const OUString
& schemaPattern
,
182 const OUString
& tableNamePattern
,
183 const OUString
& columnNamePattern
) override
;
184 css::uno::Reference
<css::sdbc::XResultSet
>
185 SAL_CALL
getColumnPrivileges(const Any
& catalog
, const OUString
& schema
,
186 const OUString
& table
,
187 const OUString
& columnNamePattern
) override
;
188 css::uno::Reference
<css::sdbc::XResultSet
>
189 SAL_CALL
getTablePrivileges(const Any
& catalog
, const OUString
& schemaPattern
,
190 const OUString
& tableNamePattern
) override
;
191 css::uno::Reference
<css::sdbc::XResultSet
>
192 SAL_CALL
getBestRowIdentifier(const Any
& catalog
, const OUString
& schema
,
193 const OUString
& table
, sal_Int32 scope
,
194 sal_Bool nullable
) override
;
195 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
196 getVersionColumns(const Any
& catalog
, const OUString
& schema
, const OUString
& table
) override
;
197 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
198 getPrimaryKeys(const Any
& catalog
, const OUString
& schema
, const OUString
& table
) override
;
199 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
200 getImportedKeys(const Any
& catalog
, const OUString
& schema
, const OUString
& table
) override
;
201 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
202 getExportedKeys(const Any
& catalog
, const OUString
& schema
, const OUString
& table
) override
;
203 css::uno::Reference
<css::sdbc::XResultSet
>
204 SAL_CALL
getCrossReference(const Any
& primaryCatalog
, const OUString
& primarySchema
,
205 const OUString
& primaryTable
, const Any
& foreignCatalog
,
206 const OUString
& foreignSchema
,
207 const OUString
& foreignTable
) override
;
208 css::uno::Reference
<css::sdbc::XResultSet
> SAL_CALL
getTypeInfo() override
;
209 css::uno::Reference
<css::sdbc::XResultSet
>
210 SAL_CALL
getIndexInfo(const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
211 sal_Bool unique
, sal_Bool approximate
) override
;
212 sal_Bool SAL_CALL
supportsResultSetType(sal_Int32 setType
) override
;
213 sal_Bool SAL_CALL
supportsResultSetConcurrency(sal_Int32 setType
,
214 sal_Int32 concurrency
) override
;
215 sal_Bool SAL_CALL
ownUpdatesAreVisible(sal_Int32 setType
) override
;
216 sal_Bool SAL_CALL
ownDeletesAreVisible(sal_Int32 setType
) override
;
217 sal_Bool SAL_CALL
ownInsertsAreVisible(sal_Int32 setType
) override
;
218 sal_Bool SAL_CALL
othersUpdatesAreVisible(sal_Int32 setType
) override
;
219 sal_Bool SAL_CALL
othersDeletesAreVisible(sal_Int32 setType
) override
;
220 sal_Bool SAL_CALL
othersInsertsAreVisible(sal_Int32 setType
) override
;
221 sal_Bool SAL_CALL
updatesAreDetected(sal_Int32 setType
) override
;
222 sal_Bool SAL_CALL
deletesAreDetected(sal_Int32 setType
) override
;
223 sal_Bool SAL_CALL
insertsAreDetected(sal_Int32 setType
) override
;
224 sal_Bool SAL_CALL
supportsBatchUpdates() override
;
225 css::uno::Reference
<css::sdbc::XResultSet
>
226 SAL_CALL
getUDTs(const Any
& catalog
, const OUString
& schemaPattern
,
227 const OUString
& typeNamePattern
,
228 const css::uno::Sequence
<sal_Int32
>& types
) override
;
229 css::uno::Reference
<css::sdbc::XConnection
> SAL_CALL
getConnection() override
;
233 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */