LibreOffice Module connectivity (master) 1
mysqlc_table.hxx
Go to the documentation of this file.
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.
4 *
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 */
9
10#pragma once
11
12#include "mysqlc_tables.hxx"
13
15
17{
18class Table : public OTableHelper
19{
20private:
21 ::osl::Mutex& m_rMutex;
22 sal_Int32 m_nPrivileges;
23
24protected:
25 void construct() override;
26
27public:
28 Table(Tables* pTables, ::osl::Mutex& rMutex,
29 const css::uno::Reference<css::sdbc::XConnection>& _xConnection);
30 Table(Tables* pTables, ::osl::Mutex& rMutex,
31 const css::uno::Reference<css::sdbc::XConnection>& _xConnection, const OUString& rCatalog,
32 const OUString& rSchema, const OUString& rName, const OUString& rType,
33 const OUString& rDescription);
34
35 // OTableHelper
36 virtual ::connectivity::sdbcx::OCollection*
37 createColumns(const ::std::vector<OUString>& rNames) override;
38 virtual ::connectivity::sdbcx::OCollection*
39 createKeys(const ::std::vector<OUString>& rNames) override;
40 virtual ::connectivity::sdbcx::OCollection*
41 createIndexes(const ::std::vector<OUString>& rNames) override;
42
48 virtual OUString getRenameStart() const override;
49
50 // XAlterTable
55 virtual void SAL_CALL
56 alterColumnByName(const OUString& rColName,
57 const css::uno::Reference<css::beans::XPropertySet>& rDescriptor) override;
58
59 virtual void SAL_CALL alterColumnByIndex(
60 sal_Int32 index, const css::uno::Reference<css::beans::XPropertySet>& descriptor) override;
61
64 OUString getAlterTableColumnPart() const;
65};
66
67} // namespace connectivity::mysqlc
68
69/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
virtual ::connectivity::sdbcx::OCollection * createIndexes(const ::std::vector< OUString > &rNames) override
creates the index collection for the table
virtual void SAL_CALL alterColumnByIndex(sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
virtual ::connectivity::sdbcx::OCollection * createKeys(const ::std::vector< OUString > &rNames) override
creates the key collection for the table
OUString getAlterTableColumnPart() const
returns the ALTER TABLE XXX statement
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)
Table(Tables *pTables, ::osl::Mutex &rMutex, const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
virtual ::connectivity::sdbcx::OCollection * createColumns(const ::std::vector< OUString > &rNames) override
creates the column collection for the table
virtual OUString getRenameStart() const override
Returns always "RENAME TABLE " even for views.
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.
This implements com.sun.star.sdbcx.Container, which seems to be also known by the name of Tables and ...