LCOV - code coverage report
Current view: top level - libreoffice/connectivity/source/inc - FDatabaseMetaDataResultSetMetaData.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 6 50.0 %
Date: 2012-12-27 Functions: 1 4 25.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _CONNECTIVITY_DATABASEMETADATARESULTSETMETADATA_HXX_
      21             : #define _CONNECTIVITY_DATABASEMETADATARESULTSETMETADATA_HXX_
      22             : 
      23             : #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
      24             : #include <cppuhelper/implbase1.hxx>
      25             : #ifndef _VECTOR_
      26             : #include <vector>
      27             : #endif
      28             : #include "FDatabaseMetaDataResultSet.hxx"
      29             : #include "OColumn.hxx"
      30             : #include "connectivity/StdTypeDefs.hxx"
      31             : #include "connectivity/dbtoolsdllapi.hxx"
      32             : 
      33             : namespace connectivity
      34             : {
      35             :     //**************************************************************
      36             :     //************ Class: ODatabaseMetaDataResultSetMetaData
      37             :     //**************************************************************
      38             :     typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData>   ODatabaseMetaResultSetMetaData_BASE;
      39             : 
      40             :     class OOO_DLLPUBLIC_DBTOOLS ODatabaseMetaDataResultSetMetaData :    public  ODatabaseMetaResultSetMetaData_BASE
      41             :     {
      42             :         TIntVector                                  m_vMapping; // when not every column is needed
      43             :         ::std::map<sal_Int32,connectivity::OColumn> m_mColumns;
      44             :         ::std::map<sal_Int32,connectivity::OColumn>::const_iterator m_mColumnsIter;
      45             : 
      46             :     protected:
      47             :         virtual ~ODatabaseMetaDataResultSetMetaData();
      48             :     public:
      49             :         // a Constructor, that is needed for when Returning the Object is needed:
      50             :         // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
      51          81 :         ODatabaseMetaDataResultSetMetaData( )
      52          81 :         {
      53          81 :         }
      54             :         /// Avoid ambigous cast error from the compiler.
      55             :         inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
      56             :         { return this; }
      57             : 
      58             :         virtual sal_Int32 SAL_CALL getColumnCount(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      59             :         virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      60             :         virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      61             :         virtual sal_Bool SAL_CALL isSearchable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      62             :         virtual sal_Bool SAL_CALL isCurrency( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      63             :         virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      64             :         virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      65             :         virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      66             :         virtual ::rtl::OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      67             :         virtual ::rtl::OUString SAL_CALL getColumnName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      68             :         virtual ::rtl::OUString SAL_CALL getSchemaName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      69             :         virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      70             :         virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      71             :         virtual ::rtl::OUString SAL_CALL getTableName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      72             :         virtual ::rtl::OUString SAL_CALL getCatalogName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      73             :         virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      74             :         virtual ::rtl::OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      75             :         virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      76             :         virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      77             :         virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      78             :         virtual ::rtl::OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      79             : 
      80             :         // methods to set the right column mapping
      81             :         void setColumnPrivilegesMap();
      82             :         void setColumnMap();
      83             :         void setColumnsMap();
      84             :         void setTableNameMap();
      85             :         void setTablesMap();
      86             :         void setProcedureColumnsMap();
      87             :         void setPrimaryKeysMap();
      88             :         void setIndexInfoMap();
      89             :         void setTablePrivilegesMap();
      90             :         void setCrossReferenceMap();
      91             :         void setTypeInfoMap();
      92             :         void setProcedureNameMap();
      93             :         void setProceduresMap();
      94             :         void setTableTypes();
      95           0 :         void setBestRowIdentifierMap() { setVersionColumnsMap();}
      96             :         void setVersionColumnsMap();
      97           0 :         void setExportedKeysMap() { setCrossReferenceMap(); }
      98           0 :         void setImportedKeysMap() { setCrossReferenceMap(); }
      99             :         void setCatalogsMap();
     100             :         void setSchemasMap();
     101             :     };
     102             : }
     103             : #endif // _CONNECTIVITY_FILE_ADATABASEMETARESULTSETMETADATA_HXX_
     104             : 
     105             : 
     106             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10