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