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 <ucbhelper/content.hxx>
36 using namespace com::sun::star::ucb
;
37 using namespace connectivity::file
;
38 using namespace connectivity
;
39 using namespace com::sun::star::uno
;
40 using namespace com::sun::star::lang
;
41 using namespace com::sun::star::beans
;
42 using namespace com::sun::star::sdbc
;
43 using namespace com::sun::star::sdbcx
;
44 using namespace com::sun::star::container
;
46 ODatabaseMetaData::ODatabaseMetaData(OConnection
* _pCon
) : ::connectivity::ODatabaseMetaDataBase(_pCon
,_pCon
->getConnectionInfo())
51 ODatabaseMetaData::~ODatabaseMetaData()
55 Reference
< XResultSet
> ODatabaseMetaData::impl_getTypeInfo_throw( )
57 return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTypeInfo
);
60 OUString
ODatabaseMetaData::impl_getCatalogSeparator_throw( )
65 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
66 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*tableNamePattern*/,
67 const OUString
& /*columnNamePattern*/ ) throw(SQLException
, RuntimeException
, std::exception
)
69 SAL_WARN("connectivity.drivers", "ODatabaseMetaData::getColumns() should be overridden!");
70 return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumns
);
76 sal_Int16
isCaseSensitiveParentFolder( const OUString
& _rFolderOrDoc
, const OUString
& _rDocName
)
81 // first get the real content for the URL
82 INetURLObject
aContentURL( _rFolderOrDoc
);
83 ::ucbhelper::Content aContent1
;
85 ::ucbhelper::Content
aFolderOrDoc( _rFolderOrDoc
, Reference
< XCommandEnvironment
>(), comphelper::getProcessComponentContext() );
86 if ( aFolderOrDoc
.isDocument() )
87 aContent1
= aFolderOrDoc
;
90 aContentURL
= INetURLObject( _rFolderOrDoc
, INetURLObject::EncodeMechanism::WasEncoded
);
91 aContentURL
.Append( _rDocName
);
92 aContent1
= ::ucbhelper::Content( aContentURL
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), Reference
< XCommandEnvironment
>(), comphelper::getProcessComponentContext() );
96 // get two extensions which differ by case only
97 OUString
sExtension1(aContentURL
.getExtension());
98 OUString
sExtension2(sExtension1
.toAsciiLowerCase());
99 if (sExtension2
== sExtension1
)
101 // the extension was already in lower case
102 sExtension2
= sExtension2
.toAsciiUpperCase();
105 // the complete URL for the second extension
106 INetURLObject
aURL2( aContentURL
);
107 if (!sExtension2
.isEmpty())
108 aURL2
.SetExtension( sExtension2
);
109 if ( aURL2
.GetMainURL(INetURLObject::DecodeMechanism::NONE
) == aContentURL
.GetMainURL(INetURLObject::DecodeMechanism::NONE
) )
112 // the second context
113 bool bCanAccess
= false;
114 ::ucbhelper::Content aContent2
;
117 aContent2
= ::ucbhelper::Content( aURL2
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), Reference
< XCommandEnvironment
>(), comphelper::getProcessComponentContext() );
118 bCanAccess
= aContent2
.isDocument();
120 catch( const Exception
& )
126 // here we have two contents whose URLs differ by case only.
127 // Now let's check if both really refer to the same object ....
128 Reference
< XContent
> xContent1
= aContent1
.get();
129 Reference
< XContent
> xContent2
= aContent2
.get();
130 OSL_ENSURE( xContent1
.is() && xContent2
.is(), "isCaseSensitiveParentFolder: invalid content interfaces!" );
131 if ( xContent1
.is() && xContent2
.is() )
133 Reference
< XContentIdentifier
> xID1
= xContent1
->getIdentifier();
134 Reference
< XContentIdentifier
> xID2
= xContent2
->getIdentifier();
135 OSL_ENSURE( xID1
.is() && xID2
.is(), "isCaseSensitiveParentFolder: invalid ID interfaces!" );
136 if ( xID1
.is() && xID2
.is()
137 && ( UniversalContentBroker::create(
138 comphelper::getProcessComponentContext() )->
139 compareContentIds( xID1
, xID2
) == 0 ) )
141 // finally, we know that the folder is not case-sensitive ....
147 catch( const Exception
& )
149 SAL_WARN( "connectivity.drivers", "isCaseSensitiveParentFolder: caught an unexpected exception!" );
157 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
158 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/,
159 const OUString
& tableNamePattern
, const Sequence
< OUString
>& types
) throw(SQLException
, RuntimeException
, std::exception
)
161 ::osl::MutexGuard
aGuard( m_aMutex
);
164 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTables
);
165 Reference
< XResultSet
> xRef
= pResult
;
167 // check if any type is given
168 // when no types are given then we have to return all tables e.g. TABLE
170 static const char aTable
[] = "TABLE";
172 bool bTableFound
= true;
173 sal_Int32 nLength
= types
.getLength();
178 const OUString
* pBegin
= types
.getConstArray();
179 const OUString
* pEnd
= pBegin
+ nLength
;
180 for(;pBegin
!= pEnd
;++pBegin
)
182 if(*pBegin
== aTable
)
192 Reference
<XDynamicResultSet
> xContent
= m_pConnection
->getDir();
193 Reference
< XSortedDynamicResultSetFactory
> xSRSFac
=
194 SortedDynamicResultSetFactory::create( m_pConnection
->getDriver()->getComponentContext() );
196 Sequence
< NumberedSortingInfo
> aSortInfo( 1 );
197 NumberedSortingInfo
* pInfo
= aSortInfo
.getArray();
198 pInfo
[ 0 ].ColumnIndex
= 1;
199 pInfo
[ 0 ].Ascending
= true;
201 Reference
< XAnyCompareFactory
> xFactory
;
202 Reference
< XDynamicResultSet
> xDynamicResultSet
;
203 xDynamicResultSet
= xSRSFac
->createSortedDynamicResultSet( xContent
, aSortInfo
, xFactory
);
204 Reference
<XResultSet
> xResultSet
= xDynamicResultSet
->getStaticResultSet();
206 Reference
<XRow
> xRow(xResultSet
,UNO_QUERY
);
208 OUString aFilenameExtension
= m_pConnection
->getExtension();
209 OUString sThisContentExtension
;
210 ODatabaseMetaDataResultSet::ORows aRows
;
211 // scan the directory for tables
214 xResultSet
->beforeFirst();
216 bool bKnowCaseSensivity
= false;
217 bool bCaseSensitiveDir
= true;
218 bool bCheckEnabled
= m_pConnection
->isCheckEnabled();
220 while(xResultSet
->next())
222 aName
= xRow
->getString(1);
223 aURL
.SetSmartProtocol(INetProtocol::File
);
224 OUString sUrl
= m_pConnection
->getURL() + "/" + aName
;
225 aURL
.SetSmartURL( sUrl
);
226 sThisContentExtension
= aURL
.getExtension();
228 ODatabaseMetaDataResultSet::ORow aRow
{ nullptr, nullptr, nullptr };
230 bool bNewRow
= false;
232 if ( !bKnowCaseSensivity
)
234 bKnowCaseSensivity
= true;
235 sal_Int16 nCase
= isCaseSensitiveParentFolder( m_pConnection
->getURL(), aURL
.getName() );
239 bCaseSensitiveDir
= true;
242 bKnowCaseSensivity
= false;
245 bCaseSensitiveDir
= false;
247 if ( bKnowCaseSensivity
)
249 m_pConnection
->setCaseSensitiveExtension( bCaseSensitiveDir
, OConnection::GrantAccess() );
250 if ( !bCaseSensitiveDir
)
252 aFilenameExtension
= aFilenameExtension
.toAsciiLowerCase();
257 if (!aFilenameExtension
.isEmpty())
259 if ( !bCaseSensitiveDir
)
261 sThisContentExtension
= sThisContentExtension
.toAsciiLowerCase();
264 if ( sThisContentExtension
== aFilenameExtension
)
266 aName
= aName
.copy(0, (aName
.getLength()-(aFilenameExtension
.getLength()+1)));
267 sal_Unicode nChar
= aName
.toChar();
268 if ( match(tableNamePattern
,aName
,'\0') && ( !bCheckEnabled
|| (nChar
< '0' || nChar
> '9')) )
270 aRow
.push_back(new ORowSetValueDecorator(aName
));
275 else // no extension, filter myself
280 if (aURL
.getExtension().isEmpty())
282 sal_Unicode nChar
= aURL
.getBase()[0];
283 if( match(tableNamePattern
,aURL
.getBase(),'\0') && ( !bCheckEnabled
|| nChar
< '0' || nChar
> '9' ) )
285 aRow
.push_back(new ORowSetValueDecorator(OUString(aURL
.getBase())));
290 else if ( ( bErg
= xResultSet
->next() ) )
292 aName
= xRow
->getString(1);
293 aURL
.SetSmartURL(aName
);
299 aRow
.push_back(new ORowSetValueDecorator(OUString(aTable
)));
300 aRow
.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
302 aRows
.push_back(aRow
);
306 pResult
->setRows(aRows
);
311 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException
, RuntimeException
, std::exception
)
316 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( ) throw(SQLException
, RuntimeException
, std::exception
)
321 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
326 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException
, RuntimeException
, std::exception
)
328 return SAL_MAX_INT32
;
331 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
336 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException
, RuntimeException
, std::exception
)
341 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
346 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( ) throw(SQLException
, RuntimeException
, std::exception
)
351 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException
, RuntimeException
, std::exception
)
356 sal_Int32
ODatabaseMetaData::impl_getMaxStatements_throw( )
361 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
366 sal_Int32
ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
371 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
372 const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& tableNamePattern
) throw(SQLException
, RuntimeException
, std::exception
)
374 ::osl::MutexGuard
aGuard( m_aMutex
);
376 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges
);
377 Reference
< XResultSet
> xRef
= pResult
;
378 ODatabaseMetaDataResultSet::ORows aRows
;
381 Reference
< XTablesSupplier
> xTabSup
= m_pConnection
->createCatalog();
384 Reference
< XNameAccess
> xNames
= xTabSup
->getTables();
385 Sequence
< OUString
> aNames
= xNames
->getElementNames();
386 const OUString
* pBegin
= aNames
.getConstArray();
387 const OUString
* pEnd
= pBegin
+ aNames
.getLength();
388 for(;pBegin
!= pEnd
;++pBegin
)
390 if(match(tableNamePattern
,*pBegin
,'\0'))
392 static ODatabaseMetaDataResultSet::ORow
aRow(8);
394 aRow
[2] = new ORowSetValueDecorator(*pBegin
);
395 aRow
[6] = ODatabaseMetaDataResultSet::getSelectValue();
396 aRow
[7] = new ORowSetValueDecorator(OUString("NO"));
397 aRows
.push_back(aRow
);
399 Reference
< XPropertySet
> xTable(
400 xNames
->getByName(*pBegin
), css::uno::UNO_QUERY
);
403 Reference
<XUnoTunnel
> xTunnel(xTable
,UNO_QUERY
);
406 OFileTable
* pTable
= reinterpret_cast< OFileTable
* >( xTunnel
->getSomething(OFileTable::getUnoTunnelImplementationId()) );
409 if(!pTable
->isReadOnly())
411 aRow
[6] = ODatabaseMetaDataResultSet::getInsertValue();
412 aRows
.push_back(aRow
);
413 if(!m_pConnection
->showDeleted())
415 aRow
[6] = ODatabaseMetaDataResultSet::getDeleteValue();
416 aRows
.push_back(aRow
);
418 aRow
[6] = ODatabaseMetaDataResultSet::getUpdateValue();
419 aRows
.push_back(aRow
);
420 aRow
[6] = ODatabaseMetaDataResultSet::getCreateValue();
421 aRows
.push_back(aRow
);
422 aRow
[6] = ODatabaseMetaDataResultSet::getReadValue();
423 aRows
.push_back(aRow
);
424 aRow
[6] = ODatabaseMetaDataResultSet::getAlterValue();
425 aRows
.push_back(aRow
);
426 aRow
[6] = ODatabaseMetaDataResultSet::getDropValue();
427 aRows
.push_back(aRow
);
436 pResult
->setRows(aRows
);
440 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException
, RuntimeException
, std::exception
)
445 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
450 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
455 bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
460 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
465 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
470 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
475 bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
480 bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
485 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException
, RuntimeException
, std::exception
)
490 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException
, RuntimeException
, std::exception
)
495 OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( ) throw(SQLException
, RuntimeException
, std::exception
)
500 OUString
ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
502 return OUString("\"");
505 OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException
, RuntimeException
, std::exception
)
510 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException
, RuntimeException
, std::exception
)
515 bool ODatabaseMetaData::impl_isCatalogAtStart_throw( )
520 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
525 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException
, RuntimeException
, std::exception
)
530 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException
, RuntimeException
, std::exception
)
535 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
540 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException
, RuntimeException
, std::exception
)
545 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException
, RuntimeException
, std::exception
)
550 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException
, RuntimeException
, std::exception
)
555 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException
, RuntimeException
, std::exception
)
560 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException
, RuntimeException
, std::exception
)
565 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException
, RuntimeException
, std::exception
)
570 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32
/*level*/ ) throw(SQLException
, RuntimeException
, std::exception
)
575 bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
580 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException
, RuntimeException
, std::exception
)
585 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException
, RuntimeException
, std::exception
)
590 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException
, RuntimeException
, std::exception
)
595 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
600 bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
605 bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
610 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
615 bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
620 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException
, RuntimeException
, std::exception
)
625 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( ) throw(SQLException
, RuntimeException
, std::exception
)
627 ::osl::MutexGuard
aGuard( m_aMutex
);
629 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTableTypes
);
630 Reference
< XResultSet
> xRef
= pResult
;
631 static ODatabaseMetaDataResultSet::ORows aRows
;
634 ODatabaseMetaDataResultSet::ORow aRow
;
635 aRow
.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
636 aRow
.push_back(new ORowSetValueDecorator(OUString("TABLE")));
637 aRows
.push_back(aRow
);
639 pResult
->setRows(aRows
);
643 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException
, RuntimeException
, std::exception
)
648 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
653 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
658 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
663 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException
, RuntimeException
, std::exception
)
668 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException
, RuntimeException
, std::exception
)
673 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException
, RuntimeException
, std::exception
)
678 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException
, RuntimeException
, std::exception
)
683 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( ) throw(SQLException
, RuntimeException
, std::exception
)
688 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( ) throw(SQLException
, RuntimeException
, std::exception
)
693 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException
, RuntimeException
, std::exception
)
698 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException
, RuntimeException
, std::exception
)
703 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException
, RuntimeException
, std::exception
)
708 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException
, RuntimeException
, std::exception
)
713 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException
, RuntimeException
, std::exception
)
718 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32
/*fromType*/, sal_Int32
/*toType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
723 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException
, RuntimeException
, std::exception
)
728 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( ) throw(SQLException
, RuntimeException
, std::exception
)
733 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException
, RuntimeException
, std::exception
)
738 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException
, RuntimeException
, std::exception
)
743 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException
, RuntimeException
, std::exception
)
748 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException
, RuntimeException
, std::exception
)
753 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException
, RuntimeException
, std::exception
)
758 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException
, RuntimeException
, std::exception
)
763 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( ) throw(SQLException
, RuntimeException
, std::exception
)
768 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( ) throw(SQLException
, RuntimeException
, std::exception
)
773 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
, std::exception
)
778 bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
783 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException
, RuntimeException
, std::exception
)
788 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException
, RuntimeException
, std::exception
)
793 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException
, RuntimeException
, std::exception
)
798 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException
, RuntimeException
, std::exception
)
803 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException
, RuntimeException
, std::exception
)
808 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
813 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException
, RuntimeException
, std::exception
)
818 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
, std::exception
)
823 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException
, RuntimeException
, std::exception
)
828 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException
, RuntimeException
, std::exception
)
833 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException
, RuntimeException
, std::exception
)
838 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException
, RuntimeException
, std::exception
)
843 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException
, RuntimeException
, std::exception
)
848 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException
, RuntimeException
, std::exception
)
853 OUString SAL_CALL
ODatabaseMetaData::getURL( ) throw(SQLException
, RuntimeException
, std::exception
)
855 return OUString( "sdbc:file:" );
858 OUString SAL_CALL
ODatabaseMetaData::getUserName( ) throw(SQLException
, RuntimeException
, std::exception
)
863 OUString SAL_CALL
ODatabaseMetaData::getDriverName( ) throw(SQLException
, RuntimeException
, std::exception
)
868 OUString SAL_CALL
ODatabaseMetaData::getDriverVersion( ) throw(SQLException
, RuntimeException
, std::exception
)
870 return OUString::number(1);
873 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException
, RuntimeException
, std::exception
)
875 return OUString::number(0);
878 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException
, RuntimeException
, std::exception
)
883 OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( ) throw(SQLException
, RuntimeException
, std::exception
)
888 OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( ) throw(SQLException
, RuntimeException
, std::exception
)
893 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException
, std::exception
)
898 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException
, RuntimeException
, std::exception
)
903 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException
, std::exception
)
908 OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( ) throw(SQLException
, RuntimeException
, std::exception
)
913 OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException
, RuntimeException
, std::exception
)
918 OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
920 return OUString("UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT");
923 OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
925 return OUString("DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW");
928 OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
933 OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( ) throw(SQLException
, RuntimeException
, std::exception
)
935 return OUString("ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS");
938 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException
, RuntimeException
, std::exception
)
943 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException
, RuntimeException
, std::exception
)
948 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException
, RuntimeException
, std::exception
)
953 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException
, RuntimeException
, std::exception
)
958 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException
, RuntimeException
, std::exception
)
963 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException
, RuntimeException
, std::exception
)
968 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException
, RuntimeException
, std::exception
)
973 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException
, RuntimeException
, std::exception
)
978 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException
, RuntimeException
, std::exception
)
983 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
) throw(SQLException
, RuntimeException
, std::exception
)
987 case ResultSetType::FORWARD_ONLY
:
989 case ResultSetType::SCROLL_INSENSITIVE
:
990 case ResultSetType::SCROLL_SENSITIVE
:
996 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32
/*concurrency*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1000 case ResultSetType::FORWARD_ONLY
:
1002 case ResultSetType::SCROLL_INSENSITIVE
:
1003 case ResultSetType::SCROLL_SENSITIVE
:
1009 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1014 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1019 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1024 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1029 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1034 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1039 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1044 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1049 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32
/*setType*/ ) throw(SQLException
, RuntimeException
, std::exception
)
1054 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException
, RuntimeException
, std::exception
)
1059 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
)
1065 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */