1 /************************************************************************* 2 * 3 * The Contents of this file are made available subject to the terms of 4 * the BSD license. 5 * 6 * Copyright 2000, 2010 Oracle and/or its affiliates. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 28 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 31 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * 33 *************************************************************************/ 34 35 #include "SDatabaseMetaData.hxx" 36 #include <com/sun/star/sdbc/DataType.hpp> 37 #include <com/sun/star/sdbc/ResultSetType.hpp> 38 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> 39 #include <com/sun/star/sdbc/TransactionIsolation.hpp> 40 41 using namespace connectivity::skeleton; 42 using namespace com::sun::star::uno; 43 using namespace com::sun::star::lang; 44 using namespace com::sun::star::beans; 45 using namespace com::sun::star::sdbc; 46 47 ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) 48 : m_pConnection(_pCon) 49 , m_bUseCatalog(sal_True) 50 { 51 OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!"); 52 if(!m_pConnection->isCatalogUsed()) 53 { 54 osl_incrementInterlockedCount( &m_refCount ); 55 m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); 56 osl_decrementInterlockedCount( &m_refCount ); 57 } 58 } 59 // ------------------------------------------------------------------------- 60 ODatabaseMetaData::~ODatabaseMetaData() 61 { 62 } 63 // ------------------------------------------------------------------------- 64 ::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException) 65 { 66 ::rtl::OUString aVal; 67 if(m_bUseCatalog) 68 { // do some special here for you database 69 } 70 71 return aVal; 72 } 73 // ------------------------------------------------------------------------- 74 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) 75 { 76 sal_Int32 nValue = 0; // 0 means no limit 77 return nValue; 78 } 79 // ------------------------------------------------------------------------- 80 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) 81 { 82 sal_Int32 nValue = 0; // 0 means no limit 83 return nValue; 84 } 85 // ------------------------------------------------------------------------- 86 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) 87 { 88 sal_Int32 nValue = 0; // 0 means no limit 89 return nValue; 90 } 91 // ------------------------------------------------------------------------- 92 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) 93 { 94 sal_Int32 nValue = 0; // 0 means no limit 95 return nValue; 96 } 97 // ------------------------------------------------------------------------- 98 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) 99 { 100 sal_Int32 nValue = 0; // 0 means no limit 101 return nValue; 102 } 103 // ------------------------------------------------------------------------- 104 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) 105 { 106 sal_Int32 nValue = 0; // 0 means no limit 107 return nValue; 108 } 109 // ------------------------------------------------------------------------- 110 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) 111 { 112 sal_Int32 nValue = 0; // 0 means no limit 113 return nValue; 114 } 115 // ------------------------------------------------------------------------- 116 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) 117 { 118 sal_Int32 nValue = 0; // 0 means no limit 119 return nValue; 120 } 121 // ------------------------------------------------------------------------- 122 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) 123 { 124 sal_Int32 nValue = 0; // 0 means no limit 125 return nValue; 126 } 127 // ------------------------------------------------------------------------- 128 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) 129 { 130 sal_Int32 nValue = 0; // 0 means no limit 131 return nValue; 132 } 133 // ------------------------------------------------------------------------- 134 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) 135 { 136 sal_Int32 nValue = 0; // 0 means no limit 137 return nValue; 138 } 139 // ------------------------------------------------------------------------- 140 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) 141 { 142 sal_Int32 nValue = 0; // 0 means no limit 143 return nValue; 144 } 145 // ------------------------------------------------------------------------- 146 // ------------------------------------------------------------------------- 147 sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) 148 { 149 return sal_False; 150 } 151 // ------------------------------------------------------------------------- 152 sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 153 { 154 return sal_False; 155 } 156 // ------------------------------------------------------------------------- 157 sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) 158 { 159 return sal_False; 160 } 161 // ------------------------------------------------------------------------- 162 sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 163 { 164 return sal_False; 165 } 166 // ------------------------------------------------------------------------- 167 sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) 168 { 169 return sal_False; 170 } 171 // ------------------------------------------------------------------------- 172 sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 173 { 174 return sal_False; 175 } 176 // ------------------------------------------------------------------------- 177 sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) 178 { 179 return sal_False; 180 } 181 // ------------------------------------------------------------------------- 182 sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) 183 { 184 return sal_False; 185 } 186 // ------------------------------------------------------------------------- 187 sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) 188 { 189 return sal_False; 190 } 191 // ------------------------------------------------------------------------- 192 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) 193 { 194 sal_Int32 nValue = 0; // 0 means no limit 195 return nValue; 196 } 197 // ------------------------------------------------------------------------- 198 sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) 199 { 200 return sal_False; 201 } 202 // ------------------------------------------------------------------------- 203 ::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) 204 { 205 ::rtl::OUString aVal; 206 if(m_bUseCatalog) 207 { 208 } 209 return aVal; 210 } 211 // ------------------------------------------------------------------------- 212 ::rtl::OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) 213 { 214 // normally this is " 215 ::rtl::OUString aVal = ::rtl::OUString::createFromAscii("\""); 216 return aVal; 217 } 218 // ------------------------------------------------------------------------- 219 ::rtl::OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) 220 { 221 ::rtl::OUString aVal; 222 return aVal; 223 } 224 // ------------------------------------------------------------------------- 225 sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) 226 { 227 return sal_False; 228 } 229 // ------------------------------------------------------------------------- 230 sal_Bool SAL_CALL ODatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException) 231 { 232 sal_Bool bValue = sal_False; 233 if(m_bUseCatalog) 234 { 235 } 236 return bValue; 237 } 238 // ------------------------------------------------------------------------- 239 sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) 240 { 241 return sal_True; 242 } 243 // ------------------------------------------------------------------------- 244 sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) 245 { 246 return sal_True; 247 } 248 // ------------------------------------------------------------------------- 249 sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) 250 { 251 return sal_True; 252 } 253 // ------------------------------------------------------------------------- 254 sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) 255 { 256 return sal_True; 257 } 258 // ------------------------------------------------------------------------- 259 sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) 260 { 261 return sal_False; 262 } 263 // ------------------------------------------------------------------------- 264 sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) 265 { 266 return sal_False; 267 } 268 // ------------------------------------------------------------------------- 269 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) 270 { 271 return sal_False; 272 } 273 // ------------------------------------------------------------------------- 274 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) 275 { 276 return sal_False; 277 } 278 // ------------------------------------------------------------------------- 279 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) 280 { 281 return sal_False; 282 } 283 // ------------------------------------------------------------------------- 284 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) 285 { 286 return sal_False; 287 } 288 // ------------------------------------------------------------------------- 289 sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException) 290 { 291 return sal_False; 292 } 293 // ------------------------------------------------------------------------- 294 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException) 295 { 296 return sal_False; 297 } 298 // ------------------------------------------------------------------------- 299 sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) 300 { 301 return sal_False; 302 } 303 // ------------------------------------------------------------------------- 304 sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) 305 { 306 return sal_True; // should be supported at least 307 } 308 // ------------------------------------------------------------------------- 309 sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) 310 { 311 return sal_False; 312 } 313 // ------------------------------------------------------------------------- 314 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) 315 { 316 return sal_False; 317 } 318 // ------------------------------------------------------------------------- 319 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException) 320 { 321 return sal_False; 322 } 323 // ------------------------------------------------------------------------- 324 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) 325 { 326 return sal_False; 327 } 328 // ------------------------------------------------------------------------- 329 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) 330 { 331 return sal_False; 332 } 333 // ------------------------------------------------------------------------- 334 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException) 335 { 336 return sal_False; 337 } 338 // ------------------------------------------------------------------------- 339 sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) 340 { 341 return sal_False; 342 } 343 // ------------------------------------------------------------------------- 344 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException) 345 { 346 sal_Int32 nValue = 0; // 0 means no limit 347 return nValue; 348 } 349 // ------------------------------------------------------------------------- 350 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) 351 { 352 sal_Int32 nValue = 0; // 0 means no limit 353 return nValue; 354 } 355 // ------------------------------------------------------------------------- 356 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) 357 { 358 sal_Int32 nValue = 0; // 0 means no limit 359 return nValue; 360 } 361 // ------------------------------------------------------------------------- 362 sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) 363 { 364 return sal_False; 365 } 366 // ------------------------------------------------------------------------- 367 sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) 368 { 369 return sal_False; 370 } 371 // ------------------------------------------------------------------------- 372 sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) 373 { 374 return sal_False; 375 } 376 // ------------------------------------------------------------------------- 377 sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) 378 { 379 return sal_False; 380 } 381 // ------------------------------------------------------------------------- 382 sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) 383 { 384 return sal_False; 385 } 386 // ------------------------------------------------------------------------- 387 sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) 388 { 389 return sal_False; 390 } 391 // ------------------------------------------------------------------------- 392 sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) 393 { 394 return sal_False; 395 } 396 // ------------------------------------------------------------------------- 397 sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) 398 { 399 return sal_False; 400 } 401 // ------------------------------------------------------------------------- 402 sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) 403 { 404 return sal_False; 405 } 406 // ------------------------------------------------------------------------- 407 sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) 408 { 409 return sal_False; 410 } 411 // ------------------------------------------------------------------------- 412 sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) 413 { 414 return sal_False; 415 } 416 // ------------------------------------------------------------------------- 417 sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) 418 { 419 return sal_False; 420 } 421 // ------------------------------------------------------------------------- 422 sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException) 423 { 424 return sal_False; 425 } 426 // ------------------------------------------------------------------------- 427 sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) 428 { 429 return sal_False; 430 } 431 // ------------------------------------------------------------------------- 432 sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) 433 { 434 return sal_False; 435 } 436 // ------------------------------------------------------------------------- 437 sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) 438 { 439 return sal_False; 440 } 441 // ------------------------------------------------------------------------- 442 sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) 443 { 444 return sal_False; 445 } 446 // ------------------------------------------------------------------------- 447 sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) 448 { 449 return sal_False; 450 } 451 // ------------------------------------------------------------------------- 452 sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) 453 { 454 return sal_False; 455 } 456 // ------------------------------------------------------------------------- 457 sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) 458 { 459 return sal_False; 460 } 461 // ------------------------------------------------------------------------- 462 sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) 463 { 464 return sal_False; 465 } 466 // ------------------------------------------------------------------------- 467 sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) 468 { 469 return sal_False; 470 } 471 // ------------------------------------------------------------------------- 472 sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) 473 { 474 return sal_False; 475 } 476 // ------------------------------------------------------------------------- 477 sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) 478 { 479 return sal_False; 480 } 481 // ------------------------------------------------------------------------- 482 sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) 483 { 484 return sal_False; 485 } 486 // ------------------------------------------------------------------------- 487 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) 488 { 489 return sal_False; 490 } 491 // ------------------------------------------------------------------------- 492 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) 493 { 494 return sal_False; 495 } 496 // ------------------------------------------------------------------------- 497 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) 498 { 499 return sal_False; 500 } 501 // ------------------------------------------------------------------------- 502 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) 503 { 504 return sal_False; 505 } 506 // ------------------------------------------------------------------------- 507 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) 508 { 509 return sal_False; 510 } 511 // ------------------------------------------------------------------------- 512 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) 513 { 514 return sal_False; 515 } 516 // ------------------------------------------------------------------------- 517 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) 518 { 519 return sal_False; 520 } 521 // ------------------------------------------------------------------------- 522 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) 523 { 524 return sal_False; 525 } 526 // ------------------------------------------------------------------------- 527 sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) 528 { 529 return sal_False; 530 } 531 // ------------------------------------------------------------------------- 532 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) 533 { 534 return sal_False; 535 } 536 // ------------------------------------------------------------------------- 537 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) 538 { 539 return sal_False; 540 } 541 // ------------------------------------------------------------------------- 542 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) 543 { 544 return sal_False; 545 } 546 // ------------------------------------------------------------------------- 547 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) 548 { 549 return sal_False; 550 } 551 // ------------------------------------------------------------------------- 552 sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) 553 { 554 return sal_False; 555 } 556 // ------------------------------------------------------------------------- 557 ::rtl::OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) 558 { 559 ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:skeleton:"); 560 return aValue; 561 } 562 // ------------------------------------------------------------------------- 563 ::rtl::OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) 564 { 565 ::rtl::OUString aValue; 566 return aValue; 567 } 568 // ------------------------------------------------------------------------- 569 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) 570 { 571 ::rtl::OUString aValue; 572 return aValue; 573 } 574 // ------------------------------------------------------------------------- 575 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) 576 { 577 ::rtl::OUString aValue; 578 return aValue; 579 } 580 // ------------------------------------------------------------------------- 581 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) 582 { 583 ::rtl::OUString aValue; 584 return aValue; 585 } 586 // ------------------------------------------------------------------------- 587 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) 588 { 589 ::rtl::OUString aValue; 590 return aValue; 591 } 592 // ------------------------------------------------------------------------- 593 ::rtl::OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) 594 { 595 ::rtl::OUString aValue; 596 return aValue; 597 } 598 // ------------------------------------------------------------------------- 599 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) 600 { 601 ::rtl::OUString aValue; 602 return aValue; 603 } 604 // ------------------------------------------------------------------------- 605 sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) 606 { 607 return 1; 608 } 609 // ------------------------------------------------------------------------- 610 sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) 611 { 612 return TransactionIsolation::NONE; 613 } 614 // ------------------------------------------------------------------------- 615 sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) 616 { 617 return 0; 618 } 619 // ------------------------------------------------------------------------- 620 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) 621 { 622 ::rtl::OUString aValue; 623 return aValue; 624 } 625 // ------------------------------------------------------------------------- 626 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) 627 { 628 ::rtl::OUString aValue; 629 return aValue; 630 } 631 // ------------------------------------------------------------------------- 632 ::rtl::OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) 633 { 634 return ::rtl::OUString(); 635 } 636 // ------------------------------------------------------------------------- 637 ::rtl::OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) 638 { 639 return ::rtl::OUString(); 640 } 641 // ------------------------------------------------------------------------- 642 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) 643 { 644 return ::rtl::OUString(); 645 } 646 // ------------------------------------------------------------------------- 647 ::rtl::OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) 648 { 649 return ::rtl::OUString(); 650 } 651 // ------------------------------------------------------------------------- 652 sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) 653 { 654 return sal_False; 655 } 656 // ------------------------------------------------------------------------- 657 sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) 658 { 659 return sal_False; 660 } 661 // ------------------------------------------------------------------------- 662 sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) 663 { 664 return sal_True; 665 } 666 // ------------------------------------------------------------------------- 667 sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) 668 { 669 return sal_False; 670 } 671 // ------------------------------------------------------------------------- 672 sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) 673 { 674 return sal_False; 675 } 676 // ------------------------------------------------------------------------- 677 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) 678 { 679 sal_Int32 nValue = 0; // 0 means no limit 680 return nValue; 681 } 682 // ------------------------------------------------------------------------- 683 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) 684 { 685 sal_Int32 nValue = 0; // 0 means no limit 686 return nValue; 687 } 688 // ------------------------------------------------------------------------- 689 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) 690 { 691 sal_Int32 nValue = 0; // 0 means no limit 692 return nValue; 693 } 694 // ------------------------------------------------------------------------- 695 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) 696 { 697 sal_Int32 nValue = 0; // 0 means no limit 698 return nValue; 699 } 700 // ------------------------------------------------------------------------- 701 sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) 702 { 703 return sal_False; 704 } 705 // ------------------------------------------------------------------------- 706 sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException) 707 { 708 return sal_False; 709 } 710 // ------------------------------------------------------------------------- 711 sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) 712 { 713 return sal_False; 714 } 715 // ------------------------------------------------------------------------- 716 sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) 717 { 718 return sal_False; 719 } 720 // ------------------------------------------------------------------------- 721 sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) 722 { 723 return sal_False; 724 } 725 // ------------------------------------------------------------------------- 726 sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) 727 { 728 return sal_False; 729 } 730 // ------------------------------------------------------------------------- 731 sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) 732 { 733 return sal_False; 734 } 735 // ------------------------------------------------------------------------- 736 sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) 737 { 738 return sal_False; 739 } 740 // ------------------------------------------------------------------------- 741 sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) 742 { 743 return sal_False; 744 } 745 // ------------------------------------------------------------------------- 746 sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) 747 { 748 return sal_False; 749 } 750 // ------------------------------------------------------------------------- 751 sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) 752 { 753 return sal_False; 754 } 755 // ------------------------------------------------------------------------- 756 sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) 757 { 758 return sal_False; 759 } 760 // ------------------------------------------------------------------------- 761 Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException) 762 { 763 return (Reference< XConnection >)m_pConnection;//new OConnection(m_aConnectionHandle); 764 } 765 // ------------------------------------------------------------------------- 766 // here follow all methods which return a resultset 767 // the first methods is an example implementation how to use this resultset 768 // of course you could implement it on your and you should do this because 769 // the general way is more memory expensive 770 // ------------------------------------------------------------------------- 771 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) 772 { 773 return NULL; 774 } 775 // ------------------------------------------------------------------------- 776 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo( ) throw(SQLException, RuntimeException) 777 { 778 return NULL; 779 } 780 // ------------------------------------------------------------------------- 781 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) 782 { 783 return NULL; 784 } 785 // ----------------------------------------------------------------------------- 786 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) 787 { 788 return NULL; 789 } 790 // ------------------------------------------------------------------------- 791 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( 792 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, 793 const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException) 794 { 795 return NULL; 796 } 797 // ------------------------------------------------------------------------- 798 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( 799 const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, 800 const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException) 801 { 802 return NULL; 803 } 804 // ------------------------------------------------------------------------- 805 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( 806 const Any& catalog, const ::rtl::OUString& schemaPattern, 807 const ::rtl::OUString& tableNamePattern, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException) 808 { 809 return NULL; 810 } 811 // ------------------------------------------------------------------------- 812 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( 813 const Any& catalog, const ::rtl::OUString& schemaPattern, 814 const ::rtl::OUString& procedureNamePattern, const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException) 815 { 816 return NULL; 817 } 818 // ------------------------------------------------------------------------- 819 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( 820 const Any& catalog, const ::rtl::OUString& schemaPattern, 821 const ::rtl::OUString& procedureNamePattern ) throw(SQLException, RuntimeException) 822 { 823 return NULL; 824 } 825 // ------------------------------------------------------------------------- 826 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( 827 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) 828 { 829 return NULL; 830 } 831 // ------------------------------------------------------------------------- 832 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( 833 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) 834 { 835 return NULL; 836 } 837 // ------------------------------------------------------------------------- 838 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( 839 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) 840 { 841 return NULL; 842 } 843 // ------------------------------------------------------------------------- 844 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( 845 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) 846 { 847 return NULL; 848 } 849 // ------------------------------------------------------------------------- 850 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( 851 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, 852 sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException) 853 { 854 return NULL; 855 } 856 // ------------------------------------------------------------------------- 857 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( 858 const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope, 859 sal_Bool nullable ) throw(SQLException, RuntimeException) 860 { 861 return NULL; 862 } 863 // ------------------------------------------------------------------------- 864 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( 865 const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException) 866 { 867 return NULL; 868 } 869 // ------------------------------------------------------------------------- 870 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( 871 const Any& primaryCatalog, const ::rtl::OUString& primarySchema, 872 const ::rtl::OUString& primaryTable, const Any& foreignCatalog, 873 const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) throw(SQLException, RuntimeException) 874 { 875 return NULL; 876 } 877 // ------------------------------------------------------------------------- 878 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException) 879 { 880 OSL_ENSURE(0,"Not implemented yet!"); 881 throw SQLException(); 882 return NULL; 883 } 884 // ----------------------------------------------------------------------------- 885 886 887 888