2013-08-08 22:00:36 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONNECTIVITY_FIREBIRD_TABLE_HXX
|
|
|
|
#define CONNECTIVITY_FIREBIRD_TABLE_HXX
|
|
|
|
|
2013-08-10 11:06:48 +01:00
|
|
|
#include "Tables.hxx"
|
|
|
|
|
2013-08-08 22:00:36 +01:00
|
|
|
#include <connectivity/TTableHelper.hxx>
|
|
|
|
|
|
|
|
namespace connectivity
|
|
|
|
{
|
|
|
|
namespace firebird
|
|
|
|
{
|
|
|
|
|
2013-08-14 14:23:42 +01:00
|
|
|
/**
|
|
|
|
* Implements sdbcx.Table. We don't support table renaming (XRename)
|
2013-12-20 11:25:37 +01:00
|
|
|
* hence the appropriate methods are overridden.
|
2013-08-14 14:23:42 +01:00
|
|
|
*/
|
2013-08-08 22:00:36 +01:00
|
|
|
class Table: public OTableHelper
|
|
|
|
{
|
2013-08-10 12:45:21 +01:00
|
|
|
private:
|
|
|
|
::osl::Mutex& m_rMutex;
|
2013-08-22 09:19:17 +01:00
|
|
|
sal_Int32 m_nPrivileges;
|
2013-08-10 12:45:21 +01:00
|
|
|
|
2013-08-15 09:16:36 +01:00
|
|
|
/**
|
|
|
|
* Get the ALTER TABLE [TABLE] ALTER [COLUMN] String.
|
|
|
|
* Includes a trailing space.
|
|
|
|
*/
|
|
|
|
::rtl::OUString getAlterTableColumn(const ::rtl::OUString& rColumn);
|
|
|
|
|
2013-08-22 09:19:17 +01:00
|
|
|
protected:
|
2014-03-26 16:37:00 +01:00
|
|
|
void construct() SAL_OVERRIDE;
|
2013-08-22 09:19:17 +01:00
|
|
|
|
2013-08-10 11:06:48 +01:00
|
|
|
public:
|
2013-08-15 10:51:57 +01:00
|
|
|
Table(Tables* pTables,
|
|
|
|
::osl::Mutex& rMutex,
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
|
2013-08-10 11:06:48 +01:00
|
|
|
Table(Tables* pTables,
|
2013-08-10 12:45:21 +01:00
|
|
|
::osl::Mutex& rMutex,
|
2013-08-10 11:06:48 +01:00
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
|
2013-08-11 23:45:08 +01:00
|
|
|
const ::rtl::OUString& rName,
|
|
|
|
const ::rtl::OUString& rType,
|
2013-08-12 10:47:34 +01:00
|
|
|
const ::rtl::OUString& rDescription);
|
2013-08-10 11:06:48 +01:00
|
|
|
|
|
|
|
// OTableHelper
|
|
|
|
virtual ::connectivity::sdbcx::OCollection* createColumns(
|
2014-03-26 16:37:00 +01:00
|
|
|
const ::connectivity::TStringVector& rNames) SAL_OVERRIDE;
|
2013-08-10 11:06:48 +01:00
|
|
|
virtual ::connectivity::sdbcx::OCollection* createKeys(
|
2014-03-26 16:37:00 +01:00
|
|
|
const ::connectivity::TStringVector& rNames) SAL_OVERRIDE;
|
2013-08-10 11:06:48 +01:00
|
|
|
virtual ::connectivity::sdbcx::OCollection* createIndexes(
|
2014-03-26 16:37:00 +01:00
|
|
|
const ::connectivity::TStringVector& rNames) SAL_OVERRIDE;
|
2013-08-10 11:06:48 +01:00
|
|
|
|
2013-08-14 12:25:43 +01:00
|
|
|
// XAlterTable
|
|
|
|
/**
|
|
|
|
* See ::com::sun::star::sdbcx::ColumnDescriptor for details of
|
|
|
|
* rDescriptor.
|
|
|
|
*/
|
|
|
|
virtual void SAL_CALL alterColumnByName(
|
|
|
|
const ::rtl::OUString& rColName,
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rDescriptor)
|
|
|
|
throw(::com::sun::star::sdbc::SQLException,
|
|
|
|
::com::sun::star::container::NoSuchElementException,
|
2014-03-26 16:37:00 +01:00
|
|
|
::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-08-14 12:25:43 +01:00
|
|
|
|
2013-08-14 14:23:42 +01:00
|
|
|
// XRename -- UNSUPPORTED
|
|
|
|
virtual void SAL_CALL rename(const ::rtl::OUString& sName)
|
|
|
|
throw(::com::sun::star::sdbc::SQLException,
|
|
|
|
::com::sun::star::container::ElementExistException,
|
2014-03-26 16:37:00 +01:00
|
|
|
::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-08-14 14:23:42 +01:00
|
|
|
|
|
|
|
//XInterface
|
|
|
|
virtual ::com::sun::star::uno::Any
|
|
|
|
SAL_CALL queryInterface(const ::com::sun::star::uno::Type & rType)
|
2014-03-26 16:37:00 +01:00
|
|
|
throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-08-14 14:23:42 +01:00
|
|
|
|
|
|
|
//XTypeProvider
|
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
|
|
|
|
SAL_CALL getTypes()
|
2014-03-26 16:37:00 +01:00
|
|
|
throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-08-14 14:23:42 +01:00
|
|
|
|
2013-08-08 22:00:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace firebird
|
|
|
|
} // namespace connectivity
|
|
|
|
|
|
|
|
#endif // CONNECTIVITY_FIREBIRD_TABLE_HXX
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|