LibreOffice Module connectivity (master) 1
dbmetadata.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#ifndef INCLUDED_CONNECTIVITY_DBMETADATA_HXX
21#define INCLUDED_CONNECTIVITY_DBMETADATA_HXX
22
23#include <com/sun/star/uno/Reference.hxx>
24
25#include <memory>
27
28namespace com::sun::star::sdbc { class XConnection; }
29namespace com::sun::star::uno { class XComponentContext; }
30
31namespace dbtools
32{
33
34
35 //= DatabaseMetaData
36
37 struct DatabaseMetaData_Impl;
50 {
51 private:
52 ::std::unique_ptr< DatabaseMetaData_Impl > m_pImpl;
53
54 public:
72 const css::uno::Reference< css::sdbc::XConnection >& _connection );
73 DatabaseMetaData( const DatabaseMetaData& _copyFrom );
74 DatabaseMetaData& operator=( const DatabaseMetaData& _copyFrom );
75 DatabaseMetaData(DatabaseMetaData&& _copyFrom) noexcept;
76 DatabaseMetaData& operator=(DatabaseMetaData&& _copyFrom) noexcept;
77
79
80 public:
86 bool isConnected() const;
87
90 void reset( const css::uno::Reference< css::sdbc::XConnection >& _connection )
91 {
92 *this = DatabaseMetaData( _connection );
93 }
94
96 const OUString& getIdentifierQuoteString() const;
97
99 const OUString& getCatalogSeparator() const;
100
107 bool supportsSubqueriesInFrom() const;
108
118 bool supportsPrimaryKeys() const;
119
125 bool restrictIdentifiersToSQL92() const;
126
133 bool generateASBeforeCorrelationName() const;
134
137 bool shouldEscapeDateTime() const;
138
141 bool shouldSubstituteParameterNames() const;
142
145 bool isAutoIncrementPrimaryKey() const;
146
151 sal_Int32
152 getBooleanComparisonMode() const;
153
158 bool supportsRelations() const;
159
164 bool supportsColumnAliasInOrderBy() const;
165
175 bool supportsUserAdministration( const css::uno::Reference<css::uno::XComponentContext>& _rContext ) const;
176
179 bool displayEmptyTableFolders() const;
180
185 bool supportsThreads() const;
186 };
187
188
189} // namespace dbtools
190
191
192#endif // INCLUDED_CONNECTIVITY_DBMETADATA_HXX
193
194/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
encapsulates meta data about a database/connection which cannot be obtained from the usual XDatabaseM...
Definition: dbmetadata.hxx:50
void reset(const css::uno::Reference< css::sdbc::XConnection > &_connection)
resets the instance so that it's based on a new connection
Definition: dbmetadata.hxx:90
DatabaseMetaData(const css::uno::Reference< css::sdbc::XConnection > &_connection)
constructs a DatabaseMetaData instance
::std::unique_ptr< DatabaseMetaData_Impl > m_pImpl
Definition: dbmetadata.hxx:52
#define OOO_DLLPUBLIC_DBTOOLS