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_connectivity.hxx"
26 
27 
28 #ifndef _CONNECTIVITY_DBASE_ODbaseDatabaseMetaData_HXX_
29 #include "dbase/DDatabaseMetaData.hxx"
30 #endif
31 #include <com/sun/star/sdbc/DataType.hpp>
32 #include <com/sun/star/sdbc/ResultSetType.hpp>
33 #include <com/sun/star/sdbc/ColumnValue.hpp>
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
36 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
37 #include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
38 #include <tools/urlobj.hxx>
39 #include "FDatabaseMetaDataResultSet.hxx"
40 #include <com/sun/star/lang/XUnoTunnel.hpp>
41 #include "dbase/DIndex.hxx"
42 #include "connectivity/FValue.hxx"
43 #include <comphelper/extract.hxx>
44 #include <comphelper/types.hxx>
45 #include <ucbhelper/content.hxx>
46 #include <rtl/logfile.hxx>
47 
48 using namespace ::comphelper;
49 using namespace connectivity::dbase;
50 using namespace connectivity;
51 using namespace ::com::sun::star::uno;
52 using namespace ::com::sun::star::beans;
53 using namespace ::com::sun::star::sdbcx;
54 using namespace ::com::sun::star::sdbc;
55 using namespace ::com::sun::star::container;
56 using namespace ::com::sun::star::ucb;
57 using namespace ::com::sun::star::lang;
58 
ODbaseDatabaseMetaData(::connectivity::file::OConnection * _pCon)59 ODbaseDatabaseMetaData::ODbaseDatabaseMetaData(::connectivity::file::OConnection* _pCon) 	:ODatabaseMetaData(_pCon)
60 {
61     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::ODbaseDatabaseMetaData" );
62 }
63 // -------------------------------------------------------------------------
~ODbaseDatabaseMetaData()64 ODbaseDatabaseMetaData::~ODbaseDatabaseMetaData()
65 {
66 }
67 // -------------------------------------------------------------------------
impl_getTypeInfo_throw()68 Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw(  )
69 {
70     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_getTypeInfo_throw" );
71 	::osl::MutexGuard aGuard( m_aMutex );
72 
73 	::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo);
74     Reference< XResultSet > xRef = pResult;
75 
76 	static ODatabaseMetaDataResultSet::ORows aRows;
77 	if(aRows.empty())
78 	{
79 		ODatabaseMetaDataResultSet::ORow aRow;
80 		aRow.reserve(18);
81 
82 		aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
83 		aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR")));
84 		aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR));
85 		aRow.push_back(new ORowSetValueDecorator((sal_Int32)254));
86 		aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue());
87 		aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue());
88 		aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("length")));
89 		aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnValue::NULLABLE));
90 		aRow.push_back(ODatabaseMetaDataResultSet::get1Value());
91 		aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnSearch::FULL));
92 		aRow.push_back(ODatabaseMetaDataResultSet::get1Value());
93 		aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
94 		aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
95 		aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("C"))));
96 		aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
97 		aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
98 		aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
99 		aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
100 		aRow.push_back(new ORowSetValueDecorator((sal_Int32)10));
101 
102 		aRows.push_back(aRow);
103 
104 		aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("LONGVARCHAR"));
105 		aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR);
106 		aRow[3] = new ORowSetValueDecorator((sal_Int32)2147483647);
107 		aRow[6] = new ORowSetValueDecorator();
108         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("M")));
109 		aRows.push_back(aRow);
110 
111 		aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DATE"));
112 		aRow[2] = new ORowSetValueDecorator(DataType::DATE);
113 		aRow[3] = new ORowSetValueDecorator((sal_Int32)10);
114         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D")));
115 		aRows.push_back(aRow);
116 
117 		aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("BOOLEAN"));
118 		aRow[2] = new ORowSetValueDecorator(DataType::BIT);
119 		aRow[3] = ODatabaseMetaDataResultSet::get1Value();
120 		aRow[4] = ODatabaseMetaDataResultSet::getEmptyValue();
121 		aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue();
122 		aRow[6] = new ORowSetValueDecorator(::rtl::OUString());
123 		aRow[9] = ODatabaseMetaDataResultSet::getBasicValue();
124         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L")));
125 		aRows.push_back(aRow);
126 
127 		aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DOUBLE"));
128 		aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE);
129 		aRow[3] = new ORowSetValueDecorator((sal_Int32)8);
130         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("B")));
131 		aRows.push_back(aRow);
132 
133         aRow[11] = new ORowSetValueDecorator(sal_True);
134         aRow[13] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("Y"));
135 		aRows.push_back(aRow);
136 
137         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP"));
138 		aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP);
139         aRow[11] = new ORowSetValueDecorator(sal_False);
140         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("T")));
141 		aRows.push_back(aRow);
142 
143         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER"));
144 		aRow[2] = new ORowSetValueDecorator(DataType::INTEGER);
145 		aRow[3] = new ORowSetValueDecorator((sal_Int32)10);
146         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("I")));
147 		aRows.push_back(aRow);
148 
149         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DECIMAL"));
150 		aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL);
151 		aRow[3] = new ORowSetValueDecorator((sal_Int32)20);
152 		aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("length,scale"));
153         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("F")));
154 		aRows.push_back(aRow);
155 
156         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NUMERIC"));
157 		aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL);
158 		aRow[3] = new ORowSetValueDecorator((sal_Int32)16);
159         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N")));
160 		aRow[15] = new ORowSetValueDecorator((sal_Int32)16);
161 		aRows.push_back(aRow);
162 	}
163 
164 	pResult->setRows(aRows);
165 	return xRef;
166 }
167 // -------------------------------------------------------------------------
getColumns(const Any &,const::rtl::OUString &,const::rtl::OUString & tableNamePattern,const::rtl::OUString & columnNamePattern)168 Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns(
169 	const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/, const ::rtl::OUString& tableNamePattern,
170         const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
171 {
172     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getColumns" );
173 	::osl::MutexGuard aGuard( m_aMutex );
174 
175 
176     Reference< XTablesSupplier > xTables = m_pConnection->createCatalog();
177 	if(!xTables.is())
178         throw SQLException();
179 
180 	Reference< XNameAccess> xNames = xTables->getTables();
181 	if(!xNames.is())
182         throw SQLException();
183 
184 	ODatabaseMetaDataResultSet::ORows aRows;
185 	ODatabaseMetaDataResultSet::ORow aRow(19);
186 
187 	aRow[10] = new ORowSetValueDecorator((sal_Int32)10);
188 	Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames());
189 	const ::rtl::OUString* pTabBegin	= aTabNames.getConstArray();
190 	const ::rtl::OUString* pTabEnd		= pTabBegin + aTabNames.getLength();
191 	for(;pTabBegin != pTabEnd;++pTabBegin)
192 	{
193 		if(match(tableNamePattern,*pTabBegin,'\0'))
194 		{
195 			Reference< XColumnsSupplier> xTable;
196 			::cppu::extractInterface(xTable,xNames->getByName(*pTabBegin));
197 			OSL_ENSURE(xTable.is(),"Table not found! Normallya exception had to be thrown here!");
198 			aRow[3] = new ORowSetValueDecorator(*pTabBegin);
199 
200 			Reference< XNameAccess> xColumns = xTable->getColumns();
201 			if(!xColumns.is())
202                 throw SQLException();
203 
204 			Sequence< ::rtl::OUString> aColNames(xColumns->getElementNames());
205 
206 			const ::rtl::OUString* pBegin = aColNames.getConstArray();
207 			const ::rtl::OUString* pEnd = pBegin + aColNames.getLength();
208 			Reference< XPropertySet> xColumn;
209 			for(sal_Int32 i=1;pBegin != pEnd;++pBegin,++i)
210 			{
211 				if(match(columnNamePattern,*pBegin,'\0'))
212 				{
213 					aRow[4] = new ORowSetValueDecorator(*pBegin);
214 
215 					::cppu::extractInterface(xColumn,xColumns->getByName(*pBegin));
216 					OSL_ENSURE(xColumn.is(),"Columns contains a column who isn't a fastpropertyset!");
217 					aRow[5] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))));
218 					aRow[6] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))));
219 					aRow[7] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))));
220 					aRow[9] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))));
221 					aRow[11] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))));
222 					aRow[13] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE))));
223 					switch((sal_Int32)aRow[5]->getValue())
224 					{
225 					case DataType::CHAR:
226 					case DataType::VARCHAR:
227 						aRow[16] = new ORowSetValueDecorator((sal_Int32)254);
228 						break;
229 					case DataType::LONGVARCHAR:
230 						aRow[16] = new ORowSetValueDecorator((sal_Int32)65535);
231 						break;
232 					default:
233 						aRow[16] = new ORowSetValueDecorator((sal_Int32)0);
234 					}
235 					aRow[17] = new ORowSetValueDecorator(i);
236 					switch(sal_Int32(aRow[11]->getValue()))
237 					{
238 					case ColumnValue::NO_NULLS:
239 						aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO"));
240 						break;
241 					case ColumnValue::NULLABLE:
242 						aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES"));
243 						break;
244 					default:
245 						aRow[18] = new ORowSetValueDecorator(::rtl::OUString());
246 					}
247 					aRows.push_back(aRow);
248 				}
249 			}
250 		}
251 	}
252     ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns);
253     Reference< XResultSet > xRef = pResult;
254 	pResult->setRows(aRows);
255 
256 	return xRef;
257 }
258 // -------------------------------------------------------------------------
getIndexInfo(const Any &,const::rtl::OUString &,const::rtl::OUString & table,sal_Bool unique,sal_Bool)259 Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo(
260 	const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& table,
261         sal_Bool unique, sal_Bool /*approximate*/ ) throw(SQLException, RuntimeException)
262 {
263     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getIndexInfo" );
264 	::osl::MutexGuard aGuard( m_aMutex );
265 
266         Reference< XTablesSupplier > xTables = m_pConnection->createCatalog();
267 	if(!xTables.is())
268                 throw SQLException();
269 
270 	Reference< XNameAccess> xNames = xTables->getTables();
271 	if(!xNames.is())
272                 throw SQLException();
273 
274 	ODatabaseMetaDataResultSet::ORows aRows;
275 	ODatabaseMetaDataResultSet::ORow aRow(14);
276 
277 	aRow[5]		= new ORowSetValueDecorator(::rtl::OUString());
278 	aRow[10]	= new ORowSetValueDecorator(::rtl::OUString::createFromAscii("A"));
279 
280 	Reference< XIndexesSupplier> xTable;
281 	::cppu::extractInterface(xTable,xNames->getByName(table));
282 	aRow[3] = new ORowSetValueDecorator(table);
283 	aRow[7] = new ORowSetValueDecorator((sal_Int32)3);
284 
285 	Reference< XNameAccess> xIndexes = xTable->getIndexes();
286 	if(!xIndexes.is())
287 		throw SQLException();
288 
289 	Sequence< ::rtl::OUString> aIdxNames(xIndexes->getElementNames());
290 
291 	const ::rtl::OUString* pBegin = aIdxNames.getConstArray();
292 	const ::rtl::OUString* pEnd = pBegin + aIdxNames.getLength();
293 	Reference< XPropertySet> xIndex;
294 	for(;pBegin != pEnd;++pBegin)
295 	{
296 		::cppu::extractInterface(xIndex,xIndexes->getByName(*pBegin));
297 		OSL_ENSURE(xIndex.is(),"Indexes contains a column who isn't a fastpropertyset!");
298 
299 		if(unique && !getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))
300 			continue;
301 		aRow[4] = new ORowSetValueDecorator(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))));
302 		aRow[6] = new ORowSetValueDecorator(*pBegin);
303 
304 		Reference< XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
305 		if(xTunnel.is())
306 		{
307 			ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
308 			if(pIndex)
309 			{
310 				aRow[11] = new ORowSetValueDecorator((sal_Int32)pIndex->getHeader().db_maxkeys);
311 				aRow[12] = new ORowSetValueDecorator((sal_Int32)pIndex->getHeader().db_pagecount);
312 			}
313 		}
314 
315 		Reference<XColumnsSupplier> xColumnsSup(xIndex,UNO_QUERY);
316 		Reference< XNameAccess> xColumns = xColumnsSup->getColumns();
317 		Sequence< ::rtl::OUString> aColNames(xColumns->getElementNames());
318 
319 		const ::rtl::OUString* pColBegin = aColNames.getConstArray();
320 		const ::rtl::OUString* pColEnd = pColBegin + aColNames.getLength();
321 		Reference< XPropertySet> xColumn;
322 		for(sal_Int32 j=1;pColBegin != pColEnd;++pColBegin,++j)
323 		{
324 			//	xColumns->getByName(*pColBegin) >>= xColumn;
325 			aRow[8] = new ORowSetValueDecorator(j);
326 			aRow[9] = new ORowSetValueDecorator(*pColBegin);
327 			aRows.push_back(aRow);
328 		}
329 	}
330 
331     ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo);
332     Reference< XResultSet > xRef = pResult;
333 	pResult->setRows(aRows);
334 	return xRef;
335 }
336 // -------------------------------------------------------------------------
getURL()337 ::rtl::OUString SAL_CALL ODbaseDatabaseMetaData::getURL(  ) throw(SQLException, RuntimeException)
338 {
339     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getURL" );
340 	::osl::MutexGuard aGuard( m_aMutex );
341 	return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) + m_pConnection->getURL();
342 }
343 // -------------------------------------------------------------------------
getMaxBinaryLiteralLength()344 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxBinaryLiteralLength(  ) throw(SQLException, RuntimeException)
345 {
346     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxBinaryLiteralLength" );
347 	return STRING_MAXLEN;
348 }
349 // -------------------------------------------------------------------------
getMaxCharLiteralLength()350 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxCharLiteralLength(  ) throw(SQLException, RuntimeException)
351 {
352     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxCharLiteralLength" );
353 	return 254;
354 }
355 // -------------------------------------------------------------------------
getMaxColumnNameLength()356 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnNameLength(  ) throw(SQLException, RuntimeException)
357 {
358     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxColumnNameLength" );
359 	return 10;
360 }
361 // -------------------------------------------------------------------------
getMaxColumnsInIndex()362 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnsInIndex(  ) throw(SQLException, RuntimeException)
363 {
364     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxColumnsInIndex" );
365 	return 1;
366 }
367 // -------------------------------------------------------------------------
getMaxColumnsInTable()368 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnsInTable(  ) throw(SQLException, RuntimeException)
369 {
370     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxColumnsInTable" );
371 	return 128;
372 }
373 // -----------------------------------------------------------------------------
supportsAlterTableWithAddColumn()374 sal_Bool SAL_CALL ODbaseDatabaseMetaData::supportsAlterTableWithAddColumn(  ) throw(SQLException, RuntimeException)
375 {
376     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::supportsAlterTableWithAddColumn" );
377 	return sal_True;
378 }
379 // -------------------------------------------------------------------------
supportsAlterTableWithDropColumn()380 sal_Bool SAL_CALL ODbaseDatabaseMetaData::supportsAlterTableWithDropColumn(  ) throw(SQLException, RuntimeException)
381 {
382     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::supportsAlterTableWithDropColumn" );
383 	return sal_False;
384 }
385 // -----------------------------------------------------------------------------
isReadOnly()386 sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly(  ) throw(SQLException, RuntimeException)
387 {
388     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::isReadOnly" );
389 	::osl::MutexGuard aGuard( m_aMutex );
390 
391 	sal_Bool bReadOnly = sal_False;
392 	static ::rtl::OUString sReadOnly = ::rtl::OUString::createFromAscii("IsReadOnly");
393 	::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >());
394 	aFile.getPropertyValue(sReadOnly) >>= bReadOnly;
395 
396 	return bReadOnly;
397 }
398 // -----------------------------------------------------------------------------
impl_storesMixedCaseQuotedIdentifiers_throw()399 sal_Bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw(  )
400 {
401     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" );
402 	return sal_True;
403 }
404 // -----------------------------------------------------------------------------
impl_supportsMixedCaseQuotedIdentifiers_throw()405 sal_Bool ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw(  )
406 {
407     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw" );
408 	return sal_True;
409 }
410 // -----------------------------------------------------------------------------
411 
412 
413