LibreOffice Module connectivity (master) 1
mysqlc_databasemetadata.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "mysqlc_connection.hxx"
23
24#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
26
28{
29using ::com::sun::star::uno::Any;
30
31//************ Class: ODatabaseMetaData
32
33typedef ::cppu::WeakImplHelper1<css::sdbc::XDatabaseMetaData> ODatabaseMetaData_BASE;
34
36{
38 MYSQL* m_pMySql;
39
40public:
41 const OConnection& getOwnConnection() const { return m_rConnection; }
42
43 explicit ODatabaseMetaData(OConnection& _rCon, MYSQL* pMySql);
44 virtual ~ODatabaseMetaData() override;
45
46 // as I mentioned before this interface is really BIG
47 // XDatabaseMetaData
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;
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;
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;
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;
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;
114 sal_Bool SAL_CALL supportsSchemasInProcedureCalls() override;
119 sal_Bool SAL_CALL supportsCatalogsInProcedureCalls() 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;
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;
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 virtual 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;
230};
231}
232
233/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Bool SAL_CALL ownUpdatesAreVisible(sal_Int32 setType) override
sal_Bool SAL_CALL supportsPositionedDelete() override
sal_Int32 SAL_CALL getMaxColumnsInGroupBy() override
sal_Bool SAL_CALL supportsDataDefinitionAndDataManipulationTransactions() override
sal_Bool SAL_CALL supportsAlterTableWithDropColumn() override
sal_Bool SAL_CALL supportsLikeEscapeClause() override
sal_Int32 SAL_CALL getMaxColumnsInIndex() override
sal_Bool SAL_CALL supportsDataManipulationTransactionsOnly() override
sal_Bool SAL_CALL dataDefinitionCausesTransactionCommit() override
sal_Bool SAL_CALL storesUpperCaseIdentifiers() override
sal_Int32 SAL_CALL getMaxCatalogNameLength() override
sal_Int32 SAL_CALL getMaxTableNameLength() override
sal_Bool SAL_CALL insertsAreDetected(sal_Int32 setType) override
sal_Bool SAL_CALL storesUpperCaseQuotedIdentifiers() override
sal_Bool SAL_CALL supportsANSI92IntermediateSQL() override
sal_Bool SAL_CALL supportsCatalogsInDataManipulation() override
sal_Bool SAL_CALL supportsConvert(sal_Int32 fromType, sal_Int32 toType) override
sal_Int32 SAL_CALL getMaxCursorNameLength() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getBestRowIdentifier(const Any &catalog, const OUString &schema, const OUString &table, sal_Int32 scope, sal_Bool nullable) override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getSchemas() override
OUString SAL_CALL getExtraNameCharacters() override
sal_Int32 SAL_CALL getMaxColumnsInOrderBy() override
sal_Bool SAL_CALL supportsMixedCaseIdentifiers() override
sal_Int32 SAL_CALL getMaxUserNameLength() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getCatalogs() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getTableTypes() override
sal_Int32 SAL_CALL getMaxColumnsInTable() override
sal_Bool SAL_CALL supportsMultipleTransactions() override
sal_Bool SAL_CALL supportsResultSetConcurrency(sal_Int32 setType, sal_Int32 concurrency) override
sal_Bool SAL_CALL supportsSchemasInTableDefinitions() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getTypeInfo() override
sal_Bool SAL_CALL supportsCatalogsInProcedureCalls() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getPrimaryKeys(const Any &catalog, const OUString &schema, const OUString &table) override
sal_Int32 SAL_CALL getMaxColumnNameLength() override
sal_Bool SAL_CALL supportsMixedCaseQuotedIdentifiers() override
sal_Bool SAL_CALL supportsLimitedOuterJoins() override
OUString SAL_CALL getIdentifierQuoteString() override
sal_Int32 SAL_CALL getMaxProcedureNameLength() override
sal_Int32 SAL_CALL getMaxSchemaNameLength() override
sal_Bool SAL_CALL othersDeletesAreVisible(sal_Int32 setType) override
sal_Bool SAL_CALL supportsOpenCursorsAcrossCommit() override
sal_Bool SAL_CALL supportsGroupByUnrelated() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getColumnPrivileges(const Any &catalog, const OUString &schema, const OUString &table, const OUString &columnNamePattern) override
sal_Bool SAL_CALL supportsTransactionIsolationLevel(sal_Int32 level) override
sal_Bool SAL_CALL supportsExtendedSQLGrammar() override
sal_Int32 SAL_CALL getMaxCharLiteralLength() override
sal_Bool SAL_CALL supportsPositionedUpdate() override
sal_Bool SAL_CALL supportsIntegrityEnhancementFacility() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getTablePrivileges(const Any &catalog, const OUString &schemaPattern, const OUString &tableNamePattern) override
ODatabaseMetaData(OConnection &_rCon, MYSQL *pMySql)
sal_Bool SAL_CALL nullsAreSortedAtStart() override
sal_Bool SAL_CALL storesLowerCaseIdentifiers() override
sal_Bool SAL_CALL supportsCatalogsInIndexDefinitions() override
sal_Bool SAL_CALL supportsExpressionsInOrderBy() override
sal_Bool SAL_CALL supportsFullOuterJoins() override
sal_Bool SAL_CALL supportsSchemasInDataManipulation() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getUDTs(const Any &catalog, const OUString &schemaPattern, const OUString &typeNamePattern, const css::uno::Sequence< sal_Int32 > &types) override
sal_Bool SAL_CALL nullPlusNonNullIsNull() override
sal_Bool SAL_CALL othersInsertsAreVisible(sal_Int32 setType) override
sal_Bool SAL_CALL supportsCoreSQLGrammar() override
sal_Bool SAL_CALL allProceduresAreCallable() override
sal_Int32 SAL_CALL getMaxColumnsInSelect() override
sal_Bool SAL_CALL storesMixedCaseIdentifiers() override
sal_Bool SAL_CALL supportsOpenCursorsAcrossRollback() override
sal_Int32 SAL_CALL getDriverMinorVersion() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getExportedKeys(const Any &catalog, const OUString &schema, const OUString &table) override
sal_Bool SAL_CALL ownDeletesAreVisible(sal_Int32 setType) override
sal_Bool SAL_CALL supportsANSI92EntryLevelSQL() override
sal_Bool SAL_CALL supportsOpenStatementsAcrossCommit() override
sal_Int32 SAL_CALL getMaxStatementLength() override
sal_Bool SAL_CALL supportsANSI92FullSQL() override
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getColumns(const Any &catalog, const OUString &schemaPattern, const OUString &tableNamePattern, const OUString &columnNamePattern) override
sal_Bool SAL_CALL allTablesAreSelectable() override
sal_Bool SAL_CALL supportsSelectForUpdate() override
sal_Bool SAL_CALL supportsResultSetType(sal_Int32 setType) override
sal_Bool SAL_CALL supportsMultipleResultSets() override
sal_Int32 SAL_CALL getDefaultTransactionIsolation() override
OUString SAL_CALL getDatabaseProductVersion() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getTables(const Any &catalog, const OUString &schemaPattern, const OUString &tableNamePattern, const css::uno::Sequence< OUString > &types) override
sal_Bool SAL_CALL storesMixedCaseQuotedIdentifiers() override
sal_Bool SAL_CALL supportsMinimumSQLGrammar() override
sal_Bool SAL_CALL supportsGroupByBeyondSelect() override
sal_Int32 SAL_CALL getDriverMajorVersion() override
css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection() override
sal_Bool SAL_CALL doesMaxRowSizeIncludeBlobs() override
sal_Int32 SAL_CALL getMaxBinaryLiteralLength() override
sal_Bool SAL_CALL supportsOpenStatementsAcrossRollback() override
sal_Bool SAL_CALL supportsTypeConversion() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getProcedureColumns(const Any &catalog, const OUString &schemaPattern, const OUString &procedureNamePattern, const OUString &columnNamePattern) override
sal_Int32 SAL_CALL getMaxConnections() override
sal_Bool SAL_CALL storesLowerCaseQuotedIdentifiers() override
sal_Bool SAL_CALL supportsCatalogsInPrivilegeDefinitions() override
OUString SAL_CALL getDatabaseProductName() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getVersionColumns(const Any &catalog, const OUString &schema, const OUString &table) override
sal_Bool SAL_CALL supportsSubqueriesInComparisons() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getIndexInfo(const Any &catalog, const OUString &schema, const OUString &table, sal_Bool unique, sal_Bool approximate) override
sal_Bool SAL_CALL supportsSubqueriesInQuantifieds() override
sal_Bool SAL_CALL supportsOrderByUnrelated() override
sal_Bool SAL_CALL othersUpdatesAreVisible(sal_Int32 setType) override
sal_Bool SAL_CALL ownInsertsAreVisible(sal_Int32 setType) override
sal_Bool SAL_CALL supportsSubqueriesInIns() override
sal_Bool SAL_CALL dataDefinitionIgnoredInTransactions() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getCrossReference(const Any &primaryCatalog, const OUString &primarySchema, const OUString &primaryTable, const Any &foreignCatalog, const OUString &foreignSchema, const OUString &foreignTable) override
sal_Bool SAL_CALL usesLocalFilePerTable() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getImportedKeys(const Any &catalog, const OUString &schema, const OUString &table) override
sal_Bool SAL_CALL supportsColumnAliasing() override
sal_Bool SAL_CALL deletesAreDetected(sal_Int32 setType) override
OUString SAL_CALL getCatalogSeparator() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getProcedures(const Any &catalog, const OUString &schemaPattern, const OUString &procedureNamePattern) override
sal_Bool SAL_CALL supportsSchemasInPrivilegeDefinitions() override
sal_Bool SAL_CALL supportsNonNullableColumns() override
sal_Bool SAL_CALL supportsDifferentTableCorrelationNames() override
sal_Bool SAL_CALL supportsCorrelatedSubqueries() override
sal_Bool SAL_CALL supportsTableCorrelationNames() override
sal_Bool SAL_CALL supportsAlterTableWithAddColumn() override
sal_Bool SAL_CALL supportsStoredProcedures() override
sal_Bool SAL_CALL supportsSchemasInProcedureCalls() override
sal_Bool SAL_CALL updatesAreDetected(sal_Int32 setType) override
sal_Bool SAL_CALL supportsSubqueriesInExists() override
sal_Int32 SAL_CALL getMaxTablesInSelect() override
sal_Bool SAL_CALL supportsCatalogsInTableDefinitions() override
sal_Bool SAL_CALL supportsSchemasInIndexDefinitions() override
OUString SAL_CALL getSearchStringEscape() override
::cppu::WeakImplHelper1< css::sdbc::XDatabaseMetaData > ODatabaseMetaData_BASE
unsigned char sal_Bool