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 <connectivity/odbc.hxx>
29 #include <TPrivilegesResultSet.hxx>
30 #include <connectivity/dbexception.hxx>
31 #include <rtl/ustrbuf.hxx>
32 #include <sal/log.hxx>
34 using namespace connectivity::odbc
;
35 using namespace com::sun::star::uno
;
36 using namespace com::sun::star::lang
;
37 using namespace com::sun::star::beans
;
38 using namespace com::sun::star::sdbc
;
40 ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle
,OConnection
* _pCon
)
41 : ::connectivity::ODatabaseMetaDataBase(_pCon
,_pCon
->getConnectionInfo())
42 ,m_aConnectionHandle(_pHandle
)
46 OSL_ENSURE(m_pConnection
,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
47 if(!m_pConnection
->isCatalogUsed())
49 osl_atomic_increment( &m_refCount
);
52 m_bUseCatalog
= !(usesLocalFiles() || usesLocalFilePerTable());
55 { // doesn't matter here
57 osl_atomic_decrement( &m_refCount
);
61 ODatabaseMetaData::~ODatabaseMetaData()
65 Reference
< XResultSet
> ODatabaseMetaData::impl_getTypeInfo_throw( )
67 Reference
< XResultSet
> xRef
;
70 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
72 pResult
->openTypeInfo();
76 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo
);
82 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCatalogs( )
84 Reference
< XResultSet
> xRef
;
87 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs
);
93 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
95 pResult
->openCatalogs();
99 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs
);
106 OUString
ODatabaseMetaData::impl_getCatalogSeparator_throw( )
110 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_NAME_SEPARATOR
,aVal
,*this,m_pConnection
->getTextEncoding());
115 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getSchemas( )
117 Reference
< XResultSet
> xRef
;
120 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
122 pResult
->openSchemas();
126 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eSchemas
);
131 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumnPrivileges(
132 const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
133 const OUString
& columnNamePattern
)
135 Reference
< XResultSet
> xRef
;
138 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
140 pResult
->openColumnPrivileges(m_bUseCatalog
? catalog
: Any(),schema
,table
,columnNamePattern
);
144 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumnPrivileges
);
149 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
150 const Any
& catalog
, const OUString
& schemaPattern
, const OUString
& tableNamePattern
,
151 const OUString
& columnNamePattern
)
153 Reference
< XResultSet
> xRef
;
156 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
158 pResult
->openColumns(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
,columnNamePattern
);
162 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns
);
167 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
168 const Any
& catalog
, const OUString
& schemaPattern
,
169 const OUString
& tableNamePattern
, const Sequence
< OUString
>& types
)
171 Reference
< XResultSet
> xRef
;
174 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
176 pResult
->openTables(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
,types
);
180 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTables
);
185 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedureColumns(
186 const Any
& catalog
, const OUString
& schemaPattern
,
187 const OUString
& procedureNamePattern
, const OUString
& columnNamePattern
)
189 Reference
< XResultSet
> xRef
;
192 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
194 pResult
->openProcedureColumns(m_bUseCatalog
? catalog
: Any(),schemaPattern
,procedureNamePattern
,columnNamePattern
);
198 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedureColumns
);
203 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedures(
204 const Any
& catalog
, const OUString
& schemaPattern
,
205 const OUString
& procedureNamePattern
)
207 Reference
< XResultSet
> xRef
;
210 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
212 pResult
->openProcedures(m_bUseCatalog
? catalog
: Any(),schemaPattern
,procedureNamePattern
);
216 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedures
);
221 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getVersionColumns(
222 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
224 Reference
< XResultSet
> xRef
;
225 bool bSuccess
= false;
228 if ( !m_pConnection
->preventGetVersionColumns() )
230 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
232 pResult
->openVersionColumns(m_bUseCatalog
? catalog
: Any(),schema
,table
);
242 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns
);
248 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( )
251 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_BINARY_LITERAL_LEN
,nValue
,*this);
255 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( )
258 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_ROW_SIZE
,nValue
,*this);
262 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( )
265 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CATALOG_NAME_LEN
,nValue
,*this);
269 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( )
272 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CHAR_LITERAL_LEN
,nValue
,*this);
276 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( )
279 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMN_NAME_LEN
,nValue
,*this);
283 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( )
286 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_INDEX
,nValue
,*this);
290 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( )
293 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CURSOR_NAME_LEN
,nValue
,*this);
297 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( )
300 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_DRIVER_CONNECTIONS
/*SQL_ACTIVE_CONNECTIONS*/,nValue
,*this);
304 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( )
307 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_TABLE
,nValue
,*this);
311 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( )
314 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_STATEMENT_LEN
,nValue
,*this);
318 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( )
321 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_TABLE_NAME_LEN
,nValue
,*this);
325 sal_Int32
ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
328 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_TABLES_IN_SELECT
,nValue
,*this);
332 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getExportedKeys(
333 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
335 Reference
< XResultSet
> xRef
;
338 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
340 pResult
->openExportedKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
344 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eExportedKeys
);
349 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getImportedKeys(
350 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
352 Reference
< XResultSet
> xRef
;
355 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
357 pResult
->openImportedKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
361 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eImportedKeys
);
366 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getPrimaryKeys(
367 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
369 Reference
< XResultSet
> xRef
;
372 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
374 pResult
->openPrimaryKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
378 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::ePrimaryKeys
);
383 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getIndexInfo(
384 const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
385 sal_Bool unique
, sal_Bool approximate
)
387 Reference
< XResultSet
> xRef
;
390 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
392 pResult
->openIndexInfo(m_bUseCatalog
? catalog
: Any(),schema
,table
,unique
,approximate
);
396 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo
);
401 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getBestRowIdentifier(
402 const Any
& catalog
, const OUString
& schema
, const OUString
& table
, sal_Int32 scope
,
405 Reference
< XResultSet
> xRef
;
408 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
410 pResult
->openBestRowIdentifier(m_bUseCatalog
? catalog
: Any(),schema
,table
,scope
,nullable
);
414 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eBestRowIdentifier
);
419 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
420 const Any
& catalog
, const OUString
& schemaPattern
, const OUString
& tableNamePattern
)
422 if ( m_pConnection
->isIgnoreDriverPrivilegesEnabled() )
424 return new OResultSetPrivileges(this,catalog
,schemaPattern
,tableNamePattern
);
426 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
427 Reference
< XResultSet
> xRef
= pResult
;
428 pResult
->openTablePrivileges(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
);
432 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCrossReference(
433 const Any
& primaryCatalog
, const OUString
& primarySchema
,
434 const OUString
& primaryTable
, const Any
& foreignCatalog
,
435 const OUString
& foreignSchema
, const OUString
& foreignTable
)
437 Reference
< XResultSet
> xRef
;
440 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
442 pResult
->openForeignKeys(m_bUseCatalog
? primaryCatalog
: Any(),primarySchema
.toChar() == '%' ? &primarySchema
: nullptr,&primaryTable
,
443 m_bUseCatalog
? foreignCatalog
: Any(), foreignSchema
.toChar() == '%' ? &foreignSchema
: nullptr,&foreignTable
);
447 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCrossReference
);
452 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( )
455 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_ROW_SIZE_INCLUDES_LONG
,aVal
,*this,m_pConnection
->getTextEncoding());
456 return aVal
.toChar() == 'Y';
459 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( )
462 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
463 return nValue
== SQL_IC_LOWER
;
466 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( )
469 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
470 return nValue
== SQL_IC_LOWER
;
473 bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
476 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
477 return nValue
== SQL_IC_MIXED
;
480 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( )
483 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
484 return nValue
== SQL_IC_MIXED
;
487 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( )
490 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
491 return nValue
== SQL_IC_UPPER
;
494 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( )
497 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
498 return nValue
== SQL_IC_UPPER
;
501 bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
504 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ALTER_TABLE
,nValue
,*this);
505 return (nValue
& SQL_AT_ADD_COLUMN
) == SQL_AT_ADD_COLUMN
;
508 bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
511 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ALTER_TABLE
,nValue
,*this);
512 return ((nValue
& SQL_AT_DROP_COLUMN
) == SQL_AT_DROP_COLUMN
) ||
513 ((nValue
& SQL_AT_DROP_COLUMN_CASCADE
) == SQL_AT_DROP_COLUMN_CASCADE
) ||
514 ((nValue
& SQL_AT_DROP_COLUMN_RESTRICT
) == SQL_AT_DROP_COLUMN_RESTRICT
);
517 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( )
520 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_INDEX_SIZE
,nValue
,*this);
524 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( )
527 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NON_NULLABLE_COLUMNS
,nValue
,*this);
528 return nValue
== SQL_NNC_NON_NULL
;
531 OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( )
535 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_TERM
,aVal
,*this,m_pConnection
->getTextEncoding());
539 OUString
ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
542 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_QUOTE_CHAR
,aVal
,*this,m_pConnection
->getTextEncoding());
546 OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( )
549 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SPECIAL_CHARACTERS
,aVal
,*this,m_pConnection
->getTextEncoding());
553 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( )
556 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CORRELATION_NAME
,nValue
,*this);
557 return nValue
!= SQL_CN_NONE
;
560 bool ODatabaseMetaData::impl_isCatalogAtStart_throw( )
562 SQLUSMALLINT nValue
=0;
564 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_LOCATION
,nValue
,*this);
565 return nValue
== SQL_CL_START
;
568 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( )
571 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
572 return nValue
== SQL_TC_DDL_IGNORE
;
575 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( )
578 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
579 return nValue
== SQL_TC_DDL_COMMIT
;
582 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( )
585 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
586 return nValue
== SQL_TC_DML
;
589 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( )
592 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
593 return nValue
== SQL_TC_ALL
;
596 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( )
599 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
600 return (nValue
& SQL_CA1_POS_DELETE
) == SQL_CA1_POS_DELETE
;
603 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( )
606 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
607 return (nValue
& SQL_CA1_POS_UPDATE
) == SQL_CA1_POS_UPDATE
;
610 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( )
613 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_ROLLBACK_BEHAVIOR
,nValue
,*this);
614 return nValue
== SQL_CB_PRESERVE
|| nValue
== SQL_CB_CLOSE
;
617 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( )
620 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_COMMIT_BEHAVIOR
,nValue
,*this);
621 return nValue
== SQL_CB_PRESERVE
|| nValue
== SQL_CB_CLOSE
;
624 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( )
627 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_COMMIT_BEHAVIOR
,nValue
,*this);
628 return nValue
== SQL_CB_PRESERVE
;
631 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( )
634 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_ROLLBACK_BEHAVIOR
,nValue
,*this);
635 return nValue
== SQL_CB_PRESERVE
;
638 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level
)
641 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_ISOLATION_OPTION
,nValue
,*this);
642 return (nValue
& static_cast<SQLUINTEGER
>(level
)) == static_cast<SQLUINTEGER
>(level
);
645 bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
648 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
649 return (nValue
& SQL_SU_DML_STATEMENTS
) == SQL_SU_DML_STATEMENTS
;
652 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( )
655 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
656 return static_cast<bool>(nValue
& SQL_SC_SQL92_FULL
);
659 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( )
662 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
663 return static_cast<bool>(nValue
&SQL_SC_SQL92_ENTRY
);
666 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( )
669 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_INTEGRITY
,aStr
,*this,m_pConnection
->getTextEncoding());
670 return aStr
.toChar() == 'Y';
673 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( )
676 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
677 return (nValue
& SQL_SU_INDEX_DEFINITION
) == SQL_SU_INDEX_DEFINITION
;
680 bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
683 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
684 return (nValue
& SQL_SU_TABLE_DEFINITION
) == SQL_SU_TABLE_DEFINITION
;
687 bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
689 SQLUINTEGER nValue
=0;
691 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
692 return (nValue
& SQL_CU_TABLE_DEFINITION
) == SQL_CU_TABLE_DEFINITION
;
695 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( )
697 SQLUINTEGER nValue
=0;
699 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
700 return (nValue
& SQL_CU_INDEX_DEFINITION
) == SQL_CU_INDEX_DEFINITION
;
703 bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
705 SQLUINTEGER nValue
=0;
707 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
708 return (nValue
& SQL_CU_DML_STATEMENTS
) == SQL_CU_DML_STATEMENTS
;
711 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( )
714 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_OJ_CAPABILITIES
,nValue
,*this);
715 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);
718 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( )
720 Reference
< XResultSet
> xRef
;
723 ODatabaseMetaDataResultSet
* pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
725 pResult
->openTablesTypes();
729 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes
);
734 sal_Int32
ODatabaseMetaData::impl_getMaxStatements_throw( )
737 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CONCURRENT_ACTIVITIES
,nValue
,*this);
741 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( )
744 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_PROCEDURE_NAME_LEN
,nValue
,*this);
748 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( )
751 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_SCHEMA_NAME_LEN
,nValue
,*this);
755 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( )
758 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
759 return nValue
!= SQL_TC_NONE
;
762 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( )
765 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ACCESSIBLE_PROCEDURES
,aValue
,*this,m_pConnection
->getTextEncoding());
766 return aValue
.toChar() == 'Y';
769 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( )
772 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_PROCEDURES
,aValue
,*this,m_pConnection
->getTextEncoding());
773 return aValue
.toChar() == 'Y';
776 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( )
779 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
780 return (nValue
& SQL_CA1_POSITIONED_UPDATE
) == SQL_CA1_POSITIONED_UPDATE
;
783 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( )
786 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ACCESSIBLE_TABLES
,aValue
,*this,m_pConnection
->getTextEncoding());
787 return aValue
.toChar() == 'Y';
790 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( )
792 return m_pConnection
->isReadOnly();
795 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( )
798 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_FILE_USAGE
,nValue
,*this);
799 return nValue
== SQL_FILE_CATALOG
;
802 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( )
805 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_FILE_USAGE
,nValue
,*this);
806 return nValue
== SQL_FILE_TABLE
;
809 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( )
812 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_FUNCTIONS
,nValue
,*this);
813 return (nValue
& SQL_FN_CVT_CONVERT
) == SQL_FN_CVT_CONVERT
;
816 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( )
819 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONCAT_NULL_BEHAVIOR
,nValue
,*this);
820 return nValue
== SQL_CB_NULL
;
823 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( )
826 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_COLUMN_ALIAS
,aValue
,*this,m_pConnection
->getTextEncoding());
827 return aValue
.toChar() == 'Y';
830 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( )
833 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CORRELATION_NAME
,nValue
,*this);
834 return nValue
!= SQL_CN_NONE
;
837 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32 fromType
, sal_Int32 toType
)
839 if(fromType
== toType
)
842 SQLUINTEGER nValue
=0;
846 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BIT
,nValue
,*this);
848 case DataType::TINYINT
:
849 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TINYINT
,nValue
,*this);
851 case DataType::SMALLINT
:
852 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_SMALLINT
,nValue
,*this);
854 case DataType::INTEGER
:
855 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_INTEGER
,nValue
,*this);
857 case DataType::BIGINT
:
858 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BIGINT
,nValue
,*this);
860 case DataType::FLOAT
:
861 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_FLOAT
,nValue
,*this);
864 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_REAL
,nValue
,*this);
866 case DataType::DOUBLE
:
867 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DOUBLE
,nValue
,*this);
869 case DataType::NUMERIC
:
870 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_NUMERIC
,nValue
,*this);
872 case DataType::DECIMAL
:
873 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DECIMAL
,nValue
,*this);
876 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_CHAR
,nValue
,*this);
878 case DataType::VARCHAR
:
879 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_VARCHAR
,nValue
,*this);
881 case DataType::LONGVARCHAR
:
883 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_LONGVARCHAR
,nValue
,*this);
886 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DATE
,nValue
,*this);
889 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TIME
,nValue
,*this);
891 case DataType::TIMESTAMP
:
892 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TIMESTAMP
,nValue
,*this);
894 case DataType::BINARY
:
895 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BINARY
,nValue
,*this);
897 case DataType::VARBINARY
:
898 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_VARBINARY
,nValue
,*this);
900 case DataType::LONGVARBINARY
:
902 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_LONGVARBINARY
,nValue
,*this);
904 case DataType::SQLNULL
:
905 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
907 case DataType::OTHER
:
908 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
910 case DataType::OBJECT
:
911 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
913 case DataType::DISTINCT
:
914 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
916 case DataType::STRUCT
:
917 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
919 case DataType::ARRAY
:
920 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
923 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
926 bool bConvert
= false;
930 bConvert
= (nValue
& SQL_CVT_BIT
) == SQL_CVT_BIT
;
932 case DataType::TINYINT
:
933 bConvert
= (nValue
& SQL_CVT_TINYINT
) == SQL_CVT_TINYINT
;
935 case DataType::SMALLINT
:
936 bConvert
= (nValue
& SQL_CVT_SMALLINT
) == SQL_CVT_SMALLINT
;
938 case DataType::INTEGER
:
939 bConvert
= (nValue
& SQL_CVT_INTEGER
) == SQL_CVT_INTEGER
;
941 case DataType::BIGINT
:
942 bConvert
= (nValue
& SQL_CVT_BIGINT
) == SQL_CVT_BIGINT
;
944 case DataType::FLOAT
:
945 bConvert
= (nValue
& SQL_CVT_FLOAT
) == SQL_CVT_FLOAT
;
948 bConvert
= (nValue
& SQL_CVT_REAL
) == SQL_CVT_REAL
;
950 case DataType::DOUBLE
:
951 bConvert
= (nValue
& SQL_CVT_DOUBLE
) == SQL_CVT_DOUBLE
;
953 case DataType::NUMERIC
:
954 bConvert
= (nValue
& SQL_CVT_NUMERIC
) == SQL_CVT_NUMERIC
;
956 case DataType::DECIMAL
:
957 bConvert
= (nValue
& SQL_CVT_DECIMAL
) == SQL_CVT_DECIMAL
;
960 bConvert
= (nValue
& SQL_CVT_CHAR
) == SQL_CVT_CHAR
;
962 case DataType::VARCHAR
:
963 bConvert
= (nValue
& SQL_CVT_VARCHAR
) == SQL_CVT_VARCHAR
;
965 case DataType::LONGVARCHAR
:
967 bConvert
= (nValue
& SQL_CVT_LONGVARCHAR
) == SQL_CVT_LONGVARCHAR
;
970 bConvert
= (nValue
& SQL_CVT_DATE
) == SQL_CVT_DATE
;
973 bConvert
= (nValue
& SQL_CVT_TIME
) == SQL_CVT_TIME
;
975 case DataType::TIMESTAMP
:
976 bConvert
= (nValue
& SQL_CVT_TIMESTAMP
) == SQL_CVT_TIMESTAMP
;
978 case DataType::BINARY
:
979 bConvert
= (nValue
& SQL_CVT_BINARY
) == SQL_CVT_BINARY
;
981 case DataType::VARBINARY
:
982 bConvert
= (nValue
& SQL_CVT_VARBINARY
) == SQL_CVT_VARBINARY
;
984 case DataType::LONGVARBINARY
:
986 bConvert
= (nValue
& SQL_CVT_LONGVARBINARY
) == SQL_CVT_LONGVARBINARY
;
993 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( )
996 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_EXPRESSIONS_IN_ORDERBY
,aValue
,*this,m_pConnection
->getTextEncoding());
997 return aValue
.toChar() == 'Y';
1000 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( )
1002 SQLUSMALLINT nValue
;
1003 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1004 return nValue
!= SQL_GB_NOT_SUPPORTED
;
1007 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( )
1009 SQLUSMALLINT nValue
;
1010 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1011 return nValue
!= SQL_GB_GROUP_BY_CONTAINS_SELECT
;
1014 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( )
1016 SQLUSMALLINT nValue
;
1017 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1018 return nValue
== SQL_GB_NO_RELATION
;
1021 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( )
1024 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MULTIPLE_ACTIVE_TXN
,aValue
,*this,m_pConnection
->getTextEncoding());
1025 return aValue
.toChar() == 'Y';
1028 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( )
1031 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MULT_RESULT_SETS
,aValue
,*this,m_pConnection
->getTextEncoding());
1032 return aValue
.toChar() == 'Y';
1035 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( )
1038 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_LIKE_ESCAPE_CLAUSE
,aValue
,*this,m_pConnection
->getTextEncoding());
1039 return aValue
.toChar() == 'Y';
1042 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( )
1045 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ORDER_BY_COLUMNS_IN_SELECT
,aValue
,*this,m_pConnection
->getTextEncoding());
1046 return aValue
.toChar() == 'N';
1049 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( )
1052 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_UNION
,nValue
,*this);
1053 return (nValue
& SQL_U_UNION
) == SQL_U_UNION
;
1056 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( )
1059 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_UNION
,nValue
,*this);
1060 return (nValue
& SQL_U_UNION_ALL
) == SQL_U_UNION_ALL
;
1063 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( )
1065 SQLUSMALLINT nValue
;
1066 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
1067 return nValue
== SQL_IC_MIXED
;
1070 bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
1072 SQLUSMALLINT nValue
;
1073 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
1074 return nValue
== SQL_IC_MIXED
;
1077 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( )
1079 SQLUSMALLINT nValue
;
1080 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1081 return nValue
== SQL_NC_END
;
1084 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( )
1086 SQLUSMALLINT nValue
;
1087 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1088 return nValue
== SQL_NC_START
;
1091 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( )
1093 SQLUSMALLINT nValue
;
1094 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1095 return nValue
== SQL_NC_HIGH
;
1098 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( )
1100 SQLUSMALLINT nValue
;
1101 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1102 return nValue
== SQL_NC_LOW
;
1105 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( )
1108 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
1109 return (nValue
& SQL_SU_PROCEDURE_INVOCATION
) == SQL_SU_PROCEDURE_INVOCATION
;
1112 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( )
1115 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
1116 return (nValue
& SQL_SU_PRIVILEGE_DEFINITION
) == SQL_SU_PRIVILEGE_DEFINITION
;
1119 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( )
1121 SQLUINTEGER nValue
=0;
1123 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
1124 return (nValue
& SQL_CU_PROCEDURE_INVOCATION
) == SQL_CU_PROCEDURE_INVOCATION
;
1127 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( )
1129 SQLUINTEGER nValue
=0;
1131 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
1132 return (nValue
& SQL_CU_PRIVILEGE_DEFINITION
) == SQL_CU_PRIVILEGE_DEFINITION
;
1135 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( )
1138 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1139 return (nValue
& SQL_SQ_CORRELATED_SUBQUERIES
) == SQL_SQ_CORRELATED_SUBQUERIES
;
1142 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( )
1145 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1146 return (nValue
& SQL_SQ_COMPARISON
) == SQL_SQ_COMPARISON
;
1149 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( )
1152 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1153 return (nValue
& SQL_SQ_EXISTS
) == SQL_SQ_EXISTS
;
1156 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( )
1159 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1160 return (nValue
& SQL_SQ_IN
) == SQL_SQ_IN
;
1163 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( )
1166 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1167 return (nValue
& SQL_SQ_QUANTIFIED
) == SQL_SQ_QUANTIFIED
;
1170 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( )
1173 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
1174 return static_cast<bool>(nValue
& SQL_SC_SQL92_INTERMEDIATE
);
1177 OUString
ODatabaseMetaData::getURLImpl()
1180 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DATA_SOURCE_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1184 OUString SAL_CALL
ODatabaseMetaData::getURL( )
1186 OUString aValue
= m_pConnection
->getURL();
1187 if ( aValue
.isEmpty() )
1189 aValue
= "sdbc:odbc:" + getURLImpl();
1194 OUString SAL_CALL
ODatabaseMetaData::getUserName( )
1197 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_USER_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1201 OUString SAL_CALL
ODatabaseMetaData::getDriverName( )
1204 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1208 OUString SAL_CALL
ODatabaseMetaData::getDriverVersion()
1211 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_ODBC_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1215 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( )
1218 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1222 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( )
1225 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DBMS_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1229 OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( )
1232 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_PROCEDURE_TERM
,aValue
,*this,m_pConnection
->getTextEncoding());
1236 OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( )
1239 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_TERM
,aValue
,*this,m_pConnection
->getTextEncoding());
1243 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) try
1246 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1247 return aValue
.copy(0,aValue
.indexOf('.')).toInt32();
1249 catch (const SQLException
&)
1254 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( )
1257 sal_Int32 nValueTranslated
;
1258 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DEFAULT_TXN_ISOLATION
,nValue
,*this);
1261 case SQL_TXN_READ_UNCOMMITTED
:
1262 nValueTranslated
= css::sdbc::TransactionIsolation::READ_UNCOMMITTED
;
1264 case SQL_TXN_READ_COMMITTED
:
1265 nValueTranslated
= css::sdbc::TransactionIsolation::READ_COMMITTED
;
1267 case SQL_TXN_REPEATABLE_READ
:
1268 nValueTranslated
= css::sdbc::TransactionIsolation::REPEATABLE_READ
;
1270 case SQL_TXN_SERIALIZABLE
:
1271 nValueTranslated
= css::sdbc::TransactionIsolation::SERIALIZABLE
;
1274 nValueTranslated
= 0;
1276 return nValueTranslated
;
1279 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) try
1282 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1283 return aValue
.copy(0,aValue
.lastIndexOf('.')).toInt32();
1285 catch (const SQLException
&)
1290 OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( )
1293 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_KEYWORDS
,aValue
,*this,m_pConnection
->getTextEncoding());
1297 OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( )
1300 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SEARCH_PATTERN_ESCAPE
,aValue
,*this,m_pConnection
->getTextEncoding());
1304 OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( )
1307 OUStringBuffer aValue
;
1308 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_STRING_FUNCTIONS
,nValue
,*this);
1309 if(nValue
& SQL_FN_STR_ASCII
)
1310 aValue
.append("ASCII,");
1311 if(nValue
& SQL_FN_STR_BIT_LENGTH
)
1312 aValue
.append("BIT_LENGTH,");
1313 if(nValue
& SQL_FN_STR_CHAR
)
1314 aValue
.append("CHAR,");
1315 if(nValue
& SQL_FN_STR_CHAR_LENGTH
)
1316 aValue
.append("CHAR_LENGTH,");
1317 if(nValue
& SQL_FN_STR_CHARACTER_LENGTH
)
1318 aValue
.append("CHARACTER_LENGTH,");
1319 if(nValue
& SQL_FN_STR_CONCAT
)
1320 aValue
.append("CONCAT,");
1321 if(nValue
& SQL_FN_STR_DIFFERENCE
)
1322 aValue
.append("DIFFERENCE,");
1323 if(nValue
& SQL_FN_STR_INSERT
)
1324 aValue
.append("INSERT,");
1325 if(nValue
& SQL_FN_STR_LCASE
)
1326 aValue
.append("LCASE,");
1327 if(nValue
& SQL_FN_STR_LEFT
)
1328 aValue
.append("LEFT,");
1329 if(nValue
& SQL_FN_STR_LENGTH
)
1330 aValue
.append("LENGTH,");
1331 if(nValue
& SQL_FN_STR_LOCATE
)
1332 aValue
.append("LOCATE,");
1333 if(nValue
& SQL_FN_STR_LOCATE_2
)
1334 aValue
.append("LOCATE_2,");
1335 if(nValue
& SQL_FN_STR_LTRIM
)
1336 aValue
.append("LTRIM,");
1337 if(nValue
& SQL_FN_STR_OCTET_LENGTH
)
1338 aValue
.append("OCTET_LENGTH,");
1339 if(nValue
& SQL_FN_STR_POSITION
)
1340 aValue
.append("POSITION,");
1341 if(nValue
& SQL_FN_STR_REPEAT
)
1342 aValue
.append("REPEAT,");
1343 if(nValue
& SQL_FN_STR_REPLACE
)
1344 aValue
.append("REPLACE,");
1345 if(nValue
& SQL_FN_STR_RIGHT
)
1346 aValue
.append("RIGHT,");
1347 if(nValue
& SQL_FN_STR_RTRIM
)
1348 aValue
.append("RTRIM,");
1349 if(nValue
& SQL_FN_STR_SOUNDEX
)
1350 aValue
.append("SOUNDEX,");
1351 if(nValue
& SQL_FN_STR_SPACE
)
1352 aValue
.append("SPACE,");
1353 if(nValue
& SQL_FN_STR_SUBSTRING
)
1354 aValue
.append("SUBSTRING,");
1355 if(nValue
& SQL_FN_STR_UCASE
)
1356 aValue
.append("UCASE,");
1359 if ( !aValue
.isEmpty() )
1360 aValue
.setLength(aValue
.getLength()-1);
1362 return aValue
.makeStringAndClear();
1365 OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( )
1368 OUStringBuffer aValue
;
1369 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TIMEDATE_FUNCTIONS
,nValue
,*this);
1371 if(nValue
& SQL_FN_TD_CURRENT_DATE
)
1372 aValue
.append("CURRENT_DATE,");
1373 if(nValue
& SQL_FN_TD_CURRENT_TIME
)
1374 aValue
.append("CURRENT_TIME,");
1375 if(nValue
& SQL_FN_TD_CURRENT_TIMESTAMP
)
1376 aValue
.append("CURRENT_TIMESTAMP,");
1377 if(nValue
& SQL_FN_TD_CURDATE
)
1378 aValue
.append("CURDATE,");
1379 if(nValue
& SQL_FN_TD_CURTIME
)
1380 aValue
.append("CURTIME,");
1381 if(nValue
& SQL_FN_TD_DAYNAME
)
1382 aValue
.append("DAYNAME,");
1383 if(nValue
& SQL_FN_TD_DAYOFMONTH
)
1384 aValue
.append("DAYOFMONTH,");
1385 if(nValue
& SQL_FN_TD_DAYOFWEEK
)
1386 aValue
.append("DAYOFWEEK,");
1387 if(nValue
& SQL_FN_TD_DAYOFYEAR
)
1388 aValue
.append("DAYOFYEAR,");
1389 if(nValue
& SQL_FN_TD_EXTRACT
)
1390 aValue
.append("EXTRACT,");
1391 if(nValue
& SQL_FN_TD_HOUR
)
1392 aValue
.append("HOUR,");
1393 if(nValue
& SQL_FN_TD_MINUTE
)
1394 aValue
.append("MINUTE,");
1395 if(nValue
& SQL_FN_TD_MONTH
)
1396 aValue
.append("MONTH,");
1397 if(nValue
& SQL_FN_TD_MONTHNAME
)
1398 aValue
.append("MONTHNAME,");
1399 if(nValue
& SQL_FN_TD_NOW
)
1400 aValue
.append("NOW,");
1401 if(nValue
& SQL_FN_TD_QUARTER
)
1402 aValue
.append("QUARTER,");
1403 if(nValue
& SQL_FN_TD_SECOND
)
1404 aValue
.append("SECOND,");
1405 if(nValue
& SQL_FN_TD_TIMESTAMPADD
)
1406 aValue
.append("TIMESTAMPADD,");
1407 if(nValue
& SQL_FN_TD_TIMESTAMPDIFF
)
1408 aValue
.append("TIMESTAMPDIFF,");
1409 if(nValue
& SQL_FN_TD_WEEK
)
1410 aValue
.append("WEEK,");
1411 if(nValue
& SQL_FN_TD_YEAR
)
1412 aValue
.append("YEAR,");
1414 if ( !aValue
.isEmpty() )
1415 aValue
.setLength(aValue
.getLength()-1);
1417 return aValue
.makeStringAndClear();
1420 OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( )
1423 OUStringBuffer aValue
;
1424 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SYSTEM_FUNCTIONS
,nValue
,*this);
1426 if(nValue
& SQL_FN_SYS_DBNAME
)
1427 aValue
.append("DBNAME,");
1428 if(nValue
& SQL_FN_SYS_IFNULL
)
1429 aValue
.append("IFNULL,");
1430 if(nValue
& SQL_FN_SYS_USERNAME
)
1431 aValue
.append("USERNAME,");
1433 if ( !aValue
.isEmpty() )
1434 aValue
.setLength(aValue
.getLength()-1);
1436 return aValue
.makeStringAndClear();
1439 OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( )
1442 OUStringBuffer aValue
;
1443 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NUMERIC_FUNCTIONS
,nValue
,*this);
1445 if(nValue
& SQL_FN_NUM_ABS
)
1446 aValue
.append("ABS,");
1447 if(nValue
& SQL_FN_NUM_ACOS
)
1448 aValue
.append("ACOS,");
1449 if(nValue
& SQL_FN_NUM_ASIN
)
1450 aValue
.append("ASIN,");
1451 if(nValue
& SQL_FN_NUM_ATAN
)
1452 aValue
.append("ATAN,");
1453 if(nValue
& SQL_FN_NUM_ATAN2
)
1454 aValue
.append("ATAN2,");
1455 if(nValue
& SQL_FN_NUM_CEILING
)
1456 aValue
.append("CEILING,");
1457 if(nValue
& SQL_FN_NUM_COS
)
1458 aValue
.append("COS,");
1459 if(nValue
& SQL_FN_NUM_COT
)
1460 aValue
.append("COT,");
1461 if(nValue
& SQL_FN_NUM_DEGREES
)
1462 aValue
.append("DEGREES,");
1463 if(nValue
& SQL_FN_NUM_EXP
)
1464 aValue
.append("EXP,");
1465 if(nValue
& SQL_FN_NUM_FLOOR
)
1466 aValue
.append("FLOOR,");
1467 if(nValue
& SQL_FN_NUM_LOG
)
1468 aValue
.append("LOGF,");
1469 if(nValue
& SQL_FN_NUM_LOG10
)
1470 aValue
.append("LOG10,");
1471 if(nValue
& SQL_FN_NUM_MOD
)
1472 aValue
.append("MOD,");
1473 if(nValue
& SQL_FN_NUM_PI
)
1474 aValue
.append("PI,");
1475 if(nValue
& SQL_FN_NUM_POWER
)
1476 aValue
.append("POWER,");
1477 if(nValue
& SQL_FN_NUM_RADIANS
)
1478 aValue
.append("RADIANS,");
1479 if(nValue
& SQL_FN_NUM_RAND
)
1480 aValue
.append("RAND,");
1481 if(nValue
& SQL_FN_NUM_ROUND
)
1482 aValue
.append("ROUND,");
1483 if(nValue
& SQL_FN_NUM_SIGN
)
1484 aValue
.append("SIGN,");
1485 if(nValue
& SQL_FN_NUM_SIN
)
1486 aValue
.append("SIN,");
1487 if(nValue
& SQL_FN_NUM_SQRT
)
1488 aValue
.append("SQRT,");
1489 if(nValue
& SQL_FN_NUM_TAN
)
1490 aValue
.append("TAN,");
1491 if(nValue
& SQL_FN_NUM_TRUNCATE
)
1492 aValue
.append("TRUNCATE,");
1494 if ( !aValue
.isEmpty() )
1495 aValue
.setLength(aValue
.getLength()-1);
1497 return aValue
.makeStringAndClear();
1500 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( )
1503 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1504 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1505 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1506 "connectivity.odbc",
1507 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1508 return nValue
== SQL_OSC_EXTENDED
;
1511 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( )
1514 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1515 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1516 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1517 "connectivity.odbc",
1518 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1519 return nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
;
1522 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( )
1525 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1526 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1527 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1528 "connectivity.odbc",
1529 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1530 return nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
;
1533 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( )
1536 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_OJ_CAPABILITIES
,nValue
,*this);
1537 return (nValue
& SQL_OJ_FULL
) == SQL_OJ_FULL
;
1540 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( )
1542 return supportsFullOuterJoins( );
1545 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( )
1547 SQLUSMALLINT nValue
;
1548 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_GROUP_BY
,nValue
,*this);
1552 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( )
1554 SQLUSMALLINT nValue
;
1555 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_ORDER_BY
,nValue
,*this);
1559 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( )
1561 SQLUSMALLINT nValue
;
1562 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_SELECT
,nValue
,*this);
1566 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( )
1568 SQLUSMALLINT nValue
;
1569 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_USER_NAME_LEN
,nValue
,*this);
1573 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
)
1576 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_SENSITIVITY
,nValue
,*this);
1577 return (nValue
& static_cast<SQLUINTEGER
>(setType
)) == static_cast<SQLUINTEGER
>(setType
);
1580 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32 concurrency
)
1583 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1587 case ResultSetType::FORWARD_ONLY
:
1588 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1590 case ResultSetType::SCROLL_INSENSITIVE
:
1591 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1593 case ResultSetType::SCROLL_SENSITIVE
:
1594 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1598 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1602 case ResultSetConcurrency::READ_ONLY
:
1603 bRet
= (nValue
& SQL_CA2_READ_ONLY_CONCURRENCY
) == SQL_CA2_READ_ONLY_CONCURRENCY
;
1605 case ResultSetConcurrency::UPDATABLE
:
1606 bRet
= (nValue
& SQL_CA2_OPT_VALUES_CONCURRENCY
) == SQL_CA2_OPT_VALUES_CONCURRENCY
;
1612 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType
)
1615 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1619 case ResultSetType::FORWARD_ONLY
:
1620 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1622 case ResultSetType::SCROLL_INSENSITIVE
:
1623 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1625 case ResultSetType::SCROLL_SENSITIVE
:
1626 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1630 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1631 return (nValue
& SQL_CA2_SENSITIVITY_UPDATES
) == SQL_CA2_SENSITIVITY_UPDATES
;
1634 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType
)
1637 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1641 case ResultSetType::FORWARD_ONLY
:
1642 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1644 case ResultSetType::SCROLL_INSENSITIVE
:
1645 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1647 case ResultSetType::SCROLL_SENSITIVE
:
1648 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1652 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1653 return (nValue
& SQL_CA2_SENSITIVITY_DELETIONS
) != SQL_CA2_SENSITIVITY_DELETIONS
;
1656 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType
)
1659 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1663 case ResultSetType::FORWARD_ONLY
:
1664 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1666 case ResultSetType::SCROLL_INSENSITIVE
:
1667 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1669 case ResultSetType::SCROLL_SENSITIVE
:
1670 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1674 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1675 return (nValue
& SQL_CA2_SENSITIVITY_ADDITIONS
) == SQL_CA2_SENSITIVITY_ADDITIONS
;
1678 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType
)
1680 return ownUpdatesAreVisible(setType
);
1683 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType
)
1685 return ownDeletesAreVisible(setType
);
1688 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType
)
1690 return ownInsertsAreVisible(setType
);
1693 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32
/*setType*/ )
1698 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32
/*setType*/ )
1703 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32
/*setType*/ )
1708 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( )
1713 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getUDTs( const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*typeNamePattern*/, const Sequence
< sal_Int32
>& /*types*/ )
1719 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */