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>
31 #include <o3tl/string_view.hxx>
33 using namespace connectivity::odbc
;
34 using namespace com::sun::star::uno
;
35 using namespace com::sun::star::sdbc
;
37 ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle
,OConnection
* _pCon
)
38 : ::connectivity::ODatabaseMetaDataBase(_pCon
,_pCon
->getConnectionInfo())
39 ,m_aConnectionHandle(_pHandle
)
43 assert(m_pConnection
&& "ODatabaseMetaData::ODatabaseMetaData: No connection set!");
44 if(!m_pConnection
->isCatalogUsed())
46 osl_atomic_increment( &m_refCount
);
49 m_bUseCatalog
= !(usesLocalFiles() || usesLocalFilePerTable());
52 { // doesn't matter here
54 osl_atomic_decrement( &m_refCount
);
58 ODatabaseMetaData::~ODatabaseMetaData()
62 Reference
< XResultSet
> ODatabaseMetaData::impl_getTypeInfo_throw( )
64 Reference
< XResultSet
> xRef
;
67 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
69 pResult
->openTypeInfo();
73 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo
);
79 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCatalogs( )
81 Reference
< XResultSet
> xRef
;
84 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs
);
90 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
92 pResult
->openCatalogs();
96 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs
);
103 OUString
ODatabaseMetaData::impl_getCatalogSeparator_throw( )
107 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_NAME_SEPARATOR
,aVal
,*this,m_pConnection
->getTextEncoding());
112 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getSchemas( )
114 Reference
< XResultSet
> xRef
;
117 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
119 pResult
->openSchemas();
123 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eSchemas
);
128 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumnPrivileges(
129 const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
130 const OUString
& columnNamePattern
)
132 Reference
< XResultSet
> xRef
;
135 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
137 pResult
->openColumnPrivileges(m_bUseCatalog
? catalog
: Any(),schema
,table
,columnNamePattern
);
141 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumnPrivileges
);
146 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
147 const Any
& catalog
, const OUString
& schemaPattern
, const OUString
& tableNamePattern
,
148 const OUString
& columnNamePattern
)
150 Reference
< XResultSet
> xRef
;
153 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
155 pResult
->openColumns(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
,columnNamePattern
);
159 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns
);
164 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
165 const Any
& catalog
, const OUString
& schemaPattern
,
166 const OUString
& tableNamePattern
, const Sequence
< OUString
>& types
)
168 Reference
< XResultSet
> xRef
;
171 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
173 pResult
->openTables(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
,types
);
177 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTables
);
182 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedureColumns(
183 const Any
& catalog
, const OUString
& schemaPattern
,
184 const OUString
& procedureNamePattern
, const OUString
& columnNamePattern
)
186 Reference
< XResultSet
> xRef
;
189 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
191 pResult
->openProcedureColumns(m_bUseCatalog
? catalog
: Any(),schemaPattern
,procedureNamePattern
,columnNamePattern
);
195 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedureColumns
);
200 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedures(
201 const Any
& catalog
, const OUString
& schemaPattern
,
202 const OUString
& procedureNamePattern
)
204 Reference
< XResultSet
> xRef
;
207 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
209 pResult
->openProcedures(m_bUseCatalog
? catalog
: Any(),schemaPattern
,procedureNamePattern
);
213 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedures
);
218 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getVersionColumns(
219 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
221 Reference
< XResultSet
> xRef
;
222 bool bSuccess
= false;
225 if ( !m_pConnection
->preventGetVersionColumns() )
227 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
229 pResult
->openVersionColumns(m_bUseCatalog
? catalog
: Any(),schema
,table
);
239 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns
);
245 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( )
248 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_BINARY_LITERAL_LEN
,nValue
,*this);
252 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( )
255 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_ROW_SIZE
,nValue
,*this);
259 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( )
262 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CATALOG_NAME_LEN
,nValue
,*this);
266 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( )
269 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CHAR_LITERAL_LEN
,nValue
,*this);
273 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( )
276 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMN_NAME_LEN
,nValue
,*this);
280 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( )
283 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_INDEX
,nValue
,*this);
287 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( )
290 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CURSOR_NAME_LEN
,nValue
,*this);
294 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( )
297 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_DRIVER_CONNECTIONS
/*SQL_ACTIVE_CONNECTIONS*/,nValue
,*this);
301 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( )
304 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_TABLE
,nValue
,*this);
308 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( )
311 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_STATEMENT_LEN
,nValue
,*this);
315 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( )
318 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_TABLE_NAME_LEN
,nValue
,*this);
322 sal_Int32
ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
325 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_TABLES_IN_SELECT
,nValue
,*this);
329 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getExportedKeys(
330 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
332 Reference
< XResultSet
> xRef
;
335 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
337 pResult
->openExportedKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
341 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eExportedKeys
);
346 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getImportedKeys(
347 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
349 Reference
< XResultSet
> xRef
;
352 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
354 pResult
->openImportedKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
358 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eImportedKeys
);
363 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getPrimaryKeys(
364 const Any
& catalog
, const OUString
& schema
, const OUString
& table
)
366 Reference
< XResultSet
> xRef
;
369 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
371 pResult
->openPrimaryKeys(m_bUseCatalog
? catalog
: Any(),schema
,table
);
375 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::ePrimaryKeys
);
380 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getIndexInfo(
381 const Any
& catalog
, const OUString
& schema
, const OUString
& table
,
382 sal_Bool unique
, sal_Bool approximate
)
384 Reference
< XResultSet
> xRef
;
387 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
389 pResult
->openIndexInfo(m_bUseCatalog
? catalog
: Any(),schema
,table
,unique
,approximate
);
393 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo
);
398 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getBestRowIdentifier(
399 const Any
& catalog
, const OUString
& schema
, const OUString
& table
, sal_Int32 scope
,
402 Reference
< XResultSet
> xRef
;
405 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
407 pResult
->openBestRowIdentifier(m_bUseCatalog
? catalog
: Any(),schema
,table
,scope
,nullable
);
411 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eBestRowIdentifier
);
416 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
417 const Any
& catalog
, const OUString
& schemaPattern
, const OUString
& tableNamePattern
)
419 if ( m_pConnection
->isIgnoreDriverPrivilegesEnabled() )
421 return new OResultSetPrivileges(this,catalog
,schemaPattern
,tableNamePattern
);
423 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
424 pResult
->openTablePrivileges(m_bUseCatalog
? catalog
: Any(),schemaPattern
,tableNamePattern
);
428 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCrossReference(
429 const Any
& primaryCatalog
, const OUString
& primarySchema
,
430 const OUString
& primaryTable
, const Any
& foreignCatalog
,
431 const OUString
& foreignSchema
, const OUString
& foreignTable
)
433 Reference
< XResultSet
> xRef
;
436 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
438 pResult
->openForeignKeys(m_bUseCatalog
? primaryCatalog
: Any(),primarySchema
.toChar() == '%' ? &primarySchema
: nullptr,&primaryTable
,
439 m_bUseCatalog
? foreignCatalog
: Any(), foreignSchema
.toChar() == '%' ? &foreignSchema
: nullptr,&foreignTable
);
443 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCrossReference
);
448 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( )
451 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_ROW_SIZE_INCLUDES_LONG
,aVal
,*this,m_pConnection
->getTextEncoding());
452 return aVal
.toChar() == 'Y';
455 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( )
458 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
459 return nValue
== SQL_IC_LOWER
;
462 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( )
465 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
466 return nValue
== SQL_IC_LOWER
;
469 bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
472 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
473 return nValue
== SQL_IC_MIXED
;
476 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( )
479 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
480 return nValue
== SQL_IC_MIXED
;
483 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( )
486 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
487 return nValue
== SQL_IC_UPPER
;
490 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( )
493 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
494 return nValue
== SQL_IC_UPPER
;
497 bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
500 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ALTER_TABLE
,nValue
,*this);
501 return (nValue
& SQL_AT_ADD_COLUMN
) == SQL_AT_ADD_COLUMN
;
504 bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
507 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ALTER_TABLE
,nValue
,*this);
508 return ((nValue
& SQL_AT_DROP_COLUMN
) == SQL_AT_DROP_COLUMN
) ||
509 ((nValue
& SQL_AT_DROP_COLUMN_CASCADE
) == SQL_AT_DROP_COLUMN_CASCADE
) ||
510 ((nValue
& SQL_AT_DROP_COLUMN_RESTRICT
) == SQL_AT_DROP_COLUMN_RESTRICT
);
513 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( )
516 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_INDEX_SIZE
,nValue
,*this);
520 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( )
523 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NON_NULLABLE_COLUMNS
,nValue
,*this);
524 return nValue
== SQL_NNC_NON_NULL
;
527 OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( )
531 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_TERM
,aVal
,*this,m_pConnection
->getTextEncoding());
535 OUString
ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
538 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_QUOTE_CHAR
,aVal
,*this,m_pConnection
->getTextEncoding());
542 OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( )
545 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SPECIAL_CHARACTERS
,aVal
,*this,m_pConnection
->getTextEncoding());
549 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( )
552 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CORRELATION_NAME
,nValue
,*this);
553 return nValue
!= SQL_CN_NONE
;
556 bool ODatabaseMetaData::impl_isCatalogAtStart_throw( )
558 SQLUSMALLINT nValue
=0;
560 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_LOCATION
,nValue
,*this);
561 return nValue
== SQL_CL_START
;
564 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( )
567 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
568 return nValue
== SQL_TC_DDL_IGNORE
;
571 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( )
574 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
575 return nValue
== SQL_TC_DDL_COMMIT
;
578 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( )
581 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
582 return nValue
== SQL_TC_DML
;
585 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( )
588 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
589 return nValue
== SQL_TC_ALL
;
592 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( )
595 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
596 return (nValue
& SQL_CA1_POS_DELETE
) == SQL_CA1_POS_DELETE
;
599 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( )
602 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
603 return (nValue
& SQL_CA1_POS_UPDATE
) == SQL_CA1_POS_UPDATE
;
606 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( )
609 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_ROLLBACK_BEHAVIOR
,nValue
,*this);
610 return nValue
== SQL_CB_PRESERVE
|| nValue
== SQL_CB_CLOSE
;
613 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( )
616 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_COMMIT_BEHAVIOR
,nValue
,*this);
617 return nValue
== SQL_CB_PRESERVE
|| nValue
== SQL_CB_CLOSE
;
620 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( )
623 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_COMMIT_BEHAVIOR
,nValue
,*this);
624 return nValue
== SQL_CB_PRESERVE
;
627 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( )
630 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_ROLLBACK_BEHAVIOR
,nValue
,*this);
631 return nValue
== SQL_CB_PRESERVE
;
634 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level
)
637 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_ISOLATION_OPTION
,nValue
,*this);
638 return (nValue
& static_cast<SQLUINTEGER
>(level
)) == static_cast<SQLUINTEGER
>(level
);
641 bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
644 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
645 return (nValue
& SQL_SU_DML_STATEMENTS
) == SQL_SU_DML_STATEMENTS
;
648 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( )
651 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
652 return static_cast<bool>(nValue
& SQL_SC_SQL92_FULL
);
655 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( )
658 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
659 return static_cast<bool>(nValue
&SQL_SC_SQL92_ENTRY
);
662 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( )
665 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_INTEGRITY
,aStr
,*this,m_pConnection
->getTextEncoding());
666 return aStr
.toChar() == 'Y';
669 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( )
672 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
673 return (nValue
& SQL_SU_INDEX_DEFINITION
) == SQL_SU_INDEX_DEFINITION
;
676 bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
679 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
680 return (nValue
& SQL_SU_TABLE_DEFINITION
) == SQL_SU_TABLE_DEFINITION
;
683 bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
685 SQLUINTEGER nValue
=0;
687 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
688 return (nValue
& SQL_CU_TABLE_DEFINITION
) == SQL_CU_TABLE_DEFINITION
;
691 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( )
693 SQLUINTEGER nValue
=0;
695 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
696 return (nValue
& SQL_CU_INDEX_DEFINITION
) == SQL_CU_INDEX_DEFINITION
;
699 bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
701 SQLUINTEGER nValue
=0;
703 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
704 return (nValue
& SQL_CU_DML_STATEMENTS
) == SQL_CU_DML_STATEMENTS
;
707 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( )
710 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_OJ_CAPABILITIES
,nValue
,*this);
711 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);
714 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( )
716 Reference
< XResultSet
> xRef
;
719 rtl::Reference
<ODatabaseMetaDataResultSet
> pResult
= new ODatabaseMetaDataResultSet(m_pConnection
);
721 pResult
->openTablesTypes();
725 xRef
= new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes
);
730 sal_Int32
ODatabaseMetaData::impl_getMaxStatements_throw( )
733 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_CONCURRENT_ACTIVITIES
,nValue
,*this);
737 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( )
740 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_PROCEDURE_NAME_LEN
,nValue
,*this);
744 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( )
747 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_SCHEMA_NAME_LEN
,nValue
,*this);
751 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( )
754 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TXN_CAPABLE
,nValue
,*this);
755 return nValue
!= SQL_TC_NONE
;
758 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( )
761 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ACCESSIBLE_PROCEDURES
,aValue
,*this,m_pConnection
->getTextEncoding());
762 return aValue
.toChar() == 'Y';
765 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( )
768 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_PROCEDURES
,aValue
,*this,m_pConnection
->getTextEncoding());
769 return aValue
.toChar() == 'Y';
772 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( )
775 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DYNAMIC_CURSOR_ATTRIBUTES1
,nValue
,*this);
776 return (nValue
& SQL_CA1_POSITIONED_UPDATE
) == SQL_CA1_POSITIONED_UPDATE
;
779 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( )
782 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ACCESSIBLE_TABLES
,aValue
,*this,m_pConnection
->getTextEncoding());
783 return aValue
.toChar() == 'Y';
786 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( )
788 return m_pConnection
->isReadOnly();
791 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( )
794 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_FILE_USAGE
,nValue
,*this);
795 return nValue
== SQL_FILE_CATALOG
;
798 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( )
801 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_FILE_USAGE
,nValue
,*this);
802 return nValue
== SQL_FILE_TABLE
;
805 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( )
808 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_FUNCTIONS
,nValue
,*this);
809 return (nValue
& SQL_FN_CVT_CONVERT
) == SQL_FN_CVT_CONVERT
;
812 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( )
815 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONCAT_NULL_BEHAVIOR
,nValue
,*this);
816 return nValue
== SQL_CB_NULL
;
819 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( )
822 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_COLUMN_ALIAS
,aValue
,*this,m_pConnection
->getTextEncoding());
823 return aValue
.toChar() == 'Y';
826 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( )
829 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CORRELATION_NAME
,nValue
,*this);
830 return nValue
!= SQL_CN_NONE
;
833 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32 fromType
, sal_Int32 toType
)
835 if(fromType
== toType
)
838 SQLUINTEGER nValue
=0;
842 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BIT
,nValue
,*this);
844 case DataType::TINYINT
:
845 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TINYINT
,nValue
,*this);
847 case DataType::SMALLINT
:
848 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_SMALLINT
,nValue
,*this);
850 case DataType::INTEGER
:
851 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_INTEGER
,nValue
,*this);
853 case DataType::BIGINT
:
854 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BIGINT
,nValue
,*this);
856 case DataType::FLOAT
:
857 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_FLOAT
,nValue
,*this);
860 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_REAL
,nValue
,*this);
862 case DataType::DOUBLE
:
863 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DOUBLE
,nValue
,*this);
865 case DataType::NUMERIC
:
866 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_NUMERIC
,nValue
,*this);
868 case DataType::DECIMAL
:
869 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DECIMAL
,nValue
,*this);
872 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_CHAR
,nValue
,*this);
874 case DataType::VARCHAR
:
875 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_VARCHAR
,nValue
,*this);
877 case DataType::LONGVARCHAR
:
879 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_LONGVARCHAR
,nValue
,*this);
882 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_DATE
,nValue
,*this);
885 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TIME
,nValue
,*this);
887 case DataType::TIMESTAMP
:
888 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_TIMESTAMP
,nValue
,*this);
890 case DataType::BINARY
:
891 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_BINARY
,nValue
,*this);
893 case DataType::VARBINARY
:
894 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_VARBINARY
,nValue
,*this);
896 case DataType::LONGVARBINARY
:
898 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CONVERT_LONGVARBINARY
,nValue
,*this);
900 case DataType::SQLNULL
:
901 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
903 case DataType::OTHER
:
904 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
906 case DataType::OBJECT
:
907 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
909 case DataType::DISTINCT
:
910 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
912 case DataType::STRUCT
:
913 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
915 case DataType::ARRAY
:
916 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
919 // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
922 bool bConvert
= false;
926 bConvert
= (nValue
& SQL_CVT_BIT
) == SQL_CVT_BIT
;
928 case DataType::TINYINT
:
929 bConvert
= (nValue
& SQL_CVT_TINYINT
) == SQL_CVT_TINYINT
;
931 case DataType::SMALLINT
:
932 bConvert
= (nValue
& SQL_CVT_SMALLINT
) == SQL_CVT_SMALLINT
;
934 case DataType::INTEGER
:
935 bConvert
= (nValue
& SQL_CVT_INTEGER
) == SQL_CVT_INTEGER
;
937 case DataType::BIGINT
:
938 bConvert
= (nValue
& SQL_CVT_BIGINT
) == SQL_CVT_BIGINT
;
940 case DataType::FLOAT
:
941 bConvert
= (nValue
& SQL_CVT_FLOAT
) == SQL_CVT_FLOAT
;
944 bConvert
= (nValue
& SQL_CVT_REAL
) == SQL_CVT_REAL
;
946 case DataType::DOUBLE
:
947 bConvert
= (nValue
& SQL_CVT_DOUBLE
) == SQL_CVT_DOUBLE
;
949 case DataType::NUMERIC
:
950 bConvert
= (nValue
& SQL_CVT_NUMERIC
) == SQL_CVT_NUMERIC
;
952 case DataType::DECIMAL
:
953 bConvert
= (nValue
& SQL_CVT_DECIMAL
) == SQL_CVT_DECIMAL
;
956 bConvert
= (nValue
& SQL_CVT_CHAR
) == SQL_CVT_CHAR
;
958 case DataType::VARCHAR
:
959 bConvert
= (nValue
& SQL_CVT_VARCHAR
) == SQL_CVT_VARCHAR
;
961 case DataType::LONGVARCHAR
:
963 bConvert
= (nValue
& SQL_CVT_LONGVARCHAR
) == SQL_CVT_LONGVARCHAR
;
966 bConvert
= (nValue
& SQL_CVT_DATE
) == SQL_CVT_DATE
;
969 bConvert
= (nValue
& SQL_CVT_TIME
) == SQL_CVT_TIME
;
971 case DataType::TIMESTAMP
:
972 bConvert
= (nValue
& SQL_CVT_TIMESTAMP
) == SQL_CVT_TIMESTAMP
;
974 case DataType::BINARY
:
975 bConvert
= (nValue
& SQL_CVT_BINARY
) == SQL_CVT_BINARY
;
977 case DataType::VARBINARY
:
978 bConvert
= (nValue
& SQL_CVT_VARBINARY
) == SQL_CVT_VARBINARY
;
980 case DataType::LONGVARBINARY
:
982 bConvert
= (nValue
& SQL_CVT_LONGVARBINARY
) == SQL_CVT_LONGVARBINARY
;
989 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( )
992 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_EXPRESSIONS_IN_ORDERBY
,aValue
,*this,m_pConnection
->getTextEncoding());
993 return aValue
.toChar() == 'Y';
996 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( )
999 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1000 return nValue
!= SQL_GB_NOT_SUPPORTED
;
1003 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( )
1005 SQLUSMALLINT nValue
;
1006 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1007 return nValue
!= SQL_GB_GROUP_BY_CONTAINS_SELECT
;
1010 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( )
1012 SQLUSMALLINT nValue
;
1013 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_GROUP_BY
,nValue
,*this);
1014 return nValue
== SQL_GB_NO_RELATION
;
1017 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( )
1020 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MULTIPLE_ACTIVE_TXN
,aValue
,*this,m_pConnection
->getTextEncoding());
1021 return aValue
.toChar() == 'Y';
1024 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( )
1027 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MULT_RESULT_SETS
,aValue
,*this,m_pConnection
->getTextEncoding());
1028 return aValue
.toChar() == 'Y';
1031 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( )
1034 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_LIKE_ESCAPE_CLAUSE
,aValue
,*this,m_pConnection
->getTextEncoding());
1035 return aValue
.toChar() == 'Y';
1038 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( )
1041 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ORDER_BY_COLUMNS_IN_SELECT
,aValue
,*this,m_pConnection
->getTextEncoding());
1042 return aValue
.toChar() == 'N';
1045 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( )
1048 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_UNION
,nValue
,*this);
1049 return (nValue
& SQL_U_UNION
) == SQL_U_UNION
;
1052 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( )
1055 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_UNION
,nValue
,*this);
1056 return (nValue
& SQL_U_UNION_ALL
) == SQL_U_UNION_ALL
;
1059 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( )
1061 SQLUSMALLINT nValue
;
1062 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_IDENTIFIER_CASE
,nValue
,*this);
1063 return nValue
== SQL_IC_MIXED
;
1066 bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
1068 SQLUSMALLINT nValue
;
1069 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_QUOTED_IDENTIFIER_CASE
,nValue
,*this);
1070 return nValue
== SQL_IC_MIXED
;
1073 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( )
1075 SQLUSMALLINT nValue
;
1076 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1077 return nValue
== SQL_NC_END
;
1080 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( )
1082 SQLUSMALLINT nValue
;
1083 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1084 return nValue
== SQL_NC_START
;
1087 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( )
1089 SQLUSMALLINT nValue
;
1090 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1091 return nValue
== SQL_NC_HIGH
;
1094 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( )
1096 SQLUSMALLINT nValue
;
1097 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NULL_COLLATION
,nValue
,*this);
1098 return nValue
== SQL_NC_LOW
;
1101 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( )
1104 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
1105 return (nValue
& SQL_SU_PROCEDURE_INVOCATION
) == SQL_SU_PROCEDURE_INVOCATION
;
1108 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( )
1111 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_USAGE
,nValue
,*this);
1112 return (nValue
& SQL_SU_PRIVILEGE_DEFINITION
) == SQL_SU_PRIVILEGE_DEFINITION
;
1115 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( )
1117 SQLUINTEGER nValue
=0;
1119 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
1120 return (nValue
& SQL_CU_PROCEDURE_INVOCATION
) == SQL_CU_PROCEDURE_INVOCATION
;
1123 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( )
1125 SQLUINTEGER nValue
=0;
1127 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CATALOG_USAGE
,nValue
,*this);
1128 return (nValue
& SQL_CU_PRIVILEGE_DEFINITION
) == SQL_CU_PRIVILEGE_DEFINITION
;
1131 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( )
1134 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1135 return (nValue
& SQL_SQ_CORRELATED_SUBQUERIES
) == SQL_SQ_CORRELATED_SUBQUERIES
;
1138 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( )
1141 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1142 return (nValue
& SQL_SQ_COMPARISON
) == SQL_SQ_COMPARISON
;
1145 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( )
1148 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1149 return (nValue
& SQL_SQ_EXISTS
) == SQL_SQ_EXISTS
;
1152 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( )
1155 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1156 return (nValue
& SQL_SQ_IN
) == SQL_SQ_IN
;
1159 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( )
1162 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SUBQUERIES
,nValue
,*this);
1163 return (nValue
& SQL_SQ_QUANTIFIED
) == SQL_SQ_QUANTIFIED
;
1166 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( )
1169 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SQL_CONFORMANCE
,nValue
,*this);
1170 return static_cast<bool>(nValue
& SQL_SC_SQL92_INTERMEDIATE
);
1173 OUString
ODatabaseMetaData::getURLImpl()
1176 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DATA_SOURCE_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1180 OUString SAL_CALL
ODatabaseMetaData::getURL( )
1182 OUString aValue
= m_pConnection
->getURL();
1183 if ( aValue
.isEmpty() )
1185 aValue
= "sdbc:odbc:" + getURLImpl();
1190 OUString SAL_CALL
ODatabaseMetaData::getUserName( )
1193 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_USER_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1197 OUString SAL_CALL
ODatabaseMetaData::getDriverName( )
1200 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1204 OUString SAL_CALL
ODatabaseMetaData::getDriverVersion()
1207 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_ODBC_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1211 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( )
1214 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1218 OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( )
1221 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DBMS_NAME
,aValue
,*this,m_pConnection
->getTextEncoding());
1225 OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( )
1228 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_PROCEDURE_TERM
,aValue
,*this,m_pConnection
->getTextEncoding());
1232 OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( )
1235 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SCHEMA_TERM
,aValue
,*this,m_pConnection
->getTextEncoding());
1239 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) try
1242 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1243 return o3tl::toInt32(aValue
.subView(0,aValue
.indexOf('.')));
1245 catch (const SQLException
&)
1250 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( )
1253 sal_Int32 nValueTranslated
;
1254 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DEFAULT_TXN_ISOLATION
,nValue
,*this);
1257 case SQL_TXN_READ_UNCOMMITTED
:
1258 nValueTranslated
= css::sdbc::TransactionIsolation::READ_UNCOMMITTED
;
1260 case SQL_TXN_READ_COMMITTED
:
1261 nValueTranslated
= css::sdbc::TransactionIsolation::READ_COMMITTED
;
1263 case SQL_TXN_REPEATABLE_READ
:
1264 nValueTranslated
= css::sdbc::TransactionIsolation::REPEATABLE_READ
;
1266 case SQL_TXN_SERIALIZABLE
:
1267 nValueTranslated
= css::sdbc::TransactionIsolation::SERIALIZABLE
;
1270 nValueTranslated
= 0;
1272 return nValueTranslated
;
1275 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) try
1278 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_DRIVER_VER
,aValue
,*this,m_pConnection
->getTextEncoding());
1279 return o3tl::toInt32(aValue
.subView(0,aValue
.lastIndexOf('.')));
1281 catch (const SQLException
&)
1286 OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( )
1289 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_KEYWORDS
,aValue
,*this,m_pConnection
->getTextEncoding());
1293 OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( )
1296 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SEARCH_PATTERN_ESCAPE
,aValue
,*this,m_pConnection
->getTextEncoding());
1300 OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( )
1303 OUStringBuffer aValue
;
1304 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_STRING_FUNCTIONS
,nValue
,*this);
1305 if(nValue
& SQL_FN_STR_ASCII
)
1306 aValue
.append("ASCII,");
1307 if(nValue
& SQL_FN_STR_BIT_LENGTH
)
1308 aValue
.append("BIT_LENGTH,");
1309 if(nValue
& SQL_FN_STR_CHAR
)
1310 aValue
.append("CHAR,");
1311 if(nValue
& SQL_FN_STR_CHAR_LENGTH
)
1312 aValue
.append("CHAR_LENGTH,");
1313 if(nValue
& SQL_FN_STR_CHARACTER_LENGTH
)
1314 aValue
.append("CHARACTER_LENGTH,");
1315 if(nValue
& SQL_FN_STR_CONCAT
)
1316 aValue
.append("CONCAT,");
1317 if(nValue
& SQL_FN_STR_DIFFERENCE
)
1318 aValue
.append("DIFFERENCE,");
1319 if(nValue
& SQL_FN_STR_INSERT
)
1320 aValue
.append("INSERT,");
1321 if(nValue
& SQL_FN_STR_LCASE
)
1322 aValue
.append("LCASE,");
1323 if(nValue
& SQL_FN_STR_LEFT
)
1324 aValue
.append("LEFT,");
1325 if(nValue
& SQL_FN_STR_LENGTH
)
1326 aValue
.append("LENGTH,");
1327 if(nValue
& SQL_FN_STR_LOCATE
)
1328 aValue
.append("LOCATE,");
1329 if(nValue
& SQL_FN_STR_LOCATE_2
)
1330 aValue
.append("LOCATE_2,");
1331 if(nValue
& SQL_FN_STR_LTRIM
)
1332 aValue
.append("LTRIM,");
1333 if(nValue
& SQL_FN_STR_OCTET_LENGTH
)
1334 aValue
.append("OCTET_LENGTH,");
1335 if(nValue
& SQL_FN_STR_POSITION
)
1336 aValue
.append("POSITION,");
1337 if(nValue
& SQL_FN_STR_REPEAT
)
1338 aValue
.append("REPEAT,");
1339 if(nValue
& SQL_FN_STR_REPLACE
)
1340 aValue
.append("REPLACE,");
1341 if(nValue
& SQL_FN_STR_RIGHT
)
1342 aValue
.append("RIGHT,");
1343 if(nValue
& SQL_FN_STR_RTRIM
)
1344 aValue
.append("RTRIM,");
1345 if(nValue
& SQL_FN_STR_SOUNDEX
)
1346 aValue
.append("SOUNDEX,");
1347 if(nValue
& SQL_FN_STR_SPACE
)
1348 aValue
.append("SPACE,");
1349 if(nValue
& SQL_FN_STR_SUBSTRING
)
1350 aValue
.append("SUBSTRING,");
1351 if(nValue
& SQL_FN_STR_UCASE
)
1352 aValue
.append("UCASE,");
1355 if ( !aValue
.isEmpty() )
1356 aValue
.setLength(aValue
.getLength()-1);
1358 return aValue
.makeStringAndClear();
1361 OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( )
1364 OUStringBuffer aValue
;
1365 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_TIMEDATE_FUNCTIONS
,nValue
,*this);
1367 if(nValue
& SQL_FN_TD_CURRENT_DATE
)
1368 aValue
.append("CURRENT_DATE,");
1369 if(nValue
& SQL_FN_TD_CURRENT_TIME
)
1370 aValue
.append("CURRENT_TIME,");
1371 if(nValue
& SQL_FN_TD_CURRENT_TIMESTAMP
)
1372 aValue
.append("CURRENT_TIMESTAMP,");
1373 if(nValue
& SQL_FN_TD_CURDATE
)
1374 aValue
.append("CURDATE,");
1375 if(nValue
& SQL_FN_TD_CURTIME
)
1376 aValue
.append("CURTIME,");
1377 if(nValue
& SQL_FN_TD_DAYNAME
)
1378 aValue
.append("DAYNAME,");
1379 if(nValue
& SQL_FN_TD_DAYOFMONTH
)
1380 aValue
.append("DAYOFMONTH,");
1381 if(nValue
& SQL_FN_TD_DAYOFWEEK
)
1382 aValue
.append("DAYOFWEEK,");
1383 if(nValue
& SQL_FN_TD_DAYOFYEAR
)
1384 aValue
.append("DAYOFYEAR,");
1385 if(nValue
& SQL_FN_TD_EXTRACT
)
1386 aValue
.append("EXTRACT,");
1387 if(nValue
& SQL_FN_TD_HOUR
)
1388 aValue
.append("HOUR,");
1389 if(nValue
& SQL_FN_TD_MINUTE
)
1390 aValue
.append("MINUTE,");
1391 if(nValue
& SQL_FN_TD_MONTH
)
1392 aValue
.append("MONTH,");
1393 if(nValue
& SQL_FN_TD_MONTHNAME
)
1394 aValue
.append("MONTHNAME,");
1395 if(nValue
& SQL_FN_TD_NOW
)
1396 aValue
.append("NOW,");
1397 if(nValue
& SQL_FN_TD_QUARTER
)
1398 aValue
.append("QUARTER,");
1399 if(nValue
& SQL_FN_TD_SECOND
)
1400 aValue
.append("SECOND,");
1401 if(nValue
& SQL_FN_TD_TIMESTAMPADD
)
1402 aValue
.append("TIMESTAMPADD,");
1403 if(nValue
& SQL_FN_TD_TIMESTAMPDIFF
)
1404 aValue
.append("TIMESTAMPDIFF,");
1405 if(nValue
& SQL_FN_TD_WEEK
)
1406 aValue
.append("WEEK,");
1407 if(nValue
& SQL_FN_TD_YEAR
)
1408 aValue
.append("YEAR,");
1410 if ( !aValue
.isEmpty() )
1411 aValue
.setLength(aValue
.getLength()-1);
1413 return aValue
.makeStringAndClear();
1416 OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( )
1419 OUStringBuffer aValue
;
1420 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_SYSTEM_FUNCTIONS
,nValue
,*this);
1422 if(nValue
& SQL_FN_SYS_DBNAME
)
1423 aValue
.append("DBNAME,");
1424 if(nValue
& SQL_FN_SYS_IFNULL
)
1425 aValue
.append("IFNULL,");
1426 if(nValue
& SQL_FN_SYS_USERNAME
)
1427 aValue
.append("USERNAME,");
1429 if ( !aValue
.isEmpty() )
1430 aValue
.setLength(aValue
.getLength()-1);
1432 return aValue
.makeStringAndClear();
1435 OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( )
1438 OUStringBuffer aValue
;
1439 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_NUMERIC_FUNCTIONS
,nValue
,*this);
1441 if(nValue
& SQL_FN_NUM_ABS
)
1442 aValue
.append("ABS,");
1443 if(nValue
& SQL_FN_NUM_ACOS
)
1444 aValue
.append("ACOS,");
1445 if(nValue
& SQL_FN_NUM_ASIN
)
1446 aValue
.append("ASIN,");
1447 if(nValue
& SQL_FN_NUM_ATAN
)
1448 aValue
.append("ATAN,");
1449 if(nValue
& SQL_FN_NUM_ATAN2
)
1450 aValue
.append("ATAN2,");
1451 if(nValue
& SQL_FN_NUM_CEILING
)
1452 aValue
.append("CEILING,");
1453 if(nValue
& SQL_FN_NUM_COS
)
1454 aValue
.append("COS,");
1455 if(nValue
& SQL_FN_NUM_COT
)
1456 aValue
.append("COT,");
1457 if(nValue
& SQL_FN_NUM_DEGREES
)
1458 aValue
.append("DEGREES,");
1459 if(nValue
& SQL_FN_NUM_EXP
)
1460 aValue
.append("EXP,");
1461 if(nValue
& SQL_FN_NUM_FLOOR
)
1462 aValue
.append("FLOOR,");
1463 if(nValue
& SQL_FN_NUM_LOG
)
1464 aValue
.append("LOGF,");
1465 if(nValue
& SQL_FN_NUM_LOG10
)
1466 aValue
.append("LOG10,");
1467 if(nValue
& SQL_FN_NUM_MOD
)
1468 aValue
.append("MOD,");
1469 if(nValue
& SQL_FN_NUM_PI
)
1470 aValue
.append("PI,");
1471 if(nValue
& SQL_FN_NUM_POWER
)
1472 aValue
.append("POWER,");
1473 if(nValue
& SQL_FN_NUM_RADIANS
)
1474 aValue
.append("RADIANS,");
1475 if(nValue
& SQL_FN_NUM_RAND
)
1476 aValue
.append("RAND,");
1477 if(nValue
& SQL_FN_NUM_ROUND
)
1478 aValue
.append("ROUND,");
1479 if(nValue
& SQL_FN_NUM_SIGN
)
1480 aValue
.append("SIGN,");
1481 if(nValue
& SQL_FN_NUM_SIN
)
1482 aValue
.append("SIN,");
1483 if(nValue
& SQL_FN_NUM_SQRT
)
1484 aValue
.append("SQRT,");
1485 if(nValue
& SQL_FN_NUM_TAN
)
1486 aValue
.append("TAN,");
1487 if(nValue
& SQL_FN_NUM_TRUNCATE
)
1488 aValue
.append("TRUNCATE,");
1490 if ( !aValue
.isEmpty() )
1491 aValue
.setLength(aValue
.getLength()-1);
1493 return aValue
.makeStringAndClear();
1496 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( )
1499 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1500 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1501 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1502 "connectivity.odbc",
1503 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1504 return nValue
== SQL_OSC_EXTENDED
;
1507 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( )
1510 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1511 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1512 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1513 "connectivity.odbc",
1514 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1515 return nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
;
1518 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( )
1521 // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
1522 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_ODBC_SQL_CONFORMANCE
,nValue
,*this);
1523 SAL_WARN_IF(! (nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
),
1524 "connectivity.odbc",
1525 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
1526 return nValue
== SQL_OSC_MINIMUM
|| nValue
== SQL_OSC_CORE
|| nValue
== SQL_OSC_EXTENDED
;
1529 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( )
1532 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_OJ_CAPABILITIES
,nValue
,*this);
1533 return (nValue
& SQL_OJ_FULL
) == SQL_OJ_FULL
;
1536 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( )
1538 return supportsFullOuterJoins( );
1541 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( )
1543 SQLUSMALLINT nValue
;
1544 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_GROUP_BY
,nValue
,*this);
1548 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( )
1550 SQLUSMALLINT nValue
;
1551 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_ORDER_BY
,nValue
,*this);
1555 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( )
1557 SQLUSMALLINT nValue
;
1558 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_COLUMNS_IN_SELECT
,nValue
,*this);
1562 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( )
1564 SQLUSMALLINT nValue
;
1565 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_MAX_USER_NAME_LEN
,nValue
,*this);
1569 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
)
1572 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,SQL_CURSOR_SENSITIVITY
,nValue
,*this);
1573 return (nValue
& static_cast<SQLUINTEGER
>(setType
)) == static_cast<SQLUINTEGER
>(setType
);
1576 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32 concurrency
)
1579 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1583 case ResultSetType::FORWARD_ONLY
:
1584 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1586 case ResultSetType::SCROLL_INSENSITIVE
:
1587 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1589 case ResultSetType::SCROLL_SENSITIVE
:
1590 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1594 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1598 case ResultSetConcurrency::READ_ONLY
:
1599 bRet
= (nValue
& SQL_CA2_READ_ONLY_CONCURRENCY
) == SQL_CA2_READ_ONLY_CONCURRENCY
;
1601 case ResultSetConcurrency::UPDATABLE
:
1602 bRet
= (nValue
& SQL_CA2_OPT_VALUES_CONCURRENCY
) == SQL_CA2_OPT_VALUES_CONCURRENCY
;
1608 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType
)
1611 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1615 case ResultSetType::FORWARD_ONLY
:
1616 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1618 case ResultSetType::SCROLL_INSENSITIVE
:
1619 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1621 case ResultSetType::SCROLL_SENSITIVE
:
1622 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1626 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1627 return (nValue
& SQL_CA2_SENSITIVITY_UPDATES
) == SQL_CA2_SENSITIVITY_UPDATES
;
1630 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType
)
1633 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1637 case ResultSetType::FORWARD_ONLY
:
1638 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1640 case ResultSetType::SCROLL_INSENSITIVE
:
1641 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1643 case ResultSetType::SCROLL_SENSITIVE
:
1644 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1648 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1649 return (nValue
& SQL_CA2_SENSITIVITY_DELETIONS
) != SQL_CA2_SENSITIVITY_DELETIONS
;
1652 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType
)
1655 SQLUSMALLINT
nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
);
1659 case ResultSetType::FORWARD_ONLY
:
1660 nAskFor
= SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
;
1662 case ResultSetType::SCROLL_INSENSITIVE
:
1663 nAskFor
= SQL_STATIC_CURSOR_ATTRIBUTES2
;
1665 case ResultSetType::SCROLL_SENSITIVE
:
1666 nAskFor
= SQL_DYNAMIC_CURSOR_ATTRIBUTES2
;
1670 OTools::GetInfo(m_pConnection
,m_aConnectionHandle
,nAskFor
,nValue
,*this);
1671 return (nValue
& SQL_CA2_SENSITIVITY_ADDITIONS
) == SQL_CA2_SENSITIVITY_ADDITIONS
;
1674 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType
)
1676 return ownUpdatesAreVisible(setType
);
1679 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType
)
1681 return ownDeletesAreVisible(setType
);
1684 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType
)
1686 return ownInsertsAreVisible(setType
);
1689 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32
/*setType*/ )
1694 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32
/*setType*/ )
1699 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32
/*setType*/ )
1704 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( )
1709 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getUDTs( const Any
& /*catalog*/, const OUString
& /*schemaPattern*/, const OUString
& /*typeNamePattern*/, const Sequence
< sal_Int32
>& /*types*/ )
1715 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */