1*9b5730f6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9b5730f6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9b5730f6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9b5730f6SAndrew Rist * distributed with this work for additional information 6*9b5730f6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9b5730f6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9b5730f6SAndrew Rist * "License"); you may not use this file except in compliance 9*9b5730f6SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*9b5730f6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*9b5730f6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9b5730f6SAndrew Rist * software distributed under the License is distributed on an 15*9b5730f6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9b5730f6SAndrew Rist * KIND, either express or implied. See the License for the 17*9b5730f6SAndrew Rist * specific language governing permissions and limitations 18*9b5730f6SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*9b5730f6SAndrew Rist *************************************************************/ 21*9b5730f6SAndrew Rist 22*9b5730f6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_connectivity.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "MacabDatabaseMetaData.hxx" 28cdf0e10cSrcweir #include "MacabAddressBook.hxx" 29cdf0e10cSrcweir #include "MacabHeader.hxx" 30cdf0e10cSrcweir #include "MacabGroup.hxx" 31cdf0e10cSrcweir #include "macabutilities.hxx" 32cdf0e10cSrcweir 33cdf0e10cSrcweir #ifndef CONNECTIVITY_MACAB_DRIVER_HXX_ 34cdf0e10cSrcweir #include "MacabDriver.hxx" 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #include "FDatabaseMetaDataResultSet.hxx" 37cdf0e10cSrcweir #include "OTypeInfo.hxx" 38cdf0e10cSrcweir #include <com/sun/star/sdbc/ColumnValue.hpp> 39cdf0e10cSrcweir #include <com/sun/star/sdbc/ResultSetType.hpp> 40cdf0e10cSrcweir #include <com/sun/star/sdbc/TransactionIsolation.hpp> 41cdf0e10cSrcweir 42cdf0e10cSrcweir #include <vector> 43cdf0e10cSrcweir 44cdf0e10cSrcweir using namespace connectivity::macab; 45cdf0e10cSrcweir using namespace com::sun::star::uno; 46cdf0e10cSrcweir using namespace com::sun::star::lang; 47cdf0e10cSrcweir using namespace com::sun::star::beans; 48cdf0e10cSrcweir using namespace com::sun::star::sdbc; 49cdf0e10cSrcweir 50cdf0e10cSrcweir MacabDatabaseMetaData::MacabDatabaseMetaData(MacabConnection* _pCon) 51cdf0e10cSrcweir : m_xConnection(_pCon), 52cdf0e10cSrcweir m_bUseCatalog(sal_True) 53cdf0e10cSrcweir { 54cdf0e10cSrcweir OSL_ENSURE(_pCon,"MacabDatabaseMetaData::MacabDatabaseMetaData: No connection set!"); 55cdf0e10cSrcweir 56cdf0e10cSrcweir osl_incrementInterlockedCount( &m_refCount ); 57cdf0e10cSrcweir m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); 58cdf0e10cSrcweir osl_decrementInterlockedCount( &m_refCount ); 59cdf0e10cSrcweir } 60cdf0e10cSrcweir // ------------------------------------------------------------------------- 61cdf0e10cSrcweir MacabDatabaseMetaData::~MacabDatabaseMetaData() 62cdf0e10cSrcweir { 63cdf0e10cSrcweir } 64cdf0e10cSrcweir // ------------------------------------------------------------------------- 65cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException) 66cdf0e10cSrcweir { 67cdf0e10cSrcweir ::rtl::OUString aVal; 68cdf0e10cSrcweir if (m_bUseCatalog) 69cdf0e10cSrcweir { // do some special here for you database 70cdf0e10cSrcweir } 71cdf0e10cSrcweir 72cdf0e10cSrcweir return aVal; 73cdf0e10cSrcweir } 74cdf0e10cSrcweir // ------------------------------------------------------------------------- 75cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) 76cdf0e10cSrcweir { 77cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 78cdf0e10cSrcweir return nValue; 79cdf0e10cSrcweir } 80cdf0e10cSrcweir // ------------------------------------------------------------------------- 81cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) 82cdf0e10cSrcweir { 83cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 84cdf0e10cSrcweir return nValue; 85cdf0e10cSrcweir } 86cdf0e10cSrcweir // ------------------------------------------------------------------------- 87cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) 88cdf0e10cSrcweir { 89cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 90cdf0e10cSrcweir return nValue; 91cdf0e10cSrcweir } 92cdf0e10cSrcweir // ------------------------------------------------------------------------- 93cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) 94cdf0e10cSrcweir { 95cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 96cdf0e10cSrcweir return nValue; 97cdf0e10cSrcweir } 98cdf0e10cSrcweir // ------------------------------------------------------------------------- 99cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) 100cdf0e10cSrcweir { 101cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 102cdf0e10cSrcweir return nValue; 103cdf0e10cSrcweir } 104cdf0e10cSrcweir // ------------------------------------------------------------------------- 105cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) 106cdf0e10cSrcweir { 107cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 108cdf0e10cSrcweir return nValue; 109cdf0e10cSrcweir } 110cdf0e10cSrcweir // ------------------------------------------------------------------------- 111cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) 112cdf0e10cSrcweir { 113cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 114cdf0e10cSrcweir return nValue; 115cdf0e10cSrcweir } 116cdf0e10cSrcweir // ------------------------------------------------------------------------- 117cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) 118cdf0e10cSrcweir { 119cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 120cdf0e10cSrcweir return nValue; 121cdf0e10cSrcweir } 122cdf0e10cSrcweir // ------------------------------------------------------------------------- 123cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) 124cdf0e10cSrcweir { 125cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 126cdf0e10cSrcweir return nValue; 127cdf0e10cSrcweir } 128cdf0e10cSrcweir // ------------------------------------------------------------------------- 129cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) 130cdf0e10cSrcweir { 131cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 132cdf0e10cSrcweir return nValue; 133cdf0e10cSrcweir } 134cdf0e10cSrcweir // ------------------------------------------------------------------------- 135cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) 136cdf0e10cSrcweir { 137cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 138cdf0e10cSrcweir return nValue; 139cdf0e10cSrcweir } 140cdf0e10cSrcweir // ------------------------------------------------------------------------- 141cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) 142cdf0e10cSrcweir { 143cdf0e10cSrcweir // MaxTablesInSelect describes how many tables can participate in the FROM part of a given SELECT statement, 144cdf0e10cSrcweir // currently, the resultset/statement implementations can cope with one table only 145cdf0e10cSrcweir sal_Int32 nValue = 1; 146cdf0e10cSrcweir return nValue; 147cdf0e10cSrcweir } 148cdf0e10cSrcweir // ------------------------------------------------------------------------- 149cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) 150cdf0e10cSrcweir { 151cdf0e10cSrcweir return sal_False; 152cdf0e10cSrcweir } 153cdf0e10cSrcweir // ------------------------------------------------------------------------- 154cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 155cdf0e10cSrcweir { 156cdf0e10cSrcweir return sal_False; 157cdf0e10cSrcweir } 158cdf0e10cSrcweir // ------------------------------------------------------------------------- 159cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) 160cdf0e10cSrcweir { 161cdf0e10cSrcweir return sal_False; 162cdf0e10cSrcweir } 163cdf0e10cSrcweir // ------------------------------------------------------------------------- 164cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 165cdf0e10cSrcweir { 166cdf0e10cSrcweir return sal_False; 167cdf0e10cSrcweir } 168cdf0e10cSrcweir // ------------------------------------------------------------------------- 169cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) 170cdf0e10cSrcweir { 171cdf0e10cSrcweir return sal_False; 172cdf0e10cSrcweir } 173cdf0e10cSrcweir // ------------------------------------------------------------------------- 174cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 175cdf0e10cSrcweir { 176cdf0e10cSrcweir return sal_False; 177cdf0e10cSrcweir } 178cdf0e10cSrcweir // ------------------------------------------------------------------------- 179cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) 180cdf0e10cSrcweir { 181cdf0e10cSrcweir return sal_False; 182cdf0e10cSrcweir } 183cdf0e10cSrcweir // ------------------------------------------------------------------------- 184cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) 185cdf0e10cSrcweir { 186cdf0e10cSrcweir return sal_False; 187cdf0e10cSrcweir } 188cdf0e10cSrcweir // ------------------------------------------------------------------------- 189cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) 190cdf0e10cSrcweir { 191cdf0e10cSrcweir return sal_False; 192cdf0e10cSrcweir } 193cdf0e10cSrcweir // ------------------------------------------------------------------------- 194cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) 195cdf0e10cSrcweir { 196cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 197cdf0e10cSrcweir return nValue; 198cdf0e10cSrcweir } 199cdf0e10cSrcweir // ------------------------------------------------------------------------- 200cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) 201cdf0e10cSrcweir { 202cdf0e10cSrcweir return sal_False; 203cdf0e10cSrcweir } 204cdf0e10cSrcweir // ------------------------------------------------------------------------- 205cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) 206cdf0e10cSrcweir { 207cdf0e10cSrcweir ::rtl::OUString aVal; 208cdf0e10cSrcweir if (m_bUseCatalog) 209cdf0e10cSrcweir { 210cdf0e10cSrcweir } 211cdf0e10cSrcweir return aVal; 212cdf0e10cSrcweir } 213cdf0e10cSrcweir // ------------------------------------------------------------------------- 214cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) 215cdf0e10cSrcweir { 216cdf0e10cSrcweir // normally this is " 217cdf0e10cSrcweir ::rtl::OUString aVal = ::rtl::OUString::createFromAscii("\""); 218cdf0e10cSrcweir return aVal; 219cdf0e10cSrcweir } 220cdf0e10cSrcweir // ------------------------------------------------------------------------- 221cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) 222cdf0e10cSrcweir { 223cdf0e10cSrcweir ::rtl::OUString aVal; 224cdf0e10cSrcweir return aVal; 225cdf0e10cSrcweir } 226cdf0e10cSrcweir // ------------------------------------------------------------------------- 227cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) 228cdf0e10cSrcweir { 229cdf0e10cSrcweir return sal_False; 230cdf0e10cSrcweir } 231cdf0e10cSrcweir // ------------------------------------------------------------------------- 232cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException) 233cdf0e10cSrcweir { 234cdf0e10cSrcweir sal_Bool bValue = sal_False; 235cdf0e10cSrcweir if (m_bUseCatalog) 236cdf0e10cSrcweir { 237cdf0e10cSrcweir } 238cdf0e10cSrcweir return bValue; 239cdf0e10cSrcweir } 240cdf0e10cSrcweir // ------------------------------------------------------------------------- 241cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) 242cdf0e10cSrcweir { 243cdf0e10cSrcweir return sal_True; 244cdf0e10cSrcweir } 245cdf0e10cSrcweir // ------------------------------------------------------------------------- 246cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) 247cdf0e10cSrcweir { 248cdf0e10cSrcweir return sal_True; 249cdf0e10cSrcweir } 250cdf0e10cSrcweir // ------------------------------------------------------------------------- 251cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) 252cdf0e10cSrcweir { 253cdf0e10cSrcweir return sal_True; 254cdf0e10cSrcweir } 255cdf0e10cSrcweir // ------------------------------------------------------------------------- 256cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) 257cdf0e10cSrcweir { 258cdf0e10cSrcweir return sal_True; 259cdf0e10cSrcweir } 260cdf0e10cSrcweir // ------------------------------------------------------------------------- 261cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) 262cdf0e10cSrcweir { 263cdf0e10cSrcweir return sal_False; 264cdf0e10cSrcweir } 265cdf0e10cSrcweir // ------------------------------------------------------------------------- 266cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) 267cdf0e10cSrcweir { 268cdf0e10cSrcweir return sal_False; 269cdf0e10cSrcweir } 270cdf0e10cSrcweir // ------------------------------------------------------------------------- 271cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) 272cdf0e10cSrcweir { 273cdf0e10cSrcweir return sal_False; 274cdf0e10cSrcweir } 275cdf0e10cSrcweir // ------------------------------------------------------------------------- 276cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) 277cdf0e10cSrcweir { 278cdf0e10cSrcweir return sal_False; 279cdf0e10cSrcweir } 280cdf0e10cSrcweir // ------------------------------------------------------------------------- 281cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) 282cdf0e10cSrcweir { 283cdf0e10cSrcweir return sal_False; 284cdf0e10cSrcweir } 285cdf0e10cSrcweir // ------------------------------------------------------------------------- 286cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) 287cdf0e10cSrcweir { 288cdf0e10cSrcweir return sal_False; 289cdf0e10cSrcweir } 290cdf0e10cSrcweir // ------------------------------------------------------------------------- 291cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 ) throw(SQLException, RuntimeException) 292cdf0e10cSrcweir { 293cdf0e10cSrcweir return sal_False; 294cdf0e10cSrcweir } 295cdf0e10cSrcweir // ------------------------------------------------------------------------- 296cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException) 297cdf0e10cSrcweir { 298cdf0e10cSrcweir return sal_False; 299cdf0e10cSrcweir } 300cdf0e10cSrcweir // ------------------------------------------------------------------------- 301cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) 302cdf0e10cSrcweir { 303cdf0e10cSrcweir return sal_False; 304cdf0e10cSrcweir } 305cdf0e10cSrcweir // ------------------------------------------------------------------------- 306cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) 307cdf0e10cSrcweir { 308cdf0e10cSrcweir return sal_True; // should be supported at least 309cdf0e10cSrcweir } 310cdf0e10cSrcweir // ------------------------------------------------------------------------- 311cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) 312cdf0e10cSrcweir { 313cdf0e10cSrcweir return sal_False; 314cdf0e10cSrcweir } 315cdf0e10cSrcweir // ------------------------------------------------------------------------- 316cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) 317cdf0e10cSrcweir { 318cdf0e10cSrcweir return sal_False; 319cdf0e10cSrcweir } 320cdf0e10cSrcweir // ------------------------------------------------------------------------- 321cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException) 322cdf0e10cSrcweir { 323cdf0e10cSrcweir return sal_False; 324cdf0e10cSrcweir } 325cdf0e10cSrcweir // ------------------------------------------------------------------------- 326cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) 327cdf0e10cSrcweir { 328cdf0e10cSrcweir return sal_False; 329cdf0e10cSrcweir } 330cdf0e10cSrcweir // ------------------------------------------------------------------------- 331cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) 332cdf0e10cSrcweir { 333cdf0e10cSrcweir return sal_False; 334cdf0e10cSrcweir } 335cdf0e10cSrcweir // ------------------------------------------------------------------------- 336cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException) 337cdf0e10cSrcweir { 338cdf0e10cSrcweir return sal_False; 339cdf0e10cSrcweir } 340cdf0e10cSrcweir // ------------------------------------------------------------------------- 341cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) 342cdf0e10cSrcweir { 343cdf0e10cSrcweir return sal_False; 344cdf0e10cSrcweir } 345cdf0e10cSrcweir // ------------------------------------------------------------------------- 346cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException) 347cdf0e10cSrcweir { 348cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 349cdf0e10cSrcweir return nValue; 350cdf0e10cSrcweir } 351cdf0e10cSrcweir // ------------------------------------------------------------------------- 352cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) 353cdf0e10cSrcweir { 354cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 355cdf0e10cSrcweir return nValue; 356cdf0e10cSrcweir } 357cdf0e10cSrcweir // ------------------------------------------------------------------------- 358cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) 359cdf0e10cSrcweir { 360cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 361cdf0e10cSrcweir return nValue; 362cdf0e10cSrcweir } 363cdf0e10cSrcweir // ------------------------------------------------------------------------- 364cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) 365cdf0e10cSrcweir { 366cdf0e10cSrcweir return sal_False; 367cdf0e10cSrcweir } 368cdf0e10cSrcweir // ------------------------------------------------------------------------- 369cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) 370cdf0e10cSrcweir { 371cdf0e10cSrcweir return sal_False; 372cdf0e10cSrcweir } 373cdf0e10cSrcweir // ------------------------------------------------------------------------- 374cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) 375cdf0e10cSrcweir { 376cdf0e10cSrcweir return sal_False; 377cdf0e10cSrcweir } 378cdf0e10cSrcweir // ------------------------------------------------------------------------- 379cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) 380cdf0e10cSrcweir { 381cdf0e10cSrcweir return sal_False; 382cdf0e10cSrcweir } 383cdf0e10cSrcweir // ------------------------------------------------------------------------- 384cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) 385cdf0e10cSrcweir { 386cdf0e10cSrcweir return sal_False; 387cdf0e10cSrcweir } 388cdf0e10cSrcweir // ------------------------------------------------------------------------- 389cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) 390cdf0e10cSrcweir { 391cdf0e10cSrcweir // for the moment, we have read-only addresses, but this might change in the future 392cdf0e10cSrcweir return sal_True; 393cdf0e10cSrcweir } 394cdf0e10cSrcweir // ------------------------------------------------------------------------- 395cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) 396cdf0e10cSrcweir { 397cdf0e10cSrcweir return sal_False; 398cdf0e10cSrcweir } 399cdf0e10cSrcweir // ------------------------------------------------------------------------- 400cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) 401cdf0e10cSrcweir { 402cdf0e10cSrcweir return sal_False; 403cdf0e10cSrcweir } 404cdf0e10cSrcweir // ------------------------------------------------------------------------- 405cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) 406cdf0e10cSrcweir { 407cdf0e10cSrcweir return sal_False; 408cdf0e10cSrcweir } 409cdf0e10cSrcweir // ------------------------------------------------------------------------- 410cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) 411cdf0e10cSrcweir { 412cdf0e10cSrcweir return sal_False; 413cdf0e10cSrcweir } 414cdf0e10cSrcweir // ------------------------------------------------------------------------- 415cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) 416cdf0e10cSrcweir { 417cdf0e10cSrcweir return sal_False; 418cdf0e10cSrcweir } 419cdf0e10cSrcweir // ------------------------------------------------------------------------- 420cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) 421cdf0e10cSrcweir { 422cdf0e10cSrcweir return sal_False; 423cdf0e10cSrcweir } 424cdf0e10cSrcweir // ------------------------------------------------------------------------- 425cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsConvert( sal_Int32, sal_Int32 ) throw(SQLException, RuntimeException) 426cdf0e10cSrcweir { 427cdf0e10cSrcweir return sal_False; 428cdf0e10cSrcweir } 429cdf0e10cSrcweir // ------------------------------------------------------------------------- 430cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) 431cdf0e10cSrcweir { 432cdf0e10cSrcweir return sal_False; 433cdf0e10cSrcweir } 434cdf0e10cSrcweir // ------------------------------------------------------------------------- 435cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) 436cdf0e10cSrcweir { 437cdf0e10cSrcweir return sal_False; 438cdf0e10cSrcweir } 439cdf0e10cSrcweir // ------------------------------------------------------------------------- 440cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) 441cdf0e10cSrcweir { 442cdf0e10cSrcweir return sal_False; 443cdf0e10cSrcweir } 444cdf0e10cSrcweir // ------------------------------------------------------------------------- 445cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) 446cdf0e10cSrcweir { 447cdf0e10cSrcweir return sal_False; 448cdf0e10cSrcweir } 449cdf0e10cSrcweir // ------------------------------------------------------------------------- 450cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) 451cdf0e10cSrcweir { 452cdf0e10cSrcweir return sal_False; 453cdf0e10cSrcweir } 454cdf0e10cSrcweir // ------------------------------------------------------------------------- 455cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) 456cdf0e10cSrcweir { 457cdf0e10cSrcweir return sal_False; 458cdf0e10cSrcweir } 459cdf0e10cSrcweir // ------------------------------------------------------------------------- 460cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) 461cdf0e10cSrcweir { 462cdf0e10cSrcweir return sal_False; 463cdf0e10cSrcweir } 464cdf0e10cSrcweir // ------------------------------------------------------------------------- 465cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) 466cdf0e10cSrcweir { 467cdf0e10cSrcweir return sal_False; 468cdf0e10cSrcweir } 469cdf0e10cSrcweir // ------------------------------------------------------------------------- 470cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) 471cdf0e10cSrcweir { 472cdf0e10cSrcweir return sal_False; 473cdf0e10cSrcweir } 474cdf0e10cSrcweir // ------------------------------------------------------------------------- 475cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) 476cdf0e10cSrcweir { 477cdf0e10cSrcweir return sal_False; 478cdf0e10cSrcweir } 479cdf0e10cSrcweir // ------------------------------------------------------------------------- 480cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) 481cdf0e10cSrcweir { 482cdf0e10cSrcweir return sal_False; 483cdf0e10cSrcweir } 484cdf0e10cSrcweir // ------------------------------------------------------------------------- 485cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 486cdf0e10cSrcweir { 487cdf0e10cSrcweir return sal_False; 488cdf0e10cSrcweir } 489cdf0e10cSrcweir // ------------------------------------------------------------------------- 490cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) 491cdf0e10cSrcweir { 492cdf0e10cSrcweir return sal_False; 493cdf0e10cSrcweir } 494cdf0e10cSrcweir // ------------------------------------------------------------------------- 495cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) 496cdf0e10cSrcweir { 497cdf0e10cSrcweir return sal_False; 498cdf0e10cSrcweir } 499cdf0e10cSrcweir // ------------------------------------------------------------------------- 500cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) 501cdf0e10cSrcweir { 502cdf0e10cSrcweir return sal_False; 503cdf0e10cSrcweir } 504cdf0e10cSrcweir // ------------------------------------------------------------------------- 505cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) 506cdf0e10cSrcweir { 507cdf0e10cSrcweir return sal_False; 508cdf0e10cSrcweir } 509cdf0e10cSrcweir // ------------------------------------------------------------------------- 510cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) 511cdf0e10cSrcweir { 512cdf0e10cSrcweir return sal_False; 513cdf0e10cSrcweir } 514cdf0e10cSrcweir // ------------------------------------------------------------------------- 515cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) 516cdf0e10cSrcweir { 517cdf0e10cSrcweir return sal_False; 518cdf0e10cSrcweir } 519cdf0e10cSrcweir // ------------------------------------------------------------------------- 520cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) 521cdf0e10cSrcweir { 522cdf0e10cSrcweir return sal_False; 523cdf0e10cSrcweir } 524cdf0e10cSrcweir // ------------------------------------------------------------------------- 525cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) 526cdf0e10cSrcweir { 527cdf0e10cSrcweir return sal_False; 528cdf0e10cSrcweir } 529cdf0e10cSrcweir // ------------------------------------------------------------------------- 530cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) 531cdf0e10cSrcweir { 532cdf0e10cSrcweir return sal_False; 533cdf0e10cSrcweir } 534cdf0e10cSrcweir // ------------------------------------------------------------------------- 535cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) 536cdf0e10cSrcweir { 537cdf0e10cSrcweir return sal_False; 538cdf0e10cSrcweir } 539cdf0e10cSrcweir // ------------------------------------------------------------------------- 540cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) 541cdf0e10cSrcweir { 542cdf0e10cSrcweir return sal_False; 543cdf0e10cSrcweir } 544cdf0e10cSrcweir // ------------------------------------------------------------------------- 545cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) 546cdf0e10cSrcweir { 547cdf0e10cSrcweir return sal_False; 548cdf0e10cSrcweir } 549cdf0e10cSrcweir // ------------------------------------------------------------------------- 550cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) 551cdf0e10cSrcweir { 552cdf0e10cSrcweir return sal_False; 553cdf0e10cSrcweir } 554cdf0e10cSrcweir // ------------------------------------------------------------------------- 555cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) 556cdf0e10cSrcweir { 557cdf0e10cSrcweir return sal_False; 558cdf0e10cSrcweir } 559cdf0e10cSrcweir // ------------------------------------------------------------------------- 560cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) 561cdf0e10cSrcweir { 562cdf0e10cSrcweir // if someday we support more than the default address book, 563cdf0e10cSrcweir // this method should return the URL which was used to create it 564cdf0e10cSrcweir ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:address:macab:"); 565cdf0e10cSrcweir return aValue; 566cdf0e10cSrcweir } 567cdf0e10cSrcweir // ------------------------------------------------------------------------- 568cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) 569cdf0e10cSrcweir { 570cdf0e10cSrcweir ::rtl::OUString aValue; 571cdf0e10cSrcweir return aValue; 572cdf0e10cSrcweir } 573cdf0e10cSrcweir // ------------------------------------------------------------------------- 574cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) 575cdf0e10cSrcweir { 576cdf0e10cSrcweir ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("macab"); 577cdf0e10cSrcweir return aValue; 578cdf0e10cSrcweir } 579cdf0e10cSrcweir // ------------------------------------------------------------------------- 580cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) 581cdf0e10cSrcweir { 582cdf0e10cSrcweir ::rtl::OUString aValue = ::rtl::OUString::createFromAscii(MACAB_DRIVER_VERSION); 583cdf0e10cSrcweir return aValue; 584cdf0e10cSrcweir } 585cdf0e10cSrcweir // ------------------------------------------------------------------------- 586cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) 587cdf0e10cSrcweir { 588cdf0e10cSrcweir ::rtl::OUString aValue; 589cdf0e10cSrcweir return aValue; 590cdf0e10cSrcweir } 591cdf0e10cSrcweir // ------------------------------------------------------------------------- 592cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) 593cdf0e10cSrcweir { 594cdf0e10cSrcweir ::rtl::OUString aValue; 595cdf0e10cSrcweir return aValue; 596cdf0e10cSrcweir } 597cdf0e10cSrcweir // ------------------------------------------------------------------------- 598cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) 599cdf0e10cSrcweir { 600cdf0e10cSrcweir ::rtl::OUString aValue; 601cdf0e10cSrcweir return aValue; 602cdf0e10cSrcweir } 603cdf0e10cSrcweir // ------------------------------------------------------------------------- 604cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) 605cdf0e10cSrcweir { 606cdf0e10cSrcweir ::rtl::OUString aValue; 607cdf0e10cSrcweir return aValue; 608cdf0e10cSrcweir } 609cdf0e10cSrcweir // ------------------------------------------------------------------------- 610cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) 611cdf0e10cSrcweir { 612cdf0e10cSrcweir return MACAB_DRIVER_VERSION_MAJOR; 613cdf0e10cSrcweir } 614cdf0e10cSrcweir // ------------------------------------------------------------------------- 615cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) 616cdf0e10cSrcweir { 617cdf0e10cSrcweir return TransactionIsolation::NONE; 618cdf0e10cSrcweir } 619cdf0e10cSrcweir // ------------------------------------------------------------------------- 620cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) 621cdf0e10cSrcweir { 622cdf0e10cSrcweir return MACAB_DRIVER_VERSION_MINOR; 623cdf0e10cSrcweir } 624cdf0e10cSrcweir // ------------------------------------------------------------------------- 625cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) 626cdf0e10cSrcweir { 627cdf0e10cSrcweir ::rtl::OUString aValue; 628cdf0e10cSrcweir return aValue; 629cdf0e10cSrcweir } 630cdf0e10cSrcweir // ------------------------------------------------------------------------- 631cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) 632cdf0e10cSrcweir { 633cdf0e10cSrcweir ::rtl::OUString aValue; 634cdf0e10cSrcweir return aValue; 635cdf0e10cSrcweir } 636cdf0e10cSrcweir // ------------------------------------------------------------------------- 637cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) 638cdf0e10cSrcweir { 639cdf0e10cSrcweir return ::rtl::OUString(); 640cdf0e10cSrcweir } 641cdf0e10cSrcweir // ------------------------------------------------------------------------- 642cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) 643cdf0e10cSrcweir { 644cdf0e10cSrcweir return ::rtl::OUString(); 645cdf0e10cSrcweir } 646cdf0e10cSrcweir // ------------------------------------------------------------------------- 647cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) 648cdf0e10cSrcweir { 649cdf0e10cSrcweir return ::rtl::OUString(); 650cdf0e10cSrcweir } 651cdf0e10cSrcweir // ------------------------------------------------------------------------- 652cdf0e10cSrcweir ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) 653cdf0e10cSrcweir { 654cdf0e10cSrcweir return ::rtl::OUString(); 655cdf0e10cSrcweir } 656cdf0e10cSrcweir // ------------------------------------------------------------------------- 657cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) 658cdf0e10cSrcweir { 659cdf0e10cSrcweir return sal_False; 660cdf0e10cSrcweir } 661cdf0e10cSrcweir // ------------------------------------------------------------------------- 662cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) 663cdf0e10cSrcweir { 664cdf0e10cSrcweir return sal_False; 665cdf0e10cSrcweir } 666cdf0e10cSrcweir // ------------------------------------------------------------------------- 667cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) 668cdf0e10cSrcweir { 669cdf0e10cSrcweir return sal_True; 670cdf0e10cSrcweir } 671cdf0e10cSrcweir // ------------------------------------------------------------------------- 672cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) 673cdf0e10cSrcweir { 674cdf0e10cSrcweir return sal_False; 675cdf0e10cSrcweir } 676cdf0e10cSrcweir // ------------------------------------------------------------------------- 677cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) 678cdf0e10cSrcweir { 679cdf0e10cSrcweir return sal_False; 680cdf0e10cSrcweir } 681cdf0e10cSrcweir // ------------------------------------------------------------------------- 682cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) 683cdf0e10cSrcweir { 684cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 685cdf0e10cSrcweir return nValue; 686cdf0e10cSrcweir } 687cdf0e10cSrcweir // ------------------------------------------------------------------------- 688cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) 689cdf0e10cSrcweir { 690cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 691cdf0e10cSrcweir return nValue; 692cdf0e10cSrcweir } 693cdf0e10cSrcweir // ------------------------------------------------------------------------- 694cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) 695cdf0e10cSrcweir { 696cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 697cdf0e10cSrcweir return nValue; 698cdf0e10cSrcweir } 699cdf0e10cSrcweir // ------------------------------------------------------------------------- 700cdf0e10cSrcweir sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) 701cdf0e10cSrcweir { 702cdf0e10cSrcweir sal_Int32 nValue = 0; // 0 means no limit 703cdf0e10cSrcweir return nValue; 704cdf0e10cSrcweir } 705cdf0e10cSrcweir // ------------------------------------------------------------------------- 706cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) 707cdf0e10cSrcweir { 708cdf0e10cSrcweir switch (setType) 709cdf0e10cSrcweir { 710cdf0e10cSrcweir case ResultSetType::FORWARD_ONLY: 711cdf0e10cSrcweir case ResultSetType::SCROLL_INSENSITIVE: 712cdf0e10cSrcweir return sal_True; 713cdf0e10cSrcweir } 714cdf0e10cSrcweir return sal_False; 715cdf0e10cSrcweir } 716cdf0e10cSrcweir // ------------------------------------------------------------------------- 717cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 ) throw(SQLException, RuntimeException) 718cdf0e10cSrcweir { 719cdf0e10cSrcweir switch (setType) 720cdf0e10cSrcweir { 721cdf0e10cSrcweir case ResultSetType::FORWARD_ONLY: 722cdf0e10cSrcweir case ResultSetType::SCROLL_INSENSITIVE: 723cdf0e10cSrcweir return sal_True; 724cdf0e10cSrcweir } 725cdf0e10cSrcweir return sal_False; 726cdf0e10cSrcweir } 727cdf0e10cSrcweir // ------------------------------------------------------------------------- 728cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::ownUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) 729cdf0e10cSrcweir { 730cdf0e10cSrcweir return sal_False; 731cdf0e10cSrcweir } 732cdf0e10cSrcweir // ------------------------------------------------------------------------- 733cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::ownDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) 734cdf0e10cSrcweir { 735cdf0e10cSrcweir return sal_False; 736cdf0e10cSrcweir } 737cdf0e10cSrcweir // ------------------------------------------------------------------------- 738cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::ownInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) 739cdf0e10cSrcweir { 740cdf0e10cSrcweir return sal_False; 741cdf0e10cSrcweir } 742cdf0e10cSrcweir // ------------------------------------------------------------------------- 743cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::othersUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) 744cdf0e10cSrcweir { 745cdf0e10cSrcweir return sal_False; 746cdf0e10cSrcweir } 747cdf0e10cSrcweir // ------------------------------------------------------------------------- 748cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::othersDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) 749cdf0e10cSrcweir { 750cdf0e10cSrcweir return sal_False; 751cdf0e10cSrcweir } 752cdf0e10cSrcweir // ------------------------------------------------------------------------- 753cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::othersInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) 754cdf0e10cSrcweir { 755cdf0e10cSrcweir return sal_False; 756cdf0e10cSrcweir } 757cdf0e10cSrcweir // ------------------------------------------------------------------------- 758cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::updatesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) 759cdf0e10cSrcweir { 760cdf0e10cSrcweir return sal_False; 761cdf0e10cSrcweir } 762cdf0e10cSrcweir // ------------------------------------------------------------------------- 763cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::deletesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) 764cdf0e10cSrcweir { 765cdf0e10cSrcweir return sal_False; 766cdf0e10cSrcweir } 767cdf0e10cSrcweir // ------------------------------------------------------------------------- 768cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::insertsAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) 769cdf0e10cSrcweir { 770cdf0e10cSrcweir return sal_False; 771cdf0e10cSrcweir } 772cdf0e10cSrcweir // ------------------------------------------------------------------------- 773cdf0e10cSrcweir sal_Bool SAL_CALL MacabDatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) 774cdf0e10cSrcweir { 775cdf0e10cSrcweir return sal_False; 776cdf0e10cSrcweir } 777cdf0e10cSrcweir // ------------------------------------------------------------------------- 778cdf0e10cSrcweir Reference< XConnection > SAL_CALL MacabDatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException) 779cdf0e10cSrcweir { 780cdf0e10cSrcweir return (Reference< XConnection >) m_xConnection.get(); 781cdf0e10cSrcweir } 782cdf0e10cSrcweir // ------------------------------------------------------------------------- 783cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) 784cdf0e10cSrcweir { 785cdf0e10cSrcweir ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTableTypes); 786cdf0e10cSrcweir Reference< XResultSet > xRef = pResult; 787cdf0e10cSrcweir 788cdf0e10cSrcweir static ODatabaseMetaDataResultSet::ORows aRows; 789cdf0e10cSrcweir static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); 790cdf0e10cSrcweir 791cdf0e10cSrcweir if (aRows.empty()) 792cdf0e10cSrcweir { 793cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORow aRow(2); 794cdf0e10cSrcweir aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); 795cdf0e10cSrcweir aRow[1] = new ORowSetValueDecorator(aTable); 796cdf0e10cSrcweir aRows.push_back(aRow); 797cdf0e10cSrcweir } 798cdf0e10cSrcweir pResult->setRows(aRows); 799cdf0e10cSrcweir return xRef; 800cdf0e10cSrcweir } 801cdf0e10cSrcweir // ------------------------------------------------------------------------- 802cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) throw(SQLException, RuntimeException) 803cdf0e10cSrcweir { 804cdf0e10cSrcweir ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTypeInfo); 805cdf0e10cSrcweir Reference< XResultSet > xRef = pResult; 806cdf0e10cSrcweir 807cdf0e10cSrcweir static ODatabaseMetaDataResultSet::ORows aRows; 808cdf0e10cSrcweir if (aRows.empty()) 809cdf0e10cSrcweir { 810cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORow aRow(19); 811cdf0e10cSrcweir 812cdf0e10cSrcweir // We support four types: char, timestamp, integer, float 813cdf0e10cSrcweir aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); 814cdf0e10cSrcweir aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR")); 815cdf0e10cSrcweir aRow[2] = new ORowSetValueDecorator(DataType::CHAR); 816cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator((sal_Int32) 254); 817cdf0e10cSrcweir aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); 818cdf0e10cSrcweir aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); 819cdf0e10cSrcweir aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue(); 820cdf0e10cSrcweir aRow[7] = new ORowSetValueDecorator((sal_Int32) ColumnValue::NULLABLE); 821cdf0e10cSrcweir aRow[8] = ODatabaseMetaDataResultSet::get1Value(); 822cdf0e10cSrcweir aRow[9] = new ORowSetValueDecorator((sal_Int32) ColumnSearch::CHAR); 823cdf0e10cSrcweir aRow[10] = ODatabaseMetaDataResultSet::get1Value(); 824cdf0e10cSrcweir aRow[11] = ODatabaseMetaDataResultSet::get0Value(); 825cdf0e10cSrcweir aRow[12] = ODatabaseMetaDataResultSet::get0Value(); 826cdf0e10cSrcweir aRow[13] = ODatabaseMetaDataResultSet::getEmptyValue(); 827cdf0e10cSrcweir aRow[14] = ODatabaseMetaDataResultSet::get0Value(); 828cdf0e10cSrcweir aRow[15] = ODatabaseMetaDataResultSet::get0Value(); 829cdf0e10cSrcweir aRow[16] = ODatabaseMetaDataResultSet::getEmptyValue(); 830cdf0e10cSrcweir aRow[17] = ODatabaseMetaDataResultSet::getEmptyValue(); 831cdf0e10cSrcweir aRow[18] = new ORowSetValueDecorator((sal_Int32) 10); 832cdf0e10cSrcweir 833cdf0e10cSrcweir aRows.push_back(aRow); 834cdf0e10cSrcweir 835cdf0e10cSrcweir aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); 836cdf0e10cSrcweir aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); 837cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator((sal_Int32)19); 838cdf0e10cSrcweir aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); 839cdf0e10cSrcweir aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); 840cdf0e10cSrcweir aRows.push_back(aRow); 841cdf0e10cSrcweir 842cdf0e10cSrcweir aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER")); 843cdf0e10cSrcweir aRow[2] = new ORowSetValueDecorator(DataType::INTEGER); 844cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator((sal_Int32)20); 845cdf0e10cSrcweir aRow[15] = new ORowSetValueDecorator((sal_Int32)20); 846cdf0e10cSrcweir aRows.push_back(aRow); 847cdf0e10cSrcweir 848cdf0e10cSrcweir aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("FLOAT")); 849cdf0e10cSrcweir aRow[2] = new ORowSetValueDecorator(DataType::FLOAT); 850cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator((sal_Int32)20); 851cdf0e10cSrcweir aRow[15] = new ORowSetValueDecorator((sal_Int32)15); 852cdf0e10cSrcweir aRows.push_back(aRow); 853cdf0e10cSrcweir } 854cdf0e10cSrcweir pResult->setRows(aRows); 855cdf0e10cSrcweir return xRef; 856cdf0e10cSrcweir } 857cdf0e10cSrcweir // ------------------------------------------------------------------------- 858cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) 859cdf0e10cSrcweir { 860cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCatalogs ); 861cdf0e10cSrcweir } 862cdf0e10cSrcweir // ----------------------------------------------------------------------------- 863cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) 864cdf0e10cSrcweir { 865cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas ); 866cdf0e10cSrcweir } 867cdf0e10cSrcweir // ------------------------------------------------------------------------- 868cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumnPrivileges( 869cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString&, 870cdf0e10cSrcweir const ::rtl::OUString& ) throw(SQLException, RuntimeException) 871cdf0e10cSrcweir { 872cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); 873cdf0e10cSrcweir } 874cdf0e10cSrcweir // ------------------------------------------------------------------------- 875cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( 876cdf0e10cSrcweir const Any&, 877cdf0e10cSrcweir const ::rtl::OUString&, 878cdf0e10cSrcweir const ::rtl::OUString& tableNamePattern, 879cdf0e10cSrcweir const ::rtl::OUString& columnNamePattern) throw(SQLException, RuntimeException) 880cdf0e10cSrcweir { 881cdf0e10cSrcweir ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns); 882cdf0e10cSrcweir Reference< XResultSet > xRef = pResult; 883cdf0e10cSrcweir MacabRecords *aRecords; 884cdf0e10cSrcweir ::rtl::OUString sTableName; 885cdf0e10cSrcweir 886cdf0e10cSrcweir aRecords = m_xConnection->getAddressBook()->getMacabRecordsMatch(tableNamePattern); 887cdf0e10cSrcweir 888cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORows aRows; 889cdf0e10cSrcweir if(aRecords != NULL) 890cdf0e10cSrcweir { 891cdf0e10cSrcweir MacabHeader *aHeader = aRecords->getHeader(); 892cdf0e10cSrcweir sTableName = aRecords->getName(); 893cdf0e10cSrcweir 894cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORow aRow(19); 895cdf0e10cSrcweir 896cdf0e10cSrcweir aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); 897cdf0e10cSrcweir aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue(); 898cdf0e10cSrcweir aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue(); 899cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator(sTableName); 900cdf0e10cSrcweir aRow[8] = ODatabaseMetaDataResultSet::getEmptyValue(); 901cdf0e10cSrcweir aRow[9] = ODatabaseMetaDataResultSet::get0Value(); 902cdf0e10cSrcweir aRow[10] = new ORowSetValueDecorator((sal_Int32) 10); 903cdf0e10cSrcweir aRow[11] = ODatabaseMetaDataResultSet::get1Value(); 904cdf0e10cSrcweir aRow[12] = ODatabaseMetaDataResultSet::getEmptyValue(); 905cdf0e10cSrcweir aRow[13] = ODatabaseMetaDataResultSet::getEmptyValue(); 906cdf0e10cSrcweir aRow[14] = ODatabaseMetaDataResultSet::getEmptyValue(); 907cdf0e10cSrcweir aRow[15] = ODatabaseMetaDataResultSet::getEmptyValue(); 908cdf0e10cSrcweir aRow[16] = new ORowSetValueDecorator((sal_Int32) 254); 909cdf0e10cSrcweir aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); 910cdf0e10cSrcweir 911cdf0e10cSrcweir sal_Int32 nPosition = 1; 912cdf0e10cSrcweir ::rtl::OUString sName; 913cdf0e10cSrcweir 914cdf0e10cSrcweir MacabHeader::iterator aField; 915cdf0e10cSrcweir 916cdf0e10cSrcweir for ( aField = aHeader->begin(); 917cdf0e10cSrcweir aField != aHeader->end(); 918cdf0e10cSrcweir ++aField, ++nPosition) 919cdf0e10cSrcweir { 920cdf0e10cSrcweir 921cdf0e10cSrcweir sName = CFStringToOUString((CFStringRef) (*aField)->value); 922cdf0e10cSrcweir if (match(columnNamePattern, sName, '\0')) 923cdf0e10cSrcweir { 924cdf0e10cSrcweir aRow[4] = new ORowSetValueDecorator(sName); 925cdf0e10cSrcweir aRow[17] = new ORowSetValueDecorator(nPosition); 926cdf0e10cSrcweir switch((*aField)->type) 927cdf0e10cSrcweir { 928cdf0e10cSrcweir case kABStringProperty: 929cdf0e10cSrcweir aRow[5] = new ORowSetValueDecorator(DataType::CHAR); 930cdf0e10cSrcweir aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR")); 931cdf0e10cSrcweir aRow[7] = new ORowSetValueDecorator((sal_Int32) 256); 932cdf0e10cSrcweir aRows.push_back(aRow); 933cdf0e10cSrcweir break; 934cdf0e10cSrcweir case kABDateProperty: 935cdf0e10cSrcweir aRow[5] = new ORowSetValueDecorator(DataType::TIMESTAMP); 936cdf0e10cSrcweir aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); 937cdf0e10cSrcweir aRows.push_back(aRow); 938cdf0e10cSrcweir break; 939cdf0e10cSrcweir case kABIntegerProperty: 940cdf0e10cSrcweir aRow[5] = new ORowSetValueDecorator(DataType::INTEGER); 941cdf0e10cSrcweir aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER")); 942cdf0e10cSrcweir aRow[7] = new ORowSetValueDecorator((sal_Int32) 20); 943cdf0e10cSrcweir aRows.push_back(aRow); 944cdf0e10cSrcweir break; 945cdf0e10cSrcweir case kABRealProperty: 946cdf0e10cSrcweir aRow[5] = new ORowSetValueDecorator(DataType::FLOAT); 947cdf0e10cSrcweir aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("FLOAT")); 948cdf0e10cSrcweir aRow[7] = new ORowSetValueDecorator((sal_Int32) 15); 949cdf0e10cSrcweir aRows.push_back(aRow); 950cdf0e10cSrcweir break; 951cdf0e10cSrcweir default: 952cdf0e10cSrcweir ; 953cdf0e10cSrcweir // shouldn't happen -- throw an error...? 954cdf0e10cSrcweir } 955cdf0e10cSrcweir } 956cdf0e10cSrcweir } 957cdf0e10cSrcweir } 958cdf0e10cSrcweir pResult->setRows(aRows); 959cdf0e10cSrcweir return xRef; 960cdf0e10cSrcweir } 961cdf0e10cSrcweir // ------------------------------------------------------------------------- 962cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( 963cdf0e10cSrcweir const Any&, 964cdf0e10cSrcweir const ::rtl::OUString&, 965cdf0e10cSrcweir const ::rtl::OUString&, 966cdf0e10cSrcweir const Sequence< ::rtl::OUString >& types) throw(SQLException, RuntimeException) 967cdf0e10cSrcweir { 968cdf0e10cSrcweir ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTables); 969cdf0e10cSrcweir Reference< XResultSet > xRef = pResult; 970cdf0e10cSrcweir 971cdf0e10cSrcweir // check whether we have tables in the requested types 972cdf0e10cSrcweir // for the moment, we answer only the "TABLE" table type 973cdf0e10cSrcweir // when no types are given at all, we return all the tables 974cdf0e10cSrcweir static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); 975cdf0e10cSrcweir sal_Bool bTableFound = sal_False; 976cdf0e10cSrcweir const ::rtl::OUString* p = types.getConstArray(), 977cdf0e10cSrcweir * pEnd = p + types.getLength(); 978cdf0e10cSrcweir 979cdf0e10cSrcweir if (p == pEnd) 980cdf0e10cSrcweir { 981cdf0e10cSrcweir bTableFound = sal_True; 982cdf0e10cSrcweir } 983cdf0e10cSrcweir else while (p < pEnd) 984cdf0e10cSrcweir { 985cdf0e10cSrcweir if (match(*p, aTable, '\0')) 986cdf0e10cSrcweir { 987cdf0e10cSrcweir bTableFound = sal_True; 988cdf0e10cSrcweir break; 989cdf0e10cSrcweir } 990cdf0e10cSrcweir p++; 991cdf0e10cSrcweir } 992cdf0e10cSrcweir if (!bTableFound) 993cdf0e10cSrcweir return xRef; 994cdf0e10cSrcweir 995cdf0e10cSrcweir static ODatabaseMetaDataResultSet::ORows aRows; 996cdf0e10cSrcweir 997cdf0e10cSrcweir if (aRows.empty()) 998cdf0e10cSrcweir { 999cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORow aRow(6); 1000cdf0e10cSrcweir 1001cdf0e10cSrcweir MacabRecords *xRecords = m_xConnection->getAddressBook()->getMacabRecords(); 1002cdf0e10cSrcweir ::std::vector<MacabGroup *> xGroups = m_xConnection->getAddressBook()->getMacabGroups(); 1003cdf0e10cSrcweir sal_Int32 i, nGroups; 1004cdf0e10cSrcweir nGroups = xGroups.size(); 1005cdf0e10cSrcweir 1006cdf0e10cSrcweir aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); 1007cdf0e10cSrcweir aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue(); 1008cdf0e10cSrcweir aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue(); 1009cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator(xRecords->getName()); 1010cdf0e10cSrcweir aRow[4] = new ORowSetValueDecorator(aTable); 1011cdf0e10cSrcweir aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); 1012cdf0e10cSrcweir aRows.push_back(aRow); 1013cdf0e10cSrcweir 1014cdf0e10cSrcweir for(i = 0; i < nGroups; i++) 1015cdf0e10cSrcweir { 1016cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator(xGroups[i]->getName()); 1017cdf0e10cSrcweir aRows.push_back(aRow); 1018cdf0e10cSrcweir } 1019cdf0e10cSrcweir } 1020cdf0e10cSrcweir pResult->setRows(aRows); 1021cdf0e10cSrcweir return xRef; 1022cdf0e10cSrcweir } 1023cdf0e10cSrcweir // ------------------------------------------------------------------------- 1024cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedureColumns( 1025cdf0e10cSrcweir const Any&, const ::rtl::OUString&, 1026cdf0e10cSrcweir const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1027cdf0e10cSrcweir { 1028cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); 1029cdf0e10cSrcweir } 1030cdf0e10cSrcweir // ------------------------------------------------------------------------- 1031cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedures( 1032cdf0e10cSrcweir const Any&, const ::rtl::OUString&, 1033cdf0e10cSrcweir const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1034cdf0e10cSrcweir { 1035cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); 1036cdf0e10cSrcweir } 1037cdf0e10cSrcweir // ------------------------------------------------------------------------- 1038cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( 1039cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) 1040cdf0e10cSrcweir { 1041cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eVersionColumns ); 1042cdf0e10cSrcweir 1043cdf0e10cSrcweir ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns); 1044cdf0e10cSrcweir Reference< XResultSet > xRef = pResult; 1045cdf0e10cSrcweir 1046cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORows aRows; 1047cdf0e10cSrcweir 1048cdf0e10cSrcweir if (m_xConnection->getAddressBook()->getMacabRecords(table) != NULL) 1049cdf0e10cSrcweir { 1050cdf0e10cSrcweir ODatabaseMetaDataResultSet::ORow aRow( 9 ); 1051cdf0e10cSrcweir 1052cdf0e10cSrcweir ::rtl::OUString sName = CFStringToOUString(kABModificationDateProperty); 1053cdf0e10cSrcweir 1054cdf0e10cSrcweir aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); 1055cdf0e10cSrcweir aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue(); 1056cdf0e10cSrcweir aRow[2] = new ORowSetValueDecorator(sName); 1057cdf0e10cSrcweir aRow[3] = new ORowSetValueDecorator(DataType::TIMESTAMP); 1058cdf0e10cSrcweir aRow[4] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); 1059cdf0e10cSrcweir 1060cdf0e10cSrcweir aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); 1061cdf0e10cSrcweir aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue(); 1062cdf0e10cSrcweir aRow[7] = ODatabaseMetaDataResultSet::getEmptyValue(); 1063cdf0e10cSrcweir aRow[8] = ODatabaseMetaDataResultSet::getEmptyValue(); 1064cdf0e10cSrcweir 1065cdf0e10cSrcweir aRows.push_back(aRow); 1066cdf0e10cSrcweir } 1067cdf0e10cSrcweir pResult->setRows(aRows); 1068cdf0e10cSrcweir return xRef; 1069cdf0e10cSrcweir } 1070cdf0e10cSrcweir // ------------------------------------------------------------------------- 1071cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getExportedKeys( 1072cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1073cdf0e10cSrcweir { 1074cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); 1075cdf0e10cSrcweir } 1076cdf0e10cSrcweir // ------------------------------------------------------------------------- 1077cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getImportedKeys( 1078cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1079cdf0e10cSrcweir { 1080cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); 1081cdf0e10cSrcweir } 1082cdf0e10cSrcweir // ------------------------------------------------------------------------- 1083cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getPrimaryKeys( 1084cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1085cdf0e10cSrcweir { 1086cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); 1087cdf0e10cSrcweir } 1088cdf0e10cSrcweir // ------------------------------------------------------------------------- 1089cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getIndexInfo( 1090cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString&, 1091cdf0e10cSrcweir sal_Bool, sal_Bool ) throw(SQLException, RuntimeException) 1092cdf0e10cSrcweir { 1093cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); 1094cdf0e10cSrcweir } 1095cdf0e10cSrcweir // ------------------------------------------------------------------------- 1096cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getBestRowIdentifier( 1097cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Int32, 1098cdf0e10cSrcweir sal_Bool ) throw(SQLException, RuntimeException) 1099cdf0e10cSrcweir { 1100cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); 1101cdf0e10cSrcweir } 1102cdf0e10cSrcweir // ------------------------------------------------------------------------- 1103cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTablePrivileges( 1104cdf0e10cSrcweir const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1105cdf0e10cSrcweir { 1106cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); 1107cdf0e10cSrcweir } 1108cdf0e10cSrcweir // ------------------------------------------------------------------------- 1109cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference( 1110cdf0e10cSrcweir const Any&, const ::rtl::OUString&, 1111cdf0e10cSrcweir const ::rtl::OUString&, const Any&, 1112cdf0e10cSrcweir const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) 1113cdf0e10cSrcweir { 1114cdf0e10cSrcweir return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); 1115cdf0e10cSrcweir } 1116cdf0e10cSrcweir // ------------------------------------------------------------------------- 1117cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getUDTs( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException) 1118cdf0e10cSrcweir { 1119cdf0e10cSrcweir OSL_ENSURE(0,"Not implemented yet!"); 1120cdf0e10cSrcweir throw SQLException(); 1121cdf0e10cSrcweir } 1122cdf0e10cSrcweir // ----------------------------------------------------------------------------- 1123