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 <odbc/ODatabaseMetaData.hxx>
21 #include <odbc/OTools.hxx>
22 #include <odbc/ODatabaseMetaDataResultSet.hxx>
23 #include <FDatabaseMetaDataResultSet.hxx>
24 #include <com/sun/star/sdbc/DataType.hpp>
25 #include <com/sun/star/sdbc/ResultSetType.hpp>
26 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
27 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
28 #include <TPrivilegesResultSet.hxx>
29 #include <rtl/ustrbuf.hxx>
30 #include <sal/log.hxx>
32 using namespace connectivity::odbc
;
33 using namespace com::sun::star::uno
;
34 using namespace com::sun::star::lang
;
35 using namespace com::sun::star::beans
;
36 using namespace com::sun::star::sdbc
;
38 ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle
,OConnection
* _pCon
)
39 : ::connectivity::ODatabaseMetaDataBase(_pCon
,_pCon
->getConnectionInfo())
40 ,m_aConnectionHandle(_pHandle
)
44 OSL_ENSURE(m_pConnection
,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
45 if(!m_pConnection
->isCatalogUsed())
47 osl_atomic_increment( &m_refCount
);
50 m_bUseCatalog
= !(usesLocalFiles() || usesLocalFilePerTable());
53 { // doesn't matter here
55 osl_atomic_decrement( &m_refCount
);
59 ODatabaseMetaData::~ODatabaseMetaData()
63 Reference
< XResultSet
> ODatabaseMetaData::impl_getTypeInfo_throw( )
65 Reference
< XResultSet
> xRef
;
68 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
70 pResult
->openTypeInfo();
74 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo
);
80 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCatalogs( )
82 Reference
< XResultSet
> xRef
;
85 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs
);
91 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
93 pResult
->openCatalogs();
97 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs
);
104 OUString
ODatabaseMetaData::impl_getCatalogSeparator_throw( )
108 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_NAME_SEPARATOR
,aVal
,*this,m_pConnection
->getTextEncoding());
113 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getSchemas( )
115 Reference
< XResultSet
> xRef
;
118 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
120 pResult
->openSchemas();
124 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eSchemas
);
129 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumnPrivileges(
130 const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
131 const OUString
& columnNamePattern
)
133 Reference
< XResultSet
> xRef
;
136 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
138 pResult
->openColumnPrivileges(m_bUseCatalog
? catalog
: Any(),schema
,table
,columnNamePattern
);
142 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumnPrivileges
);
147 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
148 const Any
& catalog
, const OUString
& schemaPattern
, const OUString
& tableNamePattern
,
149 const OUString
& columnNamePattern
)
151 Reference
< XResultSet
> xRef
;
154 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
156 pResult
->openColumns(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
,columnNamePattern
);
160 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns
);
165 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
166 const Any
& catalog
, const OUString
& schemaPattern
,
167 const OUString
& tableNamePattern
, const Sequence
< OUString
>& types
)
169 Reference
< XResultSet
> xRef
;
172 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
174 pResult
->openTables(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
,types
);
178 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTables
);
183 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedureColumns(
184 const Any
& catalog
, const OUString
& schemaPattern
,
185 const OUString
& procedureNamePattern
, const OUString
& columnNamePattern
)
187 Reference
< XResultSet
> xRef
;
190 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
192 pResult
->openProcedureColumns(m_bUseCatalog
? catalog
: Any(),schemaPattern
,procedureNamePattern
,columnNamePattern
);
196 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedureColumns
);
201 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedures(
202 const Any
& catalog
, const OUString
& schemaPattern
,
203 const OUString
& procedureNamePattern
)
205 Reference
< XResultSet
> xRef
;
208 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
210 pResult
->openProcedures(m_bUseCatalog
? catalog
: Any(),schemaPattern
,procedureNamePattern
);
214 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedures
);
219 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getVersionColumns(
220 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
222 Reference
< XResultSet
> xRef
;
223 bool bSuccess
= false;
226 if ( !m_pConnection
->preventGetVersionColumns() )
228 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
230 pResult
->openVersionColumns(m_bUseCatalog
? catalog
: Any(),schema
,table
);
240 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns
);
246 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( )
249 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_BINARY_LITERAL_LEN
,nValue
,*this);
253 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( )
256 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_ROW_SIZE
,nValue
,*this);
260 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( )
263 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CATALOG_NAME_LEN
,nValue
,*this);
267 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( )
270 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CHAR_LITERAL_LEN
,nValue
,*this);
274 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( )
277 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMN_NAME_LEN
,nValue
,*this);
281 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( )
284 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_INDEX
,nValue
,*this);
288 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( )
291 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CURSOR_NAME_LEN
,nValue
,*this);
295 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( )
298 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_DRIVER_CONNECTIONS
/*SQL_ACTIVE_CONNECTIONS*/,nValue
,*this);
302 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( )
305 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_TABLE
,nValue
,*this);
309 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( )
312 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_STATEMENT_LEN
,nValue
,*this);
316 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( )
319 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_TABLE_NAME_LEN
,nValue
,*this);
323 sal_Int32
ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
326 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_TABLES_IN_SELECT
,nValue
,*this);
330 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getExportedKeys(
331 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
333 Reference
< XResultSet
> xRef
;
336 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
338 pResult
->openExportedKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
342 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eExportedKeys
);
347 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getImportedKeys(
348 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
350 Reference
< XResultSet
> xRef
;
353 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
355 pResult
->openImportedKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
359 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eImportedKeys
);
364 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getPrimaryKeys(
365 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
367 Reference
< XResultSet
> xRef
;
370 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
372 pResult
->openPrimaryKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
376 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::ePrimaryKeys
);
381 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getIndexInfo(
382 const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
383 sal_Bool unique
, sal_Bool approximate
)
385 Reference
< XResultSet
> xRef
;
388 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
390 pResult
->openIndexInfo(m_bUseCatalog
? catalog
: Any(),schema
,table
,unique
,approximate
);
394 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo
);
399 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getBestRowIdentifier(
400 const Any
& catalog
, const OUString
& schema
, const OUString
& table
, sal_Int32 scope
,
403 Reference
< XResultSet
> xRef
;
406 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
408 pResult
->openBestRowIdentifier(m_bUseCatalog
? catalog
: Any(),schema
,table
,scope
,nullable
);
412 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eBestRowIdentifier
);
417 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
418 const Any
& catalog
, const OUString
& schemaPattern
, const OUString
& tableNamePattern
)
420 if ( m_pConnection
->isIgnoreDriverPrivilegesEnabled() )
422 return new OResultSetPrivileges(this,catalog
,schemaPattern
,tableNamePattern
);
424 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
425 pResult
->openTablePrivileges(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
);
429 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCrossReference(
430 const Any
& primaryCatalog
, const OUString
& primarySchema
,
431 const OUString
& primaryTable
, const Any
& foreignCatalog
,
432 const OUString
& foreignSchema
, const OUString
& foreignTable
)
434 Reference
< XResultSet
> xRef
;
437 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
439 pResult
->openForeignKeys(m_bUseCatalog
? primaryCatalog
: Any(),primarySchema
.toChar() == '%' ? &primarySchema
: nullptr,&primaryTable
,
440 m_bUseCatalog
? foreignCatalog
: Any(), foreignSchema
.toChar() == '%' ? &foreignSchema
: nullptr,&foreignTable
);
444 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCrossReference
);
449 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( )
452 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_ROW_SIZE_INCLUDES_LONG
,aVal
,*this,m_pConnection
->getTextEncoding());
453 return aVal
.toChar() == 'Y';
456 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( )
459 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
460 return nValue
== SQL_IC_LOWER
;
463 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( )
466 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
467 return nValue
== SQL_IC_LOWER
;
470 bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
473 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
474 return nValue
== SQL_IC_MIXED
;
477 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( )
480 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
481 return nValue
== SQL_IC_MIXED
;
484 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( )
487 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
488 return nValue
== SQL_IC_UPPER
;
491 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( )
494 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
495 return nValue
== SQL_IC_UPPER
;
498 bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
501 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ALTER_TABLE
,nValue
,*this);
502 return (nValue
& SQL_AT_ADD_COLUMN
) == SQL_AT_ADD_COLUMN
;
505 bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
508 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ALTER_TABLE
,nValue
,*this);
509 return ((nValue
& SQL_AT_DROP_COLUMN
) == SQL_AT_DROP_COLUMN
) ||
510 ((nValue
& SQL_AT_DROP_COLUMN_CASCADE
) == SQL_AT_DROP_COLUMN_CASCADE
) ||
511 ((nValue
& SQL_AT_DROP_COLUMN_RESTRICT
) == SQL_AT_DROP_COLUMN_RESTRICT
);
514 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( )
517 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_INDEX_SIZE
,nValue
,*this);
521 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( )
524 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NON_NULLABLE_COLUMNS
,nValue
,*this);
525 return nValue
== SQL_NNC_NON_NULL
;
528 OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( )
532 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_TERM
,aVal
,*this,m_pConnection
->getTextEncoding());
536 OUString
ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
539 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_QUOTE_CHAR
,aVal
,*this,m_pConnection
->getTextEncoding());
543 OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( )
546 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SPECIAL_CHARACTERS
,aVal
,*this,m_pConnection
->getTextEncoding());
550 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( )
553 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CORRELATION_NAME
,nValue
,*this);
554 return nValue
!= SQL_CN_NONE
;
557 bool ODatabaseMetaData::impl_isCatalogAtStart_throw( )
559 SQLUSMALLINT nValue
=0;
561 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_LOCATION
,nValue
,*this);
562 return nValue
== SQL_CL_START
;
565 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( )
568 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
569 return nValue
== SQL_TC_DDL_IGNORE
;
572 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( )
575 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
576 return nValue
== SQL_TC_DDL_COMMIT
;
579 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( )
582 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
583 return nValue
== SQL_TC_DML
;
586 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( )
589 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
590 return nValue
== SQL_TC_ALL
;
593 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( )
596 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
597 return (nValue
& SQL_CA1_POS_DELETE
) == SQL_CA1_POS_DELETE
;
600 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( )
603 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
604 return (nValue
& SQL_CA1_POS_UPDATE
) == SQL_CA1_POS_UPDATE
;
607 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( )
610 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_ROLLBACK_BEHAVIOR
,nValue
,*this);
611 return nValue
== SQL_CB_PRESERVE
|| nValue
== SQL_CB_CLOSE
;
614 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( )
617 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_COMMIT_BEHAVIOR
,nValue
,*this);
618 return nValue
== SQL_CB_PRESERVE
|| nValue
== SQL_CB_CLOSE
;
621 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( )
624 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_COMMIT_BEHAVIOR
,nValue
,*this);
625 return nValue
== SQL_CB_PRESERVE
;
628 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( )
631 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_ROLLBACK_BEHAVIOR
,nValue
,*this);
632 return nValue
== SQL_CB_PRESERVE
;
635 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level
)
638 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_ISOLATION_OPTION
,nValue
,*this);
639 return (nValue
& static_cast<SQLUINTEGER
>(level
)) == static_cast<SQLUINTEGER
>(level
);
642 bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
645 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
646 return (nValue
& SQL_SU_DML_STATEMENTS
) == SQL_SU_DML_STATEMENTS
;
649 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( )
652 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
653 return static_cast<bool>(nValue
& SQL_SC_SQL92_FULL
);
656 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( )
659 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
660 return static_cast<bool>(nValue
&SQL_SC_SQL92_ENTRY
);
663 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( )
666 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_INTEGRITY
,aStr
,*this,m_pConnection
->getTextEncoding());
667 return aStr
.toChar() == 'Y';
670 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( )
673 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
674 return (nValue
& SQL_SU_INDEX_DEFINITION
) == SQL_SU_INDEX_DEFINITION
;
677 bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
680 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
681 return (nValue
& SQL_SU_TABLE_DEFINITION
) == SQL_SU_TABLE_DEFINITION
;
684 bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
686 SQLUINTEGER nValue
=0;
688 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
689 return (nValue
& SQL_CU_TABLE_DEFINITION
) == SQL_CU_TABLE_DEFINITION
;
692 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( )
694 SQLUINTEGER nValue
=0;
696 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
697 return (nValue
& SQL_CU_INDEX_DEFINITION
) == SQL_CU_INDEX_DEFINITION
;
700 bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
702 SQLUINTEGER nValue
=0;
704 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
705 return (nValue
& SQL_CU_DML_STATEMENTS
) == SQL_CU_DML_STATEMENTS
;
708 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( )
711 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_OJ_CAPABILITIES
,nValue
,*this);
712 return ((nValue
& (SQL_OJ_FULL
|SQL_OJ_LEFT
|SQL_OJ_RIGHT
|SQL_OJ_NESTED
|SQL_OJ_NOT_ORDERED
|SQL_OJ_ALL_COMPARISON_OPS
|SQL_OJ_INNER
)) != 0);
715 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( )
717 Reference
< XResultSet
> xRef
;
720 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
722 pResult
->openTablesTypes();
726 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes
);
731 sal_Int32
ODatabaseMetaData::impl_getMaxStatements_throw( )
734 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CONCURRENT_ACTIVITIES
,nValue
,*this);
738 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( )
741 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_PROCEDURE_NAME_LEN
,nValue
,*this);
745 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( )
748 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_SCHEMA_NAME_LEN
,nValue
,*this);
752 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( )
755 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
756 return nValue
!= SQL_TC_NONE
;
759 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( )
762 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ACCESSIBLE_PROCEDURES
,aValue
,*this,m_pConnection
->getTextEncoding());
763 return aValue
.toChar() == 'Y';
766 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( )
769 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_PROCEDURES
,aValue
,*this,m_pConnection
->getTextEncoding());
770 return aValue
.toChar() == 'Y';
773 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( )
776 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
777 return (nValue
& SQL_CA1_POSITIONED_UPDATE
) == SQL_CA1_POSITIONED_UPDATE
;
780 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( )
783 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ACCESSIBLE_TABLES
,aValue
,*this,m_pConnection
->getTextEncoding());
784 return aValue
.toChar() == 'Y';
787 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( )
789 return m_pConnection
->isReadOnly();
792 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( )
795 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_FILE_USAGE
,nValue
,*this);
796 return nValue
== SQL_FILE_CATALOG
;
799 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( )
802 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_FILE_USAGE
,nValue
,*this);
803 return nValue
== SQL_FILE_TABLE
;
806 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( )
809 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_FUNCTIONS
,nValue
,*this);
810 return (nValue
& SQL_FN_CVT_CONVERT
) == SQL_FN_CVT_CONVERT
;
813 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( )
816 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONCAT_NULL_BEHAVIOR
,nValue
,*this);
817 return nValue
== SQL_CB_NULL
;
820 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( )
823 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_COLUMN_ALIAS
,aValue
,*this,m_pConnection
->getTextEncoding());
824 return aValue
.toChar() == 'Y';
827 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( )
830 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CORRELATION_NAME
,nValue
,*this);
831 return nValue
!= SQL_CN_NONE
;
834 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32 fromType
, sal_Int32 toType
)
836 if(fromType
== toType
)
839 SQLUINTEGER nValue
=0;
843 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BIT
,nValue
,*this);
845 case DataType::TINYINT
:
846 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TINYINT
,nValue
,*this);
848 case DataType::SMALLINT
:
849 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_SMALLINT
,nValue
,*this);
851 case DataType::INTEGER
:
852 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_INTEGER
,nValue
,*this);
854 case DataType::BIGINT
:
855 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BIGINT
,nValue
,*this);
857 case DataType::FLOAT
:
858 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_FLOAT
,nValue
,*this);
861 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_REAL
,nValue
,*this);
863 case DataType::DOUBLE
:
864 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DOUBLE
,nValue
,*this);
866 case DataType::NUMERIC
:
867 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_NUMERIC
,nValue
,*this);
869 case DataType::DECIMAL
:
870 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DECIMAL
,nValue
,*this);
873 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_CHAR
,nValue
,*this);
875 case DataType::VARCHAR
:
876 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_VARCHAR
,nValue
,*this);
878 case DataType::LONGVARCHAR
:
880 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_LONGVARCHAR
,nValue
,*this);
883 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DATE
,nValue
,*this);
886 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TIME
,nValue
,*this);
888 case DataType::TIMESTAMP
:
889 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TIMESTAMP
,nValue
,*this);
891 case DataType::BINARY
:
892 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BINARY
,nValue
,*this);
894 case DataType::VARBINARY
:
895 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_VARBINARY
,nValue
,*this);
897 case DataType::LONGVARBINARY
:
899 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_LONGVARBINARY
,nValue
,*this);
901 case DataType::SQLNULL
:
902 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
904 case DataType::OTHER
:
905 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
907 case DataType::OBJECT
:
908 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
910 case DataType::DISTINCT
:
911 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
913 case DataType::STRUCT
:
914 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
916 case DataType::ARRAY
:
917 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
920 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
923 bool bConvert
= false;
927 bConvert
= (nValue
& SQL_CVT_BIT
) == SQL_CVT_BIT
;
929 case DataType::TINYINT
:
930 bConvert
= (nValue
& SQL_CVT_TINYINT
) == SQL_CVT_TINYINT
;
932 case DataType::SMALLINT
:
933 bConvert
= (nValue
& SQL_CVT_SMALLINT
) == SQL_CVT_SMALLINT
;
935 case DataType::INTEGER
:
936 bConvert
= (nValue
& SQL_CVT_INTEGER
) == SQL_CVT_INTEGER
;
938 case DataType::BIGINT
:
939 bConvert
= (nValue
& SQL_CVT_BIGINT
) == SQL_CVT_BIGINT
;
941 case DataType::FLOAT
:
942 bConvert
= (nValue
& SQL_CVT_FLOAT
) == SQL_CVT_FLOAT
;
945 bConvert
= (nValue
& SQL_CVT_REAL
) == SQL_CVT_REAL
;
947 case DataType::DOUBLE
:
948 bConvert
= (nValue
& SQL_CVT_DOUBLE
) == SQL_CVT_DOUBLE
;
950 case DataType::NUMERIC
:
951 bConvert
= (nValue
& SQL_CVT_NUMERIC
) == SQL_CVT_NUMERIC
;
953 case DataType::DECIMAL
:
954 bConvert
= (nValue
& SQL_CVT_DECIMAL
) == SQL_CVT_DECIMAL
;
957 bConvert
= (nValue
& SQL_CVT_CHAR
) == SQL_CVT_CHAR
;
959 case DataType::VARCHAR
:
960 bConvert
= (nValue
& SQL_CVT_VARCHAR
) == SQL_CVT_VARCHAR
;
962 case DataType::LONGVARCHAR
:
964 bConvert
= (nValue
& SQL_CVT_LONGVARCHAR
) == SQL_CVT_LONGVARCHAR
;
967 bConvert
= (nValue
& SQL_CVT_DATE
) == SQL_CVT_DATE
;
970 bConvert
= (nValue
& SQL_CVT_TIME
) == SQL_CVT_TIME
;
972 case DataType::TIMESTAMP
:
973 bConvert
= (nValue
& SQL_CVT_TIMESTAMP
) == SQL_CVT_TIMESTAMP
;
975 case DataType::BINARY
:
976 bConvert
= (nValue
& SQL_CVT_BINARY
) == SQL_CVT_BINARY
;
978 case DataType::VARBINARY
:
979 bConvert
= (nValue
& SQL_CVT_VARBINARY
) == SQL_CVT_VARBINARY
;
981 case DataType::LONGVARBINARY
:
983 bConvert
= (nValue
& SQL_CVT_LONGVARBINARY
) == SQL_CVT_LONGVARBINARY
;
990 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( )
993 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_EXPRESSIONS_IN_ORDERBY
,aValue
,*this,m_pConnection
->getTextEncoding());
994 return aValue
.toChar() == 'Y';
997 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( )
1000 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1001 return nValue
!= SQL_GB_NOT_SUPPORTED
;
1004 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( )
1006 SQLUSMALLINT nValue
;
1007 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1008 return nValue
!= SQL_GB_GROUP_BY_CONTAINS_SELECT
;
1011 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( )
1013 SQLUSMALLINT nValue
;
1014 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1015 return nValue
== SQL_GB_NO_RELATION
;
1018 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( )
1021 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MULTIPLE_ACTIVE_TXN
,aValue
,*this,m_pConnection
->getTextEncoding());
1022 return aValue
.toChar() == 'Y';
1025 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( )
1028 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MULT_RESULT_SETS
,aValue
,*this,m_pConnection
->getTextEncoding());
1029 return aValue
.toChar() == 'Y';
1032 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( )
1035 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_LIKE_ESCAPE_CLAUSE
,aValue
,*this,m_pConnection
->getTextEncoding());
1036 return aValue
.toChar() == 'Y';
1039 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( )
1042 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ORDER_BY_COLUMNS_IN_SELECT
,aValue
,*this,m_pConnection
->getTextEncoding());
1043 return aValue
.toChar() == 'N';
1046 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( )
1049 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_UNION
,nValue
,*this);
1050 return (nValue
& SQL_U_UNION
) == SQL_U_UNION
;
1053 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( )
1056 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_UNION
,nValue
,*this);
1057 return (nValue
& SQL_U_UNION_ALL
) == SQL_U_UNION_ALL
;
1060 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( )
1062 SQLUSMALLINT nValue
;
1063 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
1064 return nValue
== SQL_IC_MIXED
;
1067 bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
1069 SQLUSMALLINT nValue
;
1070 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
1071 return nValue
== SQL_IC_MIXED
;
1074 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( )
1076 SQLUSMALLINT nValue
;
1077 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1078 return nValue
== SQL_NC_END
;
1081 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( )
1083 SQLUSMALLINT nValue
;
1084 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1085 return nValue
== SQL_NC_START
;
1088 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( )
1090 SQLUSMALLINT nValue
;
1091 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1092 return nValue
== SQL_NC_HIGH
;
1095 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( )
1097 SQLUSMALLINT nValue
;
1098 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1099 return nValue
== SQL_NC_LOW
;
1102 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( )
1105 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
1106 return (nValue
& SQL_SU_PROCEDURE_INVOCATION
) == SQL_SU_PROCEDURE_INVOCATION
;
1109 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( )
1112 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
1113 return (nValue
& SQL_SU_PRIVILEGE_DEFINITION
) == SQL_SU_PRIVILEGE_DEFINITION
;
1116 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( )
1118 SQLUINTEGER nValue
=0;
1120 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
1121 return (nValue
& SQL_CU_PROCEDURE_INVOCATION
) == SQL_CU_PROCEDURE_INVOCATION
;
1124 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( )
1126 SQLUINTEGER nValue
=0;
1128 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
1129 return (nValue
& SQL_CU_PRIVILEGE_DEFINITION
) == SQL_CU_PRIVILEGE_DEFINITION
;
1132 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( )
1135 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1136 return (nValue
& SQL_SQ_CORRELATED_SUBQUERIES
) == SQL_SQ_CORRELATED_SUBQUERIES
;
1139 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( )
1142 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1143 return (nValue
& SQL_SQ_COMPARISON
) == SQL_SQ_COMPARISON
;
1146 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( )
1149 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1150 return (nValue
& SQL_SQ_EXISTS
) == SQL_SQ_EXISTS
;
1153 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( )
1156 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1157 return (nValue
& SQL_SQ_IN
) == SQL_SQ_IN
;
1160 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( )
1163 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1164 return (nValue
& SQL_SQ_QUANTIFIED
) == SQL_SQ_QUANTIFIED
;
1167 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( )
1170 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
1171 return static_cast<bool>(nValue
& SQL_SC_SQL92_INTERMEDIATE
);
1174 OUString
ODatabaseMetaData::getURLImpl()
1177 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DATA_SOURCE_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1181 OUString SAL_CALL
ODatabaseMetaData::getURL( )
1183 OUString aValue
= m_pConnection
->getURL();
1184 if ( aValue
.isEmpty() )
1186 aValue
= "sdbc:odbc:" + getURLImpl();
1191 OUString SAL_CALL
ODatabaseMetaData::getUserName( )
1194 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_USER_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1198 OUString SAL_CALL
ODatabaseMetaData::getDriverName( )
1201 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1205 OUString SAL_CALL
ODatabaseMetaData::getDriverVersion()
1208 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_ODBC_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1212 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( )
1215 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1219 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( )
1222 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DBMS_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1226 OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( )
1229 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_PROCEDURE_TERM
,aValue
,*this,m_pConnection
->getTextEncoding());
1233 OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( )
1236 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_TERM
,aValue
,*this,m_pConnection
->getTextEncoding());
1240 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) try
1243 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1244 return aValue
.copy(0,aValue
.indexOf('.')).toInt32();
1246 catch (const SQLException
&)
1251 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( )
1254 sal_Int32 nValueTranslated
;
1255 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DEFAULT_TXN_ISOLATION
,nValue
,*this);
1258 case SQL_TXN_READ_UNCOMMITTED
:
1259 nValueTranslated
= css::sdbc::TransactionIsolation::READ_UNCOMMITTED
;
1261 case SQL_TXN_READ_COMMITTED
:
1262 nValueTranslated
= css::sdbc::TransactionIsolation::READ_COMMITTED
;
1264 case SQL_TXN_REPEATABLE_READ
:
1265 nValueTranslated
= css::sdbc::TransactionIsolation::REPEATABLE_READ
;
1267 case SQL_TXN_SERIALIZABLE
:
1268 nValueTranslated
= css::sdbc::TransactionIsolation::SERIALIZABLE
;
1271 nValueTranslated
= 0;
1273 return nValueTranslated
;
1276 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) try
1279 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1280 return aValue
.copy(0,aValue
.lastIndexOf('.')).toInt32();
1282 catch (const SQLException
&)
1287 OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( )
1290 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_KEYWORDS
,aValue
,*this,m_pConnection
->getTextEncoding());
1294 OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( )
1297 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SEARCH_PATTERN_ESCAPE
,aValue
,*this,m_pConnection
->getTextEncoding());
1301 OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( )
1304 OUStringBuffer aValue
;
1305 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_STRING_FUNCTIONS
,nValue
,*this);
1306 if(nValue
& SQL_FN_STR_ASCII
)
1307 aValue
.append("ASCII,");
1308 if(nValue
& SQL_FN_STR_BIT_LENGTH
)
1309 aValue
.append("BIT_LENGTH,");
1310 if(nValue
& SQL_FN_STR_CHAR
)
1311 aValue
.append("CHAR,");
1312 if(nValue
& SQL_FN_STR_CHAR_LENGTH
)
1313 aValue
.append("CHAR_LENGTH,");
1314 if(nValue
& SQL_FN_STR_CHARACTER_LENGTH
)
1315 aValue
.append("CHARACTER_LENGTH,");
1316 if(nValue
& SQL_FN_STR_CONCAT
)
1317 aValue
.append("CONCAT,");
1318 if(nValue
& SQL_FN_STR_DIFFERENCE
)
1319 aValue
.append("DIFFERENCE,");
1320 if(nValue
& SQL_FN_STR_INSERT
)
1321 aValue
.append("INSERT,");
1322 if(nValue
& SQL_FN_STR_LCASE
)
1323 aValue
.append("LCASE,");
1324 if(nValue
& SQL_FN_STR_LEFT
)
1325 aValue
.append("LEFT,");
1326 if(nValue
& SQL_FN_STR_LENGTH
)
1327 aValue
.append("LENGTH,");
1328 if(nValue
& SQL_FN_STR_LOCATE
)
1329 aValue
.append("LOCATE,");
1330 if(nValue
& SQL_FN_STR_LOCATE_2
)
1331 aValue
.append("LOCATE_2,");
1332 if(nValue
& SQL_FN_STR_LTRIM
)
1333 aValue
.append("LTRIM,");
1334 if(nValue
& SQL_FN_STR_OCTET_LENGTH
)
1335 aValue
.append("OCTET_LENGTH,");
1336 if(nValue
& SQL_FN_STR_POSITION
)
1337 aValue
.append("POSITION,");
1338 if(nValue
& SQL_FN_STR_REPEAT
)
1339 aValue
.append("REPEAT,");
1340 if(nValue
& SQL_FN_STR_REPLACE
)
1341 aValue
.append("REPLACE,");
1342 if(nValue
& SQL_FN_STR_RIGHT
)
1343 aValue
.append("RIGHT,");
1344 if(nValue
& SQL_FN_STR_RTRIM
)
1345 aValue
.append("RTRIM,");
1346 if(nValue
& SQL_FN_STR_SOUNDEX
)
1347 aValue
.append("SOUNDEX,");
1348 if(nValue
& SQL_FN_STR_SPACE
)
1349 aValue
.append("SPACE,");
1350 if(nValue
& SQL_FN_STR_SUBSTRING
)
1351 aValue
.append("SUBSTRING,");
1352 if(nValue
& SQL_FN_STR_UCASE
)
1353 aValue
.append("UCASE,");
1356 if ( !aValue
.isEmpty() )
1357 aValue
.setLength(aValue
.getLength()-1);
1359 return aValue
.makeStringAndClear();
1362 OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( )
1365 OUStringBuffer aValue
;
1366 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TIMEDATE_FUNCTIONS
,nValue
,*this);
1368 if(nValue
& SQL_FN_TD_CURRENT_DATE
)
1369 aValue
.append("CURRENT_DATE,");
1370 if(nValue
& SQL_FN_TD_CURRENT_TIME
)
1371 aValue
.append("CURRENT_TIME,");
1372 if(nValue
& SQL_FN_TD_CURRENT_TIMESTAMP
)
1373 aValue
.append("CURRENT_TIMESTAMP,");
1374 if(nValue
& SQL_FN_TD_CURDATE
)
1375 aValue
.append("CURDATE,");
1376 if(nValue
& SQL_FN_TD_CURTIME
)
1377 aValue
.append("CURTIME,");
1378 if(nValue
& SQL_FN_TD_DAYNAME
)
1379 aValue
.append("DAYNAME,");
1380 if(nValue
& SQL_FN_TD_DAYOFMONTH
)
1381 aValue
.append("DAYOFMONTH,");
1382 if(nValue
& SQL_FN_TD_DAYOFWEEK
)
1383 aValue
.append("DAYOFWEEK,");
1384 if(nValue
& SQL_FN_TD_DAYOFYEAR
)
1385 aValue
.append("DAYOFYEAR,");
1386 if(nValue
& SQL_FN_TD_EXTRACT
)
1387 aValue
.append("EXTRACT,");
1388 if(nValue
& SQL_FN_TD_HOUR
)
1389 aValue
.append("HOUR,");
1390 if(nValue
& SQL_FN_TD_MINUTE
)
1391 aValue
.append("MINUTE,");
1392 if(nValue
& SQL_FN_TD_MONTH
)
1393 aValue
.append("MONTH,");
1394 if(nValue
& SQL_FN_TD_MONTHNAME
)
1395 aValue
.append("MONTHNAME,");
1396 if(nValue
& SQL_FN_TD_NOW
)
1397 aValue
.append("NOW,");
1398 if(nValue
& SQL_FN_TD_QUARTER
)
1399 aValue
.append("QUARTER,");
1400 if(nValue
& SQL_FN_TD_SECOND
)
1401 aValue
.append("SECOND,");
1402 if(nValue
& SQL_FN_TD_TIMESTAMPADD
)
1403 aValue
.append("TIMESTAMPADD,");
1404 if(nValue
& SQL_FN_TD_TIMESTAMPDIFF
)
1405 aValue
.append("TIMESTAMPDIFF,");
1406 if(nValue
& SQL_FN_TD_WEEK
)
1407 aValue
.append("WEEK,");
1408 if(nValue
& SQL_FN_TD_YEAR
)
1409 aValue
.append("YEAR,");
1411 if ( !aValue
.isEmpty() )
1412 aValue
.setLength(aValue
.getLength()-1);
1414 return aValue
.makeStringAndClear();
1417 OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( )
1420 OUStringBuffer aValue
;
1421 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SYSTEM_FUNCTIONS
,nValue
,*this);
1423 if(nValue
& SQL_FN_SYS_DBNAME
)
1424 aValue
.append("DBNAME,");
1425 if(nValue
& SQL_FN_SYS_IFNULL
)
1426 aValue
.append("IFNULL,");
1427 if(nValue
& SQL_FN_SYS_USERNAME
)
1428 aValue
.append("USERNAME,");
1430 if ( !aValue
.isEmpty() )
1431 aValue
.setLength(aValue
.getLength()-1);
1433 return aValue
.makeStringAndClear();
1436 OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( )
1439 OUStringBuffer aValue
;
1440 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NUMERIC_FUNCTIONS
,nValue
,*this);
1442 if(nValue
& SQL_FN_NUM_ABS
)
1443 aValue
.append("ABS,");
1444 if(nValue
& SQL_FN_NUM_ACOS
)
1445 aValue
.append("ACOS,");
1446 if(nValue
& SQL_FN_NUM_ASIN
)
1447 aValue
.append("ASIN,");
1448 if(nValue
& SQL_FN_NUM_ATAN
)
1449 aValue
.append("ATAN,");
1450 if(nValue
& SQL_FN_NUM_ATAN2
)
1451 aValue
.append("ATAN2,");
1452 if(nValue
& SQL_FN_NUM_CEILING
)
1453 aValue
.append("CEILING,");
1454 if(nValue
& SQL_FN_NUM_COS
)
1455 aValue
.append("COS,");
1456 if(nValue
& SQL_FN_NUM_COT
)
1457 aValue
.append("COT,");
1458 if(nValue
& SQL_FN_NUM_DEGREES
)
1459 aValue
.append("DEGREES,");
1460 if(nValue
& SQL_FN_NUM_EXP
)
1461 aValue
.append("EXP,");
1462 if(nValue
& SQL_FN_NUM_FLOOR
)
1463 aValue
.append("FLOOR,");
1464 if(nValue
& SQL_FN_NUM_LOG
)
1465 aValue
.append("LOGF,");
1466 if(nValue
& SQL_FN_NUM_LOG10
)
1467 aValue
.append("LOG10,");
1468 if(nValue
& SQL_FN_NUM_MOD
)
1469 aValue
.append("MOD,");
1470 if(nValue
& SQL_FN_NUM_PI
)
1471 aValue
.append("PI,");
1472 if(nValue
& SQL_FN_NUM_POWER
)
1473 aValue
.append("POWER,");
1474 if(nValue
& SQL_FN_NUM_RADIANS
)
1475 aValue
.append("RADIANS,");
1476 if(nValue
& SQL_FN_NUM_RAND
)
1477 aValue
.append("RAND,");
1478 if(nValue
& SQL_FN_NUM_ROUND
)
1479 aValue
.append("ROUND,");
1480 if(nValue
& SQL_FN_NUM_SIGN
)
1481 aValue
.append("SIGN,");
1482 if(nValue
& SQL_FN_NUM_SIN
)
1483 aValue
.append("SIN,");
1484 if(nValue
& SQL_FN_NUM_SQRT
)
1485 aValue
.append("SQRT,");
1486 if(nValue
& SQL_FN_NUM_TAN
)
1487 aValue
.append("TAN,");
1488 if(nValue
& SQL_FN_NUM_TRUNCATE
)
1489 aValue
.append("TRUNCATE,");
1491 if ( !aValue
.isEmpty() )
1492 aValue
.setLength(aValue
.getLength()-1);
1494 return aValue
.makeStringAndClear();
1497 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( )
1500 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1501 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1502 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1503 "connectivity.odbc",
1504 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1505 return nValue
== SQL_OSC_EXTENDED
;
1508 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( )
1511 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1512 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1513 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1514 "connectivity.odbc",
1515 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1516 return nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
;
1519 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( )
1522 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1523 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1524 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1525 "connectivity.odbc",
1526 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1527 return nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
;
1530 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( )
1533 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_OJ_CAPABILITIES
,nValue
,*this);
1534 return (nValue
& SQL_OJ_FULL
) == SQL_OJ_FULL
;
1537 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( )
1539 return supportsFullOuterJoins( );
1542 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( )
1544 SQLUSMALLINT nValue
;
1545 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_GROUP_BY
,nValue
,*this);
1549 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( )
1551 SQLUSMALLINT nValue
;
1552 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_ORDER_BY
,nValue
,*this);
1556 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( )
1558 SQLUSMALLINT nValue
;
1559 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_SELECT
,nValue
,*this);
1563 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( )
1565 SQLUSMALLINT nValue
;
1566 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_USER_NAME_LEN
,nValue
,*this);
1570 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
)
1573 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_SENSITIVITY
,nValue
,*this);
1574 return (nValue
& static_cast<SQLUINTEGER
>(setType
)) == static_cast<SQLUINTEGER
>(setType
);
1577 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32 concurrency
)
1580 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1584 case ResultSetType::FORWARD_ONLY
:
1585 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1587 case ResultSetType::SCROLL_INSENSITIVE
:
1588 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1590 case ResultSetType::SCROLL_SENSITIVE
:
1591 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1595 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1599 case ResultSetConcurrency::READ_ONLY
:
1600 bRet
= (nValue
& SQL_CA2_READ_ONLY_CONCURRENCY
) == SQL_CA2_READ_ONLY_CONCURRENCY
;
1602 case ResultSetConcurrency::UPDATABLE
:
1603 bRet
= (nValue
& SQL_CA2_OPT_VALUES_CONCURRENCY
) == SQL_CA2_OPT_VALUES_CONCURRENCY
;
1609 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType
)
1612 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1616 case ResultSetType::FORWARD_ONLY
:
1617 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1619 case ResultSetType::SCROLL_INSENSITIVE
:
1620 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1622 case ResultSetType::SCROLL_SENSITIVE
:
1623 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1627 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1628 return (nValue
& SQL_CA2_SENSITIVITY_UPDATES
) == SQL_CA2_SENSITIVITY_UPDATES
;
1631 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType
)
1634 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1638 case ResultSetType::FORWARD_ONLY
:
1639 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1641 case ResultSetType::SCROLL_INSENSITIVE
:
1642 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1644 case ResultSetType::SCROLL_SENSITIVE
:
1645 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1649 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1650 return (nValue
& SQL_CA2_SENSITIVITY_DELETIONS
) != SQL_CA2_SENSITIVITY_DELETIONS
;
1653 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType
)
1656 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1660 case ResultSetType::FORWARD_ONLY
:
1661 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1663 case ResultSetType::SCROLL_INSENSITIVE
:
1664 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1666 case ResultSetType::SCROLL_SENSITIVE
:
1667 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1671 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1672 return (nValue
& SQL_CA2_SENSITIVITY_ADDITIONS
) == SQL_CA2_SENSITIVITY_ADDITIONS
;
1675 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType
)
1677 return ownUpdatesAreVisible(setType
);
1680 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType
)
1682 return ownDeletesAreVisible(setType
);
1685 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType
)
1687 return ownInsertsAreVisible(setType
);
1690 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32
/*setType*/ )
1695 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32
/*setType*/ )
1700 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32
/*setType*/ )
1705 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( )
1710 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getUDTs( const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*typeNamePattern*/, const Sequence
< sal_Int32
>& /*types*/ )
1716 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */