LibreOffice Module connectivity (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
connectivity::mysqlc::Table Class Reference

#include <mysqlc_table.hxx>

Inheritance diagram for connectivity::mysqlc::Table:
[legend]
Collaboration diagram for connectivity::mysqlc::Table:
[legend]

Public Member Functions

 Table (Tables *pTables, ::osl::Mutex &rMutex, const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
 
 Table (Tables *pTables, ::osl::Mutex &rMutex, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const OUString &rCatalog, const OUString &rSchema, const OUString &rName, const OUString &rType, const OUString &rDescription)
 
virtual ::connectivity::sdbcx::OCollectioncreateColumns (const ::std::vector< OUString > &rNames) override
 creates the column collection for the table More...
 
virtual ::connectivity::sdbcx::OCollectioncreateKeys (const ::std::vector< OUString > &rNames) override
 creates the key collection for the table More...
 
virtual ::connectivity::sdbcx::OCollectioncreateIndexes (const ::std::vector< OUString > &rNames) override
 creates the index collection for the table More...
 
virtual OUString getRenameStart () const override
 Returns always "RENAME TABLE " even for views. More...
 
virtual void SAL_CALL alterColumnByName (const OUString &rColName, const css::uno::Reference< css::beans::XPropertySet > &rDescriptor) override
 See css::sdbcx::ColumnDescriptor for details of rDescriptor. More...
 
virtual void SAL_CALL alterColumnByIndex (sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
OUString getAlterTableColumnPart () const
 returns the ALTER TABLE XXX statement More...
 
- Public Member Functions inherited from connectivity::OTableHelper
virtual void refreshColumns () override
 
virtual void refreshKeys () override
 
virtual void refreshIndexes () override
 
const ColumnDescgetColumnDescription (const OUString &_sName) const
 
 OTableHelper (sdbcx::OCollection *_pTables, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, bool _bCase)
 
 OTableHelper (sdbcx::OCollection *_pTables, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, bool _bCase, const OUString &Name, const OUString &Type, const OUString &Description=OUString(), const OUString &SchemaName=OUString(), const OUString &CatalogName=OUString())
 
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData () const override
 
css::uno::Reference< css::sdbc::XConnection > const & getConnection () const
 
virtual void SAL_CALL rename (const OUString &newName) override
 
virtual void SAL_CALL alterColumnByIndex (sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual OUString SAL_CALL getName () override
 
const OUString & getTableName ()
 
std::shared_ptr< sdbcx::KeyPropertiesgetKeyProperties (const OUString &_sName) const
 
void addKey (const OUString &_sName, const std::shared_ptr< sdbcx::KeyProperties > &_aKeyProperties)
 
virtual OUString getTypeCreatePattern () const
 
css::uno::Reference< css::sdb::tools::XTableRename > const & getRenameService () const
 
css::uno::Reference< css::sdb::tools::XTableAlteration > const & getAlterService () const
 
css::uno::Reference< css::sdb::tools::XKeyAlteration > const & getKeyService () const
 
css::uno::Reference< css::sdb::tools::XIndexAlteration > const & getIndexService () const
 
- Public Member Functions inherited from connectivity::sdbcx::OTable
 OTable (OCollection *_pTables, bool _bCase)
 
 OTable (OCollection *_pTables, bool _bCase, const OUString &Name, OUString Type, OUString Description=OUString(), OUString SchemaName=OUString(), OUString CatalogName=OUString())
 
virtual ~OTable () override
 
 DECLARE_SERVICE_INFO ()
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void construct () override
 
virtual void refreshColumns () override
 
virtual void refreshKeys ()
 
virtual void refreshIndexes ()
 
virtual void SAL_CALL disposing () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns () override
 
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getKeys () override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &aName) override
 
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getIndexes () override
 
virtual void SAL_CALL rename (const OUString &newName) override
 
virtual void SAL_CALL alterColumnByName (const OUString &colName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual void SAL_CALL alterColumnByIndex (sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData () const
 
- Public Member Functions inherited from cppu::ImplHelper4< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
virtual void refreshColumns ()=0
 
- Public Member Functions inherited from comphelper::OIdPropertyArrayUsageHelper< class TYPE >
 OIdPropertyArrayUsageHelper ()
 
virtual ~OIdPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper (sal_Int32 nId)
 
- Public Member Functions inherited from connectivity::sdbcx::ODescriptor
 ODescriptor (::cppu::OBroadcastHelper &_rBHelper, bool _bCase, bool _bNew=false)
 
virtual ~ODescriptor () override
 
bool isNew () const
 
void setNew (bool _bNew)
 
bool isCaseSensitive () const
 
virtual void construct ()
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes ()
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 

Protected Member Functions

void construct () override
 
- Protected Member Functions inherited from connectivity::OTableHelper
virtual sdbcx::OCollectioncreateColumns (const ::std::vector< OUString > &_rNames)=0
 creates the column collection for the table More...
 
virtual sdbcx::OCollectioncreateKeys (const ::std::vector< OUString > &_rNames)=0
 creates the key collection for the table More...
 
virtual sdbcx::OCollectioncreateIndexes (const ::std::vector< OUString > &_rNames)=0
 creates the index collection for the table More...
 
virtual void SAL_CALL disposing () override
 this function is called upon disposing the component More...
 
virtual OUString getRenameStart () const
 The default returns "RENAME TABLE " or "RENAME VIEW " depending on the type. More...
 
virtual ~OTableHelper () override
 
- Protected Member Functions inherited from connectivity::sdbcx::OTable
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 _nId) const override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
- Protected Member Functions inherited from cppu::ImplHelper4< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
 ~ImplHelper4 () SAL_NOEXCEPT
 
- Protected Member Functions inherited from connectivity::sdbcx::IRefreshableColumns
 ~IRefreshableColumns ()
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 nId) const=0
 
- Protected Member Functions inherited from connectivity::sdbcx::ODescriptor
::cppu::IPropertyArrayHelperdoCreateArrayHelper () const
 helper for derived classes to implement OPropertyArrayUsageHelper::createArrayHelper More...
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override final
 
virtual void getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
void registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
 
void registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 

Private Attributes

::osl::Mutex & m_rMutex
 
sal_Int32 m_nPrivileges
 

Additional Inherited Members

- Static Public Member Functions inherited from connectivity::sdbcx::ODescriptor
static bool isNew (const css::uno::Reference< css::uno::XInterface > &_rxDescriptor)
 
- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 
- Protected Attributes inherited from connectivity::sdbcx::OTable
OUString m_CatalogName
 
OUString m_SchemaName
 
OUString m_Description
 
OUString m_Type
 
std::unique_ptr< OCollectionm_xKeys
 
std::unique_ptr< OCollectionm_xColumns
 
std::unique_ptr< OCollectionm_xIndexes
 
OCollectionm_pTables
 
- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 
- Protected Attributes inherited from connectivity::sdbcx::ODescriptor
OUString m_Name
 

Detailed Description

Definition at line 18 of file mysqlc_table.hxx.

Constructor & Destructor Documentation

◆ Table() [1/2]

connectivity::mysqlc::Table::Table ( Tables pTables,
::osl::Mutex &  rMutex,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection 
)

◆ Table() [2/2]

connectivity::mysqlc::Table::Table ( Tables pTables,
::osl::Mutex &  rMutex,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const OUString &  rCatalog,
const OUString &  rSchema,
const OUString &  rName,
const OUString &  rType,
const OUString &  rDescription 
)

Member Function Documentation

◆ alterColumnByIndex()

void SAL_CALL Table::alterColumnByIndex ( sal_Int32  index,
const css::uno::Reference< css::beans::XPropertySet > &  descriptor 
)
overridevirtual

◆ alterColumnByName()

virtual void SAL_CALL connectivity::mysqlc::Table::alterColumnByName ( const OUString &  rColName,
const css::uno::Reference< css::beans::XPropertySet > &  rDescriptor 
)
overridevirtual

See css::sdbcx::ColumnDescriptor for details of rDescriptor.

Reimplemented from connectivity::sdbcx::OTable.

◆ construct()

void Table::construct ( )
overrideprotectedvirtual

◆ createColumns()

connectivity::sdbcx::OCollection * Table::createColumns ( const ::std::vector< OUString > &  _rNames)
overridevirtual

creates the column collection for the table

Parameters
_rNamesThe column names.

Implements connectivity::OTableHelper.

Definition at line 63 of file mysqlc_table.cxx.

References m_rMutex.

◆ createIndexes()

connectivity::sdbcx::OCollection * Table::createIndexes ( const ::std::vector< OUString > &  _rNames)
overridevirtual

creates the index collection for the table

Parameters
_rNamesThe index names.

Implements connectivity::OTableHelper.

Definition at line 75 of file mysqlc_table.cxx.

References m_rMutex.

◆ createKeys()

connectivity::sdbcx::OCollection * Table::createKeys ( const ::std::vector< OUString > &  _rNames)
overridevirtual

creates the key collection for the table

Parameters
_rNamesThe key names.

Implements connectivity::OTableHelper.

Definition at line 69 of file mysqlc_table.cxx.

References m_rMutex.

◆ getAlterTableColumnPart()

OUString Table::getAlterTableColumnPart ( ) const

returns the ALTER TABLE XXX statement

Definition at line 158 of file mysqlc_table.cxx.

References dbtools::composeTableName(), and m_Name.

◆ getRenameStart()

OUString Table::getRenameStart ( ) const
overridevirtual

Returns always "RENAME TABLE " even for views.

Returns
The start of the rename statement.
See also
http://dev.mysql.com/doc/refman/5.1/de/rename-table.html

Reimplemented from connectivity::OTableHelper.

Definition at line 165 of file mysqlc_table.cxx.

Member Data Documentation

◆ m_nPrivileges

sal_Int32 connectivity::mysqlc::Table::m_nPrivileges
private

Definition at line 22 of file mysqlc_table.hxx.

Referenced by construct().

◆ m_rMutex

::osl::Mutex& connectivity::mysqlc::Table::m_rMutex
private

Definition at line 21 of file mysqlc_table.hxx.


The documentation for this class was generated from the following files: