39#include <rtl/ustrbuf.hxx>
44#include <com/sun/star/sdbc/SQLException.hpp>
52using com::sun::star::uno::Any;
53using com::sun::star::uno::Type;
57using com::sun::star::sdbc::XStatement;
58using com::sun::star::sdbc::SQLException;
63User::User( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
65 ConnectionSettings *pSettings )
78 pUser->copyValuesFrom(
this );
88 ReflectionBase::getTypes());
95 return css::uno::Sequence<sal_Int8>();
98Any User::queryInterface(
const Type & reqType )
100 Any ret = ReflectionBase::queryInterface( reqType );
101 if( ! ret.hasValue() )
102 ret = ::cppu::queryInterface(
104 static_cast< css::sdbcx::XUser *
> (
this ) );
109void User::changePassword(
110 const OUString&,
const OUString& newPassword )
112 OUStringBuffer buf(128);
113 buf.append(
"ALTER USER " );
115 buf.append(
" PASSWORD " );
119 stmt->executeUpdate( buf.makeStringAndClear() );
122sal_Int32 User::getPrivileges(
const OUString& objName, sal_Int32 objType )
124 SAL_INFO(
"connectivity.postgresql",
"User::getPrivileges[\"Name\"] got called for " << objName <<
"(type=" << objType <<
")");
129sal_Int32 User::getGrantablePrivileges(
const OUString&, sal_Int32 )
135void User::grantPrivileges(
const OUString&, sal_Int32, sal_Int32 )
137 throw css::sdbc::SQLException(
"pq_driver: privilege change not implemented yet",
138 *
this, OUString(), 1,
Any() );
141void User::revokePrivileges(
const OUString&, sal_Int32, sal_Int32 )
143 throw css::sdbc::SQLException(
"pq_driver: privilege change not implemented yet",
144 *
this, OUString(), 1,
Any() );
148UserDescriptor::UserDescriptor(
149 const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
154 getStatics().refl.userDescriptor.serviceNames,
164 pUser->copyValuesFrom(
this );
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
css::uno::Reference< css::sdbc::XConnection > m_conn
::rtl::Reference< comphelper::RefCountedMutex > m_xMutex
ConnectionSettings * m_pSettings
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
UserDescriptor(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &connection, ConnectionSettings *pSettings)
User(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &connection, ConnectionSettings *pSettings)
#define SAL_INFO(area, stream)
class SAL_NO_VTABLE XPropertySet
void bufferQuoteConstant(OUStringBuffer &buf, std::u16string_view value, ConnectionSettings *settings)
OUString extractStringProperty(const Reference< XPropertySet > &descriptor, const OUString &name)
void bufferQuoteIdentifier(OUStringBuffer &buf, std::u16string_view toQuote, ConnectionSettings *settings)
rtl::Reference< Connection > m_conn