1ebfcd9afSAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3ebfcd9afSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4ebfcd9afSAndrew Rist * or more contributor license agreements. See the NOTICE file 5ebfcd9afSAndrew Rist * distributed with this work for additional information 6ebfcd9afSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7ebfcd9afSAndrew Rist * to you under the Apache License, Version 2.0 (the 8ebfcd9afSAndrew Rist * "License"); you may not use this file except in compliance 9ebfcd9afSAndrew Rist * with the License. You may obtain a copy of the License at 10ebfcd9afSAndrew Rist * 11ebfcd9afSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12ebfcd9afSAndrew Rist * 13ebfcd9afSAndrew Rist * Unless required by applicable law or agreed to in writing, 14ebfcd9afSAndrew Rist * software distributed under the License is distributed on an 15ebfcd9afSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16ebfcd9afSAndrew Rist * KIND, either express or implied. See the License for the 17ebfcd9afSAndrew Rist * specific language governing permissions and limitations 18ebfcd9afSAndrew Rist * under the License. 19ebfcd9afSAndrew Rist * 20ebfcd9afSAndrew Rist *************************************************************/ 21ebfcd9afSAndrew Rist 22ebfcd9afSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_sdb_tools_XTableAlteration_idl__ 25cdf0e10cSrcweir#define __com_sun_star_sdb_tools_XTableAlteration_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_SQLException_idl__ 28cdf0e10cSrcweir#include <com/sun/star/sdbc/SQLException.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir#include <com/sun/star/sdb/tools/XConnectionSupplier.idl> 31cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__ 32cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl> 33cdf0e10cSrcweir#endif 34cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 35cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir//============================================================================= 39cdf0e10cSrcweirmodule com { module sun { module star { module sdb { module tools { 40cdf0e10cSrcweir//============================================================================= 41cdf0e10cSrcweir 42cdf0e10cSrcweir//----------------------------------------------------------------------------- 43cdf0e10cSrcweir/** allows to alter a table. 44cdf0e10cSrcweir 45cdf0e10cSrcweir @see com::sun::star::sdb::DataSource::Settings 46cdf0e10cSrcweir @see com::sun::star::sdbcx::ColumnDescriptor 47cdf0e10cSrcweir @see com::sun::star::sdbcx::XAlterTable 48cdf0e10cSrcweir @see com::sun::star::sdbcx::XAppend 49cdf0e10cSrcweir @see com::sun::star::sdbcx::XDrop 50cdf0e10cSrcweir 51*c4dc0a1aSJürgen Schmidt @since OpenOffice 3.3 52cdf0e10cSrcweir*/ 53cdf0e10cSrcweirinterface XTableAlteration 54cdf0e10cSrcweir{ 55cdf0e10cSrcweir interface XConnectionSupplier; 56cdf0e10cSrcweir 57cdf0e10cSrcweir /** alter the column defined by name 58cdf0e10cSrcweir 59cdf0e10cSrcweir @param table 60cdf0e10cSrcweir the table to be altered 61cdf0e10cSrcweir 62cdf0e10cSrcweir @param columnName 63cdf0e10cSrcweir the name of the column to be changed 64cdf0e10cSrcweir 65cdf0e10cSrcweir @param columnDescriptor 66cdf0e10cSrcweir the column descriptor with the information of the new column definition 67cdf0e10cSrcweir 68cdf0e10cSrcweir @throws com::sun::star::sdbc::SQLException 69cdf0e10cSrcweir @see com::sun::star::sdbcx::XAlterTable 70cdf0e10cSrcweir */ 71cdf0e10cSrcweir void alterColumnByName( [in] com::sun::star::beans::XPropertySet table, [in] string columnName, [in] com::sun::star::beans::XPropertySet columnDescriptor) 72cdf0e10cSrcweir raises ( com::sun::star::sdbc::SQLException ); 73cdf0e10cSrcweir 74cdf0e10cSrcweir /** creates a new object using the given descriptor and appends it 75cdf0e10cSrcweir to the related container. 76cdf0e10cSrcweir <b> 77cdf0e10cSrcweir Note: 78cdf0e10cSrcweir </b> 79cdf0e10cSrcweir The descriptor will not be changed and can be used again to append another object. 80cdf0e10cSrcweir @param table 81cdf0e10cSrcweir the table to be altered 82cdf0e10cSrcweir @param descriptor 83cdf0e10cSrcweir the descriptor which should be serve to append a new object 84cdf0e10cSrcweir @throws com::sun::star::sdbc::SQLException 85cdf0e10cSrcweir if a database access error occurs. 86cdf0e10cSrcweir @see com::sun::star::sdbcx::XAppend 87cdf0e10cSrcweir */ 88cdf0e10cSrcweir void addColumn([in] com::sun::star::beans::XPropertySet table,[in]com::sun::star::beans::XPropertySet descriptor) 89cdf0e10cSrcweir raises (com::sun::star::sdbc::SQLException); 90cdf0e10cSrcweir 91cdf0e10cSrcweir /** drops an object of the related container identified by its name. 92cdf0e10cSrcweir @param table 93cdf0e10cSrcweir the table to be altered 94cdf0e10cSrcweir @param columnName 95cdf0e10cSrcweir the name of the column to be dropped 96cdf0e10cSrcweir @throws com::sun::star::sdbc::SQLException 97cdf0e10cSrcweir if a database access error occurs. 98cdf0e10cSrcweir @see com::sun::star::sdbcx::XDrop 99cdf0e10cSrcweir */ 100cdf0e10cSrcweir void dropColumn([in] com::sun::star::beans::XPropertySet table,[in]string columnName) 101cdf0e10cSrcweir raises ( com::sun::star::sdbc::SQLException); 102cdf0e10cSrcweir}; 103cdf0e10cSrcweir//============================================================================= 104cdf0e10cSrcweir}; }; }; }; }; 105cdf0e10cSrcweir//============================================================================= 106cdf0e10cSrcweir 107cdf0e10cSrcweir#endif 108cdf0e10cSrcweir 109