Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / connectivity / source / drivers / firebird / Tables.hxx
blobada1827097a52e57f902aa93ab1102c69ca104f8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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/.
8 */
10 #pragma once
12 #include <com/sun/star/sdbc/XConnection.hpp>
13 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
15 #include <connectivity/sdbcx/VCollection.hxx>
16 #include <utility>
18 namespace connectivity::firebird
21 /**
22 * This implements com.sun.star.sdbcx.Container, which seems to be
23 * also known by the name of Tables and Collection.
25 class Tables: public ::connectivity::sdbcx::OCollection
27 protected:
28 css::uno::Reference< css::sdbc::XDatabaseMetaData >
29 m_xMetaData;
31 static OUString createStandardColumnPart(const css::uno::Reference< css::beans::XPropertySet >& xColProp,const css::uno::Reference< com::sun::star::sdbc::XConnection>& _xConnection);
33 // OCollection
34 virtual void impl_refresh() override;
35 virtual ::connectivity::sdbcx::ObjectType createObject(
36 const OUString& rName) override;
37 virtual css::uno::Reference< css::beans::XPropertySet >
38 createDescriptor() override;
39 virtual ::connectivity::sdbcx::ObjectType appendObject(
40 const OUString& rName,
41 const css::uno::Reference< css::beans::XPropertySet >& rDescriptor) override;
43 public:
44 Tables(css::uno::Reference< css::sdbc::XDatabaseMetaData > xMetaData,
45 ::cppu::OWeakObject& rParent,
46 ::osl::Mutex& rMutex,
47 ::std::vector< OUString> const & rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames), m_xMetaData(std::move(xMetaData)) {}
49 // TODO: we should also implement XDataDescriptorFactory, XRefreshable,
50 // XAppend, etc., but all are optional.
52 // XDrop
53 virtual void dropObject(sal_Int32 nPosition, const OUString& rName) override;
55 void appendNew(const OUString& _rsNewTable);
59 } // namespace connectivity::firebird
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */