Files
libreoffice/connectivity/source/drivers/file/FDatabaseMetaData.cxx

1066 lines
34 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-12 22:04:38 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 15:18:56 +00:00
#include "file/FDatabaseMetaData.hxx"
2001-03-28 10:32:43 +00:00
#include "FDatabaseMetaDataResultSet.hxx"
2000-09-18 15:18:56 +00:00
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/ucb/SearchRecursion.hpp>
#include <com/sun/star/ucb/SearchCommandArgument.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
2000-12-06 10:29:33 +00:00
#include <com/sun/star/lang/XUnoTunnel.hpp>
2000-09-18 15:18:56 +00:00
#include <tools/urlobj.hxx>
2000-09-20 05:52:26 +00:00
#include "file/FDriver.hxx"
2000-12-06 10:29:33 +00:00
#include "file/FTable.hxx"
#include <comphelper/processfactory.hxx>
#include <ucbhelper/content.hxx>
2000-09-18 15:18:56 +00:00
using namespace com::sun::star::ucb;
using namespace connectivity::file;
using namespace connectivity;
2000-09-18 15:18:56 +00:00
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
using namespace com::sun::star::sdbcx;
using namespace com::sun::star::container;
ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) : ::connectivity::ODatabaseMetaDataBase(_pCon,_pCon->getConnectionInfo())
2000-11-03 13:21:22 +00:00
,m_pConnection(_pCon)
2000-09-18 15:18:56 +00:00
{
}
2000-09-18 15:18:56 +00:00
ODatabaseMetaData::~ODatabaseMetaData()
{
}
Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( )
2000-09-18 15:18:56 +00:00
{
return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTypeInfo );
2000-09-18 15:18:56 +00:00
}
OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( )
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
2000-09-18 15:18:56 +00:00
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*tableNamePattern*/,
const OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
SAL_WARN("connectivity.drivers", "ODatabaseMetaData::getColumns() should be overridden!");
return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumns );
2000-09-18 15:18:56 +00:00
}
namespace
{
sal_Int16 isCaseSensitiveParentFolder( const OUString& _rFolderOrDoc, const OUString& _rDocName )
{
sal_Int16 nIsCS = 1;
try
{
// first get the real content for the URL
INetURLObject aContentURL( _rFolderOrDoc );
::ucbhelper::Content aContent1;
{
::ucbhelper::Content aFolderOrDoc( _rFolderOrDoc, Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
if ( aFolderOrDoc.isDocument() )
aContent1 = aFolderOrDoc;
else
{
aContentURL = INetURLObject( _rFolderOrDoc, INetURLObject::WAS_ENCODED );
aContentURL.Append( _rDocName );
aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
}
}
// get two extensions which differ by case only
OUString sExtension1(aContentURL.getExtension());
OUString sExtension2(sExtension1.toAsciiLowerCase());
if (sExtension2 == sExtension1)
{
// the extension was already in lower case
sExtension2 = sExtension2.toAsciiUpperCase();
}
// the complete URL for the second extension
INetURLObject aURL2( aContentURL );
if (!sExtension2.isEmpty())
aURL2.SetExtension( sExtension2 );
if ( aURL2.GetMainURL(INetURLObject::NO_DECODE) == aContentURL.GetMainURL(INetURLObject::NO_DECODE) )
return -1;
// the second context
bool bCanAccess = false;
::ucbhelper::Content aContent2;
try
{
aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
bCanAccess = aContent2.isDocument();
}
catch( const Exception& )
{
}
if ( bCanAccess )
{
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
// here we have two contents whose URLs differ by case only.
// Now let's check if both really refer to the same object ....
Reference< XContent > xContent1 = aContent1.get();
Reference< XContent > xContent2 = aContent2.get();
OSL_ENSURE( xContent1.is() && xContent2.is(), "isCaseSensitiveParentFolder: invalid content interfaces!" );
if ( xContent1.is() && xContent2.is() )
{
Reference< XContentIdentifier > xID1 = xContent1->getIdentifier();
Reference< XContentIdentifier > xID2 = xContent2->getIdentifier();
OSL_ENSURE( xID1.is() && xID2.is(), "isCaseSensitiveParentFolder: invalid ID interfaces!" );
if ( xID1.is() && xID2.is()
&& ( UniversalContentBroker::create(
comphelper::getProcessComponentContext() )->
compareContentIds( xID1, xID2 ) == 0 ) )
{
// finally, we know that the folder is not case-sensitive ....
nIsCS = 0;
}
}
}
}
catch( const Exception& )
{
SAL_WARN( "connectivity.drivers", "isCaseSensitiveParentFolder: caught an unexpected exception!" );
}
return nIsCS;
}
}
2000-09-18 15:18:56 +00:00
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
const Any& /*catalog*/, const OUString& /*schemaPattern*/,
const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
::osl::MutexGuard aGuard( m_aMutex );
ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTables );
2000-09-18 15:18:56 +00:00
Reference< XResultSet > xRef = pResult;
2000-10-09 11:34:19 +00:00
// check if any type is given
// when no types are given then we have to return all tables e.g. TABLE
static const char aTable[] = "TABLE";
2000-10-09 11:34:19 +00:00
bool bTableFound = true;
2000-10-09 11:34:19 +00:00
sal_Int32 nLength = types.getLength();
if(nLength)
{
bTableFound = false;
2000-10-09 11:34:19 +00:00
const OUString* pBegin = types.getConstArray();
const OUString* pEnd = pBegin + nLength;
2000-10-09 11:34:19 +00:00
for(;pBegin != pEnd;++pBegin)
{
2000-10-17 08:05:49 +00:00
if(*pBegin == aTable)
2000-10-09 11:34:19 +00:00
{
bTableFound = true;
2000-10-09 11:34:19 +00:00
break;
}
}
}
if(!bTableFound)
return xRef;
2001-07-30 07:53:02 +00:00
Reference<XDynamicResultSet> xContent = m_pConnection->getDir();
Reference < XSortedDynamicResultSetFactory > xSRSFac =
SortedDynamicResultSetFactory::create( m_pConnection->getDriver()->getComponentContext() );
2001-07-30 07:53:02 +00:00
Sequence< NumberedSortingInfo > aSortInfo( 1 );
NumberedSortingInfo* pInfo = aSortInfo.getArray();
2001-07-30 07:53:02 +00:00
pInfo[ 0 ].ColumnIndex = 1;
pInfo[ 0 ].Ascending = sal_True;
Reference < XAnyCompareFactory > xFactory;
Reference< XDynamicResultSet > xDynamicResultSet;
2001-07-30 07:53:02 +00:00
xDynamicResultSet = xSRSFac->createSortedDynamicResultSet( xContent, aSortInfo, xFactory );
Reference<XResultSet> xResultSet = xDynamicResultSet->getStaticResultSet();
Reference<XRow> xRow(xResultSet,UNO_QUERY);
OUString aFilenameExtension = m_pConnection->getExtension();
OUString sThisContentExtension;
ODatabaseMetaDataResultSet::ORows aRows;
2000-10-09 11:34:19 +00:00
// scan the directory for tables
OUString aName;
2001-07-30 07:53:02 +00:00
INetURLObject aURL;
2000-09-20 05:52:26 +00:00
xResultSet->beforeFirst();
bool bKnowCaseSensivity = false;
bool bCaseSensitiveDir = true;
bool bCheckEnabled = m_pConnection->isCheckEnabled();
2000-09-20 05:52:26 +00:00
while(xResultSet->next())
2000-09-18 15:18:56 +00:00
{
2000-09-20 05:52:26 +00:00
aName = xRow->getString(1);
aURL.SetSmartProtocol(INetProtocol::File);
OUString sUrl = m_pConnection->getURL() + "/" + aName;
aURL.SetSmartURL( sUrl );
sThisContentExtension = aURL.getExtension();
ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
aRow.reserve(6);
bool bNewRow = false;
if ( !bKnowCaseSensivity )
{
bKnowCaseSensivity = true;
sal_Int16 nCase = isCaseSensitiveParentFolder( m_pConnection->getURL(), aURL.getName() );
switch( nCase )
{
case 1:
bCaseSensitiveDir = true;
break;
case -1:
bKnowCaseSensivity = false;
/** run through */
case 0:
bCaseSensitiveDir = false;
}
if ( bKnowCaseSensivity )
{
m_pConnection->setCaseSensitiveExtension( bCaseSensitiveDir, OConnection::GrantAccess() );
if ( !bCaseSensitiveDir )
{
aFilenameExtension = aFilenameExtension.toAsciiLowerCase();
}
}
}
if (!aFilenameExtension.isEmpty())
2000-09-18 15:18:56 +00:00
{
if ( !bCaseSensitiveDir )
{
sThisContentExtension = sThisContentExtension.toAsciiLowerCase();
}
if ( sThisContentExtension == aFilenameExtension )
2000-10-05 13:39:02 +00:00
{
aName = aName.copy(0, (aName.getLength()-(aFilenameExtension.getLength()+1)));
sal_Unicode nChar = aName.toChar();
if ( match(tableNamePattern,aName,'\0') && ( !bCheckEnabled || (nChar < '0' || nChar > '9')) )
2000-10-05 13:39:02 +00:00
{
2001-08-29 11:21:08 +00:00
aRow.push_back(new ORowSetValueDecorator(aName));
bNewRow = true;
2000-10-05 13:39:02 +00:00
}
}
2000-09-18 15:18:56 +00:00
}
2000-10-09 11:34:19 +00:00
else // no extension, filter myself
2000-09-18 15:18:56 +00:00
{
bool bErg = false;
2000-09-18 15:18:56 +00:00
do
{
if (aURL.getExtension().isEmpty())
2000-09-18 15:18:56 +00:00
{
sal_Unicode nChar = aURL.getBase()[0];
if( match(tableNamePattern,aURL.getBase(),'\0') && ( !bCheckEnabled || nChar < '0' || nChar > '9' ) )
2000-10-05 13:39:02 +00:00
{
aRow.push_back(new ORowSetValueDecorator(OUString(aURL.getBase())));
bNewRow = true;
2000-10-05 13:39:02 +00:00
}
2000-09-18 15:18:56 +00:00
break;
}
else if ( ( bErg = xResultSet->next() ) )
2000-10-05 13:39:02 +00:00
{
2000-09-20 05:52:26 +00:00
aName = xRow->getString(1);
2000-10-05 13:39:02 +00:00
aURL.SetSmartURL(aName);
}
2000-09-20 05:52:26 +00:00
} while (bErg);
2000-09-18 15:18:56 +00:00
}
2000-10-05 13:39:02 +00:00
if(bNewRow)
{
aRow.push_back(new ORowSetValueDecorator(OUString(aTable)));
aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
2000-10-05 13:39:02 +00:00
aRows.push_back(aRow);
}
2000-09-18 15:18:56 +00:00
}
pResult->setRows(aRows);
2000-09-20 05:52:26 +00:00
2000-09-18 15:18:56 +00:00
return xRef;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return SAL_MAX_INT32;
2000-09-18 15:18:56 +00:00
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( )
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
2000-09-18 15:18:56 +00:00
{
return 1;
}
2000-09-18 15:18:56 +00:00
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
2000-12-06 10:29:33 +00:00
::osl::MutexGuard aGuard( m_aMutex );
ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges );
2000-12-06 10:29:33 +00:00
Reference< XResultSet > xRef = pResult;
ODatabaseMetaDataResultSet::ORows aRows;
2000-12-06 10:29:33 +00:00
Reference< XTablesSupplier > xTabSup = m_pConnection->createCatalog();
2000-12-06 10:29:33 +00:00
if( xTabSup.is())
{
Reference< XNameAccess> xNames = xTabSup->getTables();
Sequence< OUString > aNames = xNames->getElementNames();
const OUString* pBegin = aNames.getConstArray();
const OUString* pEnd = pBegin + aNames.getLength();
2000-12-06 10:29:33 +00:00
for(;pBegin != pEnd;++pBegin)
{
2011-03-01 16:25:46 +00:00
if(match(tableNamePattern,*pBegin,'\0'))
2000-12-06 10:29:33 +00:00
{
static ODatabaseMetaDataResultSet::ORow aRow(8);
2001-08-29 11:21:08 +00:00
aRow[2] = new ORowSetValueDecorator(*pBegin);
aRow[6] = ODatabaseMetaDataResultSet::getSelectValue();
aRow[7] = new ORowSetValueDecorator(OUString("NO"));
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
Reference< XPropertySet> xTable(
xNames->getByName(*pBegin), css::uno::UNO_QUERY);
2000-12-06 10:29:33 +00:00
if(xTable.is())
{
Reference<XUnoTunnel> xTunnel(xTable,UNO_QUERY);
if(xTunnel.is())
{
OFileTable* pTable = reinterpret_cast< OFileTable* >( xTunnel->getSomething(OFileTable::getUnoTunnelImplementationId()) );
2000-12-06 10:29:33 +00:00
if(pTable)
{
if(!pTable->isReadOnly())
{
aRow[6] = ODatabaseMetaDataResultSet::getInsertValue();
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
2001-06-28 11:22:36 +00:00
if(!m_pConnection->showDeleted())
{
aRow[6] = ODatabaseMetaDataResultSet::getDeleteValue();
2001-06-28 11:22:36 +00:00
aRows.push_back(aRow);
}
aRow[6] = ODatabaseMetaDataResultSet::getUpdateValue();
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
aRow[6] = ODatabaseMetaDataResultSet::getCreateValue();
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
aRow[6] = ODatabaseMetaDataResultSet::getReadValue();
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
aRow[6] = ODatabaseMetaDataResultSet::getAlterValue();
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
aRow[6] = ODatabaseMetaDataResultSet::getDropValue();
2000-12-06 10:29:33 +00:00
aRows.push_back(aRow);
}
}
}
}
}
}
}
pResult->setRows(aRows);
return xRef;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
2000-11-14 12:28:38 +00:00
return sal_False;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
2000-09-18 15:18:56 +00:00
{
return OUString("\"");
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
bool ODatabaseMetaData::impl_isCatalogAtStart_throw( )
2000-09-18 15:18:56 +00:00
{
return true;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
::osl::MutexGuard aGuard( m_aMutex );
ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTableTypes );
2001-07-30 07:53:02 +00:00
Reference< XResultSet > xRef = pResult;
static ODatabaseMetaDataResultSet::ORows aRows;
if(aRows.empty())
{
ODatabaseMetaDataResultSet::ORow aRow;
aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
aRow.push_back(new ORowSetValueDecorator(OUString("TABLE")));
aRows.push_back(aRow);
}
2000-09-18 15:18:56 +00:00
pResult->setRows(aRows);
return xRef;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 /*fromType*/, sal_Int32 /*toType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
2000-09-18 15:18:56 +00:00
{
return false;
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString( "sdbc:file:" );
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString::number(1);
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString::number(0);
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString("UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT");
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString("DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW");
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString();
2000-09-18 15:18:56 +00:00
}
OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return OUString("ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS");
2000-09-18 15:18:56 +00:00
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return 0;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
2000-12-06 10:29:33 +00:00
switch(setType)
{
case ResultSetType::FORWARD_ONLY:
return sal_True;
case ResultSetType::SCROLL_INSENSITIVE:
case ResultSetType::SCROLL_SENSITIVE:
break;
}
2000-09-18 15:18:56 +00:00
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 /*concurrency*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
switch(setType)
{
2000-12-06 10:29:33 +00:00
case ResultSetType::FORWARD_ONLY:
2000-09-18 15:18:56 +00:00
return sal_True;
2000-12-06 10:29:33 +00:00
case ResultSetType::SCROLL_INSENSITIVE:
case ResultSetType::SCROLL_SENSITIVE:
2000-09-18 15:18:56 +00:00
break;
}
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException, std::exception)
2000-09-18 15:18:56 +00:00
{
return sal_False;
}
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)
2000-09-18 15:18:56 +00:00
{
return nullptr;
2000-09-18 15:18:56 +00:00
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */