23#include <com/sun/star/sdbc/XRow.hpp>
24#include <com/sun/star/sdbc/XResultSet.hpp>
25#include <com/sun/star/sdbcx/Privilege.hpp>
33using namespace ::
cppu;
48 Sequence< OUString > sTableTypes {
"VIEW",
"TABLE",
"%"};
53 Reference< XResultSet > xResult =
m_xMetaData->getTables(aCatalog,
sSchema,sTable,sTableTypes);
58 Reference< XRow > xRow(xResult,UNO_QUERY);
59 if ( xResult->next() )
63 nPrivileges &= ~( Privilege::INSERT | Privilege::UPDATE | Privilege::DELETE | Privilege::CREATE | Privilege::ALTER | Privilege::DROP );
75 ::comphelper::disposeComponent(xResult);
118 OUString aSql(
"DROP " );
120 Reference<XPropertySet> xProp(xObject,UNO_QUERY);
130 Reference< XStatement > xStmt = xConnection->createStatement( );
133 xStmt->execute(aSql);
134 ::comphelper::disposeComponent(xStmt);
140 if ( pViews && pViews->
hasByName(_sElementName) )
150 Reference< XStatement > xStmt = xConnection->createStatement( );
153 xStmt->execute(aSql);
154 ::comphelper::disposeComponent(xStmt);
163 ContainerEvent
aEvent(
static_cast<XContainer*
>(
this),
Any(_rsNewTable),
Any(),
Any());
166 aListenerLoop.
next()->elementInserted(
aEvent);
171 OSL_ENSURE(_xObject.is(),
"OTables::getNameForObject: Object is NULL!");
OptionalString sComposedName
bool hasMoreElements() const
css::uno::Reference< ListenerT > const & next()
void dropByNameImpl(const OUString &elementName)
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
void createTable(const css::uno::Reference< css::beans::XPropertySet > &descriptor)
virtual void disposing() override
virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override
virtual void impl_refresh() override
virtual void dropObject(sal_Int32 _nPos, const OUString &_sElementName) override
virtual sdbcx::ObjectType appendObject(const OUString &_rForName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
appends an object described by a descriptor, under a given name
void appendNew(const OUString &_rsNewTable)
virtual OUString getNameForObject(const sdbcx::ObjectType &_xObject) override
returns the name for the object.
virtual sdbcx::ObjectType createObject(const OUString &_rName) override
void insertElement(const OUString &_sElementName, const ObjectType &_xElement)
insert a new element into the collection
ObjectType getObject(sal_Int32 _nIndex)
return the object, if not existent it creates it.
::cppu::OWeakObject & m_rParent
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
css::uno::Reference< css::beans::XPropertySet > ObjectType