15#include <com/sun/star/sdbc/XRow.hpp>
22Catalog::Catalog(
const uno::Reference< XConnection >& rConnection):
23 OCatalog(rConnection),
29void Catalog::refreshTables()
31 Sequence< OUString >
aTypes {
"TABLE",
"VIEW"};
33 uno::Reference< XResultSet > xTables = m_xMetaData->getTables(
Any(),
41 ::std::vector< OUString> aTableNames;
43 fillNames(xTables, aTableNames);
51 m_pTables->reFill(aTableNames);
55void Catalog::refreshViews()
57 css::uno::Reference<css::sdbc::XResultSet> xViews
58 = m_xMetaData->getTables(css::uno::Any(),
"%",
"%", {
"VIEW" });
63 ::std::vector<OUString> aViewNames;
65 fillNames(xViews, aViewNames);
68 m_pViews.reset(
new Views(m_xConnection, *
this, m_aMutex, aViewNames));
70 m_pViews->reFill(aViewNames);
74void Catalog::refreshGroups()
80void Catalog::refreshUsers()
82 Reference<XStatement> xStmt= m_xMetaData->getConnection()->createStatement();
83 uno::Reference< XResultSet > xUsers = xStmt->executeQuery(
"SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES");
88 ::std::vector< OUString> aUserNames;
90 uno::Reference< XRow > xRow(xUsers,UNO_QUERY);
91 while (xUsers->next())
93 aUserNames.push_back(xRow->getString(1));
102 m_pUsers->reFill(aUserNames);
Reference< XConnection > m_xConnection