Mysql/MariaDB: add catalog+indexes+keys+user(s) skeleton part
[LibreOffice.git] / connectivity / source / drivers / mysqlc / mysqlc_catalog.cxx
blobe9b7569fb1aafc59e1ea230eea9f3e194ca7359e
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 #include "mysqlc_catalog.hxx"
11 #include "mysqlc_tables.hxx"
12 #include "mysqlc_users.hxx"
14 #include <com/sun/star/sdbc/XRow.hpp>
16 using namespace ::connectivity::mysqlc;
17 using namespace ::com::sun::star;
18 using namespace ::com::sun::star::sdbc;
19 using namespace ::com::sun::star::uno;
21 Catalog::Catalog(const uno::Reference<XConnection>& rConnection)
22 : OCatalog(rConnection)
23 , m_xConnection(rConnection)
27 //----- OCatalog -------------------------------------------------------------
28 void Catalog::refreshTables()
30 uno::Reference<XResultSet> xTables = m_xMetaData->getTables(Any(), "%", "%", {});
32 if (!xTables.is())
33 return;
35 ::std::vector<OUString> aTableNames;
37 fillNames(xTables, aTableNames);
39 if (!m_pTables)
40 m_pTables.reset(new Tables(m_xConnection->getMetaData(), *this, m_aMutex, aTableNames));
41 else
42 m_pTables->reFill(aTableNames);
45 void Catalog::refreshViews()
47 // TODO: implement me.
48 // Sets m_pViews (OCatalog)
51 //----- IRefreshableGroups ---------------------------------------------------
52 void Catalog::refreshGroups()
54 // TODO: implement me
57 //----- IRefreshableUsers ----------------------------------------------------
58 void Catalog::refreshUsers()
60 // TODO: implement me
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */