1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_dbaccess.hxx" 26 27 #ifndef DBACCESS_DATASOURCEMETADATA_HXX 28 #include "datasourcemetadata.hxx" 29 #endif 30 31 /** === begin UNO includes === **/ 32 #ifndef _COM_SUN_STAR_LANG_NULLPOINTEREXCEPTION_HPP_ 33 #include <com/sun/star/lang/NullPointerException.hpp> 34 #endif 35 /** === end UNO includes === **/ 36 37 #ifndef CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX 38 #include <connectivity/dbmetadata.hxx> 39 #endif 40 41 //........................................................................ 42 namespace sdbtools 43 { 44 //........................................................................ 45 46 /** === begin UNO using === **/ 47 using ::com::sun::star::uno::Reference; 48 using ::com::sun::star::sdbc::XConnection; 49 using ::com::sun::star::lang::NullPointerException; 50 using ::com::sun::star::uno::RuntimeException; 51 /** === end UNO using === **/ 52 53 //==================================================================== 54 //= DataSourceMetaData_Impl 55 //==================================================================== 56 struct DataSourceMetaData_Impl 57 { 58 }; 59 60 //==================================================================== 61 //= DataSourceMetaData 62 //==================================================================== 63 //-------------------------------------------------------------------- DataSourceMetaData(const::comphelper::ComponentContext & _rContext,const Reference<XConnection> & _rxConnection)64 DataSourceMetaData::DataSourceMetaData( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection ) 65 :ConnectionDependentComponent( _rContext ) 66 ,m_pImpl( new DataSourceMetaData_Impl ) 67 { 68 if ( !_rxConnection.is() ) 69 throw NullPointerException(); 70 setWeakConnection( _rxConnection ); 71 } 72 73 //-------------------------------------------------------------------- ~DataSourceMetaData()74 DataSourceMetaData::~DataSourceMetaData() 75 { 76 } 77 78 //-------------------------------------------------------------------- supportsQueriesInFrom()79 ::sal_Bool SAL_CALL DataSourceMetaData::supportsQueriesInFrom( ) throw (RuntimeException) 80 { 81 EntryGuard aGuard( *this ); 82 ::dbtools::DatabaseMetaData aMeta( getConnection() ); 83 return aMeta.supportsSubqueriesInFrom(); 84 } 85 86 //........................................................................ 87 } // namespace sdbtools 88 //........................................................................ 89 90