1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "file/FDatabaseMetaData.hxx"
21 #include "FDatabaseMetaDataResultSet.hxx"
22 #include <com/sun/star/sdbc/DataType.hpp>
23 #include <com/sun/star/sdbc/ResultSetType.hpp>
24 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
25 #include <com/sun/star/ucb/SearchRecursion.hpp>
26 #include <com/sun/star/ucb/SearchCommandArgument.hpp>
27 #include <com/sun/star/ucb/UniversalContentBroker.hpp>
28 #include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
29 #include <com/sun/star/lang/XUnoTunnel.hpp>
30 #include <tools/urlobj.hxx>
31 #include "file/FDriver.hxx"
32 #include "file/FTable.hxx"
33 #include <comphelper/processfactory.hxx>
34 #include <tools/debug.hxx>
35 #include <ucbhelper/content.hxx>
37 using namespace com::sun::star::ucb
;
38 using namespace connectivity::file
;
39 using namespace connectivity
;
40 using namespace com::sun::star::uno
;
41 using namespace com::sun::star::lang
;
42 using namespace com::sun::star::beans
;
43 using namespace com::sun::star::sdbc
;
44 using namespace com::sun::star::sdbcx
;
45 using namespace com::sun::star::container
;
47 ODatabaseMetaData::ODatabaseMetaData(OConnection
* _pCon
) : ::connectivity::ODatabaseMetaDataBase(_pCon
,_pCon
->getConnectionInfo())
52 ODatabaseMetaData::~ODatabaseMetaData()
56 Reference
< XResultSet
> ODatabaseMetaData::impl_getTypeInfo_throw( )
58 return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTypeInfo
);
61 OUString
ODatabaseMetaData::impl_getCatalogSeparator_throw( )
66 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
67 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*tableNamePattern*/,
68 const OUString
& /*columnNamePattern*/ ) throw(SQLException
, RuntimeException
, std::exception
)
70 SAL_WARN( "connectivity.drivers","Should be overloaded!");
71 return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumns
);
77 sal_Int16
isCaseSensitiveParentFolder( const OUString
& _rFolderOrDoc
, const OUString
& _rDocName
)
82 // first get the real content for the URL
83 INetURLObject
aContentURL( _rFolderOrDoc
);
84 ::ucbhelper::Content aContent1
;
86 ::ucbhelper::Content
aFolderOrDoc( _rFolderOrDoc
, Reference
< XCommandEnvironment
>(), comphelper::getProcessComponentContext() );
87 if ( aFolderOrDoc
.isDocument() )
88 aContent1
= aFolderOrDoc
;
91 aContentURL
= INetURLObject( _rFolderOrDoc
, INetURLObject::WAS_ENCODED
);
92 aContentURL
.Append( _rDocName
);
93 aContent1
= ::ucbhelper::Content( aContentURL
.GetMainURL( INetURLObject::NO_DECODE
), Reference
< XCommandEnvironment
>(), comphelper::getProcessComponentContext() );
97 // get two extensions which differ by case only
98 OUString
sExtension1(aContentURL
.getExtension());
99 OUString
sExtension2(sExtension1
.toAsciiLowerCase());
100 if (sExtension2
== sExtension1
)
102 // the extension was already in lower case
103 sExtension2
= sExtension2
.toAsciiUpperCase();
106 // the complete URL for the second extension
107 INetURLObject
aURL2( aContentURL
);
108 if (!sExtension2
.isEmpty())
109 aURL2
.SetExtension( sExtension2
);
110 if ( aURL2
.GetMainURL(INetURLObject::NO_DECODE
) == aContentURL
.GetMainURL(INetURLObject::NO_DECODE
) )
113 // the second context
114 bool bCanAccess
= false;
115 ::ucbhelper::Content aContent2
;
118 aContent2
= ::ucbhelper::Content( aURL2
.GetMainURL( INetURLObject::NO_DECODE
), Reference
< XCommandEnvironment
>(), comphelper::getProcessComponentContext() );
119 bCanAccess
= aContent2
.isDocument();
121 catch( const Exception
& )
127 // here we have two contents whose URLs differ by case only.
128 // Now let's check if both really refer to the same object ....
129 Reference
< XContent
> xContent1
= aContent1
.get();
130 Reference
< XContent
> xContent2
= aContent2
.get();
131 OSL_ENSURE( xContent1
.is() && xContent2
.is(), "isCaseSensitiveParentFolder: invalid content interfaces!" );
132 if ( xContent1
.is() && xContent2
.is() )
134 Reference
< XContentIdentifier
> xID1
= xContent1
->getIdentifier();
135 Reference
< XContentIdentifier
> xID2
= xContent2
->getIdentifier();
136 OSL_ENSURE( xID1
.is() && xID2
.is(), "isCaseSensitiveParentFolder: invalid ID interfaces!" );
137 if ( xID1
.is() && xID2
.is()
138 && ( UniversalContentBroker::create(
139 comphelper::getProcessComponentContext() )->
140 compareContentIds( xID1
, xID2
) == 0 ) )
142 // finally, we know that the folder is not case-sensitive ....
148 catch( const Exception
& )
150 SAL_WARN( "connectivity.drivers", "isCaseSensitiveParentFolder: caught an unexpected exception!" );
158 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
159 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/,
160 const OUString
& tableNamePattern
, const Sequence
< OUString
>& types
) throw(SQLException
, RuntimeException
, std::exception
)
162 ::osl::MutexGuard
aGuard( m_aMutex
);
165 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTables
);
166 Reference
< XResultSet
> xRef
= pResult
;
168 // check if any type is given
169 // when no types are given then we have to return all tables e.g. TABLE
171 static const OUString
aTable("TABLE");
173 bool bTableFound
= true;
174 sal_Int32 nLength
= types
.getLength();
179 const OUString
* pBegin
= types
.getConstArray();
180 const OUString
* pEnd
= pBegin
+ nLength
;
181 for(;pBegin
!= pEnd
;++pBegin
)
183 if(*pBegin
== aTable
)
193 Reference
<XDynamicResultSet
> xContent
= m_pConnection
->getDir();
194 Reference
< XSortedDynamicResultSetFactory
> xSRSFac
=
195 SortedDynamicResultSetFactory::create( m_pConnection
->getDriver()->getComponentContext() );
197 Sequence
< NumberedSortingInfo
> aSortInfo( 1 );
198 NumberedSortingInfo
* pInfo
= aSortInfo
.getArray();
199 pInfo
[ 0 ].ColumnIndex
= 1;
200 pInfo
[ 0 ].Ascending
= sal_True
;
202 Reference
< XAnyCompareFactory
> xFactory
;
203 Reference
< XDynamicResultSet
> xDynamicResultSet
;
204 xDynamicResultSet
= xSRSFac
->createSortedDynamicResultSet( xContent
, aSortInfo
, xFactory
);
205 Reference
<XResultSet
> xResultSet
= xDynamicResultSet
->getStaticResultSet();
207 Reference
<XRow
> xRow(xResultSet
,UNO_QUERY
);
209 OUString aFilenameExtension
= m_pConnection
->getExtension();
210 OUString sThisContentExtension
;
211 ODatabaseMetaDataResultSet::ORows aRows
;
212 // scan the directory for tables
215 xResultSet
->beforeFirst();
217 bool bKnowCaseSensivity
= false;
218 bool bCaseSensitiveDir
= true;
219 bool bCheckEnabled
= m_pConnection
->isCheckEnabled();
221 while(xResultSet
->next())
223 aName
= xRow
->getString(1);
224 aURL
.SetSmartProtocol(INET_PROT_FILE
);
225 OUString sUrl
= m_pConnection
->getURL() + "/" + aName
;
226 aURL
.SetSmartURL( sUrl
);
227 sThisContentExtension
= aURL
.getExtension();
229 ODatabaseMetaDataResultSet::ORow
aRow(3);
231 bool bNewRow
= false;
233 if ( !bKnowCaseSensivity
)
235 bKnowCaseSensivity
= true;
236 sal_Int16 nCase
= isCaseSensitiveParentFolder( m_pConnection
->getURL(), aURL
.getName() );
240 bCaseSensitiveDir
= true;
243 bKnowCaseSensivity
= false;
246 bCaseSensitiveDir
= false;
248 if ( bKnowCaseSensivity
)
250 m_pConnection
->setCaseSensitiveExtension( bCaseSensitiveDir
, OConnection::GrantAccess() );
251 if ( !bCaseSensitiveDir
)
253 aFilenameExtension
= aFilenameExtension
.toAsciiLowerCase();
258 if (!aFilenameExtension
.isEmpty())
260 if ( !bCaseSensitiveDir
)
262 sThisContentExtension
= sThisContentExtension
.toAsciiLowerCase();
265 if ( sThisContentExtension
== aFilenameExtension
)
267 aName
= aName
.copy(0, (aName
.getLength()-(aFilenameExtension
.getLength()+1)));
268 sal_Unicode nChar
= aName
.toChar();
269 if ( match(tableNamePattern
,aName
,'\0') && ( !bCheckEnabled
|| ( bCheckEnabled
&& ((nChar
< '0' || nChar
> '9')))) )
271 aRow
.push_back(new ORowSetValueDecorator(aName
));
276 else // no extension, filter myself
281 if (aURL
.getExtension().isEmpty())
283 sal_Unicode nChar
= aURL
.getBase()[0];
284 if(match(tableNamePattern
,aURL
.getBase(),'\0') && ( !bCheckEnabled
|| ( bCheckEnabled
&& ((nChar
< '0' || nChar
> '9')))) )
286 aRow
.push_back(new ORowSetValueDecorator(OUString(aURL
.getBase())));
291 else if ( ( bErg
= xResultSet
->next() ) )
293 aName
= xRow
->getString(1);
294 aURL
.SetSmartURL(aName
);
300 aRow
.push_back(new ORowSetValueDecorator(aTable
));
301 aRow
.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
303 aRows
.push_back(aRow
);
307 pResult
->setRows(aRows
);
312 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException
, RuntimeException
, std::exception
)
317 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( ) throw(SQLException
, RuntimeException
, std::exception
)
322 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
327 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException
, RuntimeException
, std::exception
)
329 return SAL_MAX_INT32
;
332 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
337 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException
, RuntimeException
, std::exception
)
342 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
347 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( ) throw(SQLException
, RuntimeException
, std::exception
)
352 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException
, RuntimeException
, std::exception
)
357 sal_Int32
ODatabaseMetaData::impl_getMaxStatements_throw( )
362 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
367 sal_Int32
ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
372 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
373 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& tableNamePattern
) throw(SQLException
, RuntimeException
, std::exception
)
375 ::osl::MutexGuard
aGuard( m_aMutex
);
377 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges
);
378 Reference
< XResultSet
> xRef
= pResult
;
379 ODatabaseMetaDataResultSet::ORows aRows
;
382 Reference
< XTablesSupplier
> xTabSup
= m_pConnection
->createCatalog();
385 Reference
< XNameAccess
> xNames
= xTabSup
->getTables();
386 Sequence
< OUString
> aNames
= xNames
->getElementNames();
387 const OUString
* pBegin
= aNames
.getConstArray();
388 const OUString
* pEnd
= pBegin
+ aNames
.getLength();
389 for(;pBegin
!= pEnd
;++pBegin
)
391 if(match(tableNamePattern
,*pBegin
,'\0'))
393 static ODatabaseMetaDataResultSet::ORow
aRow(8);
395 aRow
[2] = new ORowSetValueDecorator(*pBegin
);
396 aRow
[6] = ODatabaseMetaDataResultSet::getSelectValue();
397 aRow
[7] = new ORowSetValueDecorator(OUString("NO"));
398 aRows
.push_back(aRow
);
400 Reference
< XPropertySet
> xTable(
401 xNames
->getByName(*pBegin
), css::uno::UNO_QUERY
);
404 Reference
<XUnoTunnel
> xTunnel(xTable
,UNO_QUERY
);
407 OFileTable
* pTable
= reinterpret_cast< OFileTable
* >( xTunnel
->getSomething(OFileTable::getUnoTunnelImplementationId()) );
410 if(!pTable
->isReadOnly())
412 aRow
[6] = ODatabaseMetaDataResultSet::getInsertValue();
413 aRows
.push_back(aRow
);
414 if(!m_pConnection
->showDeleted())
416 aRow
[6] = ODatabaseMetaDataResultSet::getDeleteValue();
417 aRows
.push_back(aRow
);
419 aRow
[6] = ODatabaseMetaDataResultSet::getUpdateValue();
420 aRows
.push_back(aRow
);
421 aRow
[6] = ODatabaseMetaDataResultSet::getCreateValue();
422 aRows
.push_back(aRow
);
423 aRow
[6] = ODatabaseMetaDataResultSet::getReadValue();
424 aRows
.push_back(aRow
);
425 aRow
[6] = ODatabaseMetaDataResultSet::getAlterValue();
426 aRows
.push_back(aRow
);
427 aRow
[6] = ODatabaseMetaDataResultSet::getDropValue();
428 aRows
.push_back(aRow
);
437 pResult
->setRows(aRows
);
441 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException
, RuntimeException
, std::exception
)
446 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
451 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
456 bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
461 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
466 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
471 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
476 bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
481 bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
486 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException
, RuntimeException
, std::exception
)
491 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException
, RuntimeException
, std::exception
)
496 OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( ) throw(SQLException
, RuntimeException
, std::exception
)
501 OUString
ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
503 static const OUString
sQuote("\"");
507 OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException
, RuntimeException
, std::exception
)
512 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException
, RuntimeException
, std::exception
)
517 bool ODatabaseMetaData::impl_isCatalogAtStart_throw( )
522 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
527 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException
, RuntimeException
, std::exception
)
532 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException
, RuntimeException
, std::exception
)
537 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
542 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException
, RuntimeException
, std::exception
)
547 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException
, RuntimeException
, std::exception
)
552 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException
, RuntimeException
, std::exception
)
557 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException
, RuntimeException
, std::exception
)
562 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException
, RuntimeException
, std::exception
)
567 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException
, RuntimeException
, std::exception
)
572 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32
/*level*/ ) throw(SQLException
, RuntimeException
, std::exception
)
577 bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
582 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException
, RuntimeException
, std::exception
)
587 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException
, RuntimeException
, std::exception
)
592 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException
, RuntimeException
, std::exception
)
597 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
602 bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
607 bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
612 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
617 bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
622 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException
, RuntimeException
, std::exception
)
627 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( ) throw(SQLException
, RuntimeException
, std::exception
)
629 ::osl::MutexGuard
aGuard( m_aMutex
);
631 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTableTypes
);
632 Reference
< XResultSet
> xRef
= pResult
;
633 static ODatabaseMetaDataResultSet::ORows aRows
;
636 ODatabaseMetaDataResultSet::ORow aRow
;
637 aRow
.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
638 aRow
.push_back(new ORowSetValueDecorator(OUString("TABLE")));
639 aRows
.push_back(aRow
);
641 pResult
->setRows(aRows
);
645 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException
, RuntimeException
, std::exception
)
650 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
655 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
660 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
665 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException
, RuntimeException
, std::exception
)
670 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException
, RuntimeException
, std::exception
)
675 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException
, RuntimeException
, std::exception
)
680 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException
, RuntimeException
, std::exception
)
685 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( ) throw(SQLException
, RuntimeException
, std::exception
)
690 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( ) throw(SQLException
, RuntimeException
, std::exception
)
695 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException
, RuntimeException
, std::exception
)
700 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException
, RuntimeException
, std::exception
)
705 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException
, RuntimeException
, std::exception
)
710 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException
, RuntimeException
, std::exception
)
715 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException
, RuntimeException
, std::exception
)
720 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32
/*fromType*/, sal_Int32
/*toType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
725 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException
, RuntimeException
, std::exception
)
730 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( ) throw(SQLException
, RuntimeException
, std::exception
)
735 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException
, RuntimeException
, std::exception
)
740 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException
, RuntimeException
, std::exception
)
745 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
750 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException
, RuntimeException
, std::exception
)
755 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException
, RuntimeException
, std::exception
)
760 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException
, RuntimeException
, std::exception
)
765 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( ) throw(SQLException
, RuntimeException
, std::exception
)
770 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( ) throw(SQLException
, RuntimeException
, std::exception
)
775 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
780 bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
785 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException
, RuntimeException
, std::exception
)
790 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException
, RuntimeException
, std::exception
)
795 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException
, RuntimeException
, std::exception
)
800 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException
, RuntimeException
, std::exception
)
805 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException
, RuntimeException
, std::exception
)
810 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
815 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException
, RuntimeException
, std::exception
)
820 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
825 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException
, RuntimeException
, std::exception
)
830 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException
, RuntimeException
, std::exception
)
835 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException
, RuntimeException
, std::exception
)
840 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException
, RuntimeException
, std::exception
)
845 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException
, RuntimeException
, std::exception
)
850 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException
, RuntimeException
, std::exception
)
855 OUString SAL_CALL
ODatabaseMetaData::getURL( ) throw(SQLException
, RuntimeException
, std::exception
)
857 static const OUString
aValue( "sdbc:file:" );
861 OUString SAL_CALL
ODatabaseMetaData::getUserName( ) throw(SQLException
, RuntimeException
, std::exception
)
866 OUString SAL_CALL
ODatabaseMetaData::getDriverName( ) throw(SQLException
, RuntimeException
, std::exception
)
871 OUString SAL_CALL
ODatabaseMetaData::getDriverVersion( ) throw(SQLException
, RuntimeException
, std::exception
)
873 return OUString::number(1);
876 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException
, RuntimeException
, std::exception
)
878 return OUString::number(0);
881 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException
, RuntimeException
, std::exception
)
886 OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( ) throw(SQLException
, RuntimeException
, std::exception
)
891 OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( ) throw(SQLException
, RuntimeException
, std::exception
)
896 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException
, std::exception
)
901 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException
, RuntimeException
, std::exception
)
906 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException
, std::exception
)
911 OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( ) throw(SQLException
, RuntimeException
, std::exception
)
916 OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException
, RuntimeException
, std::exception
)
921 OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
923 return OUString("UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT");
926 OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
928 return OUString("DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW");
931 OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
936 OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
938 return OUString("ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS");
941 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException
, RuntimeException
, std::exception
)
946 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException
, RuntimeException
, std::exception
)
951 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException
, RuntimeException
, std::exception
)
956 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException
, RuntimeException
, std::exception
)
961 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException
, RuntimeException
, std::exception
)
966 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException
, RuntimeException
, std::exception
)
971 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException
, RuntimeException
, std::exception
)
976 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException
, RuntimeException
, std::exception
)
981 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
986 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
) throw(SQLException
, RuntimeException
, std::exception
)
990 case ResultSetType::FORWARD_ONLY
:
992 case ResultSetType::SCROLL_INSENSITIVE
:
993 case ResultSetType::SCROLL_SENSITIVE
:
999 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32
/*concurrency*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1003 case ResultSetType::FORWARD_ONLY
:
1005 case ResultSetType::SCROLL_INSENSITIVE
:
1006 case ResultSetType::SCROLL_SENSITIVE
:
1012 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1017 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1022 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1027 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1032 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1037 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1042 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1047 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1052 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1057 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException
, RuntimeException
, std::exception
)
1062 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getUDTs( const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*typeNamePattern*/, const Sequence
< sal_Int32
>& /*types*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1068 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */