LCOV - code coverage report
Current view: top level - connectivity/source/inc - OTypeInfo.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 4 4 100.0 %
Date: 2014-04-11 Functions: 3 3 100.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_OTYPEINFO_HXX_
      21             : #define _CONNECTIVITY_OTYPEINFO_HXX_
      22             : 
      23             : #include <com/sun/star/sdbc/ColumnSearch.hpp>
      24             : #include <com/sun/star/sdbc/DataType.hpp>
      25             : #include "connectivity/dbtoolsdllapi.hxx"
      26             : 
      27             : namespace connectivity
      28             : {
      29         104 :     struct OTypeInfo
      30             :     {
      31             :         OUString aTypeName;      // Name of the type in the database
      32             :         OUString aLiteralPrefix; // Prefix for quoting
      33             :         OUString aLiteralSuffix; // Suffix for quoting
      34             :         OUString aCreateParams;  // Parameter for creating
      35             :         OUString aLocalTypeName;
      36             : 
      37             :         sal_Int32       nPrecision;     // Length of the type
      38             : 
      39             :         sal_Int16       nMaximumScale;  // Decimal places
      40             :         sal_Int16       nMinimumScale;  // Minimum decimal places
      41             : 
      42             :         sal_Int16       nType;          // Database type
      43             :         sal_Int16       nSearchType;    // Can we search for the type?
      44             :         sal_Int16       nNumPrecRadix;  // indicating the radix, which is usually 2 or 10
      45             : 
      46             :         sal_Bool        bCurrency       : 1;    // Currency
      47             :         sal_Bool        bAutoIncrement  : 1;    // Is it an autoincrementing field?
      48             :         sal_Bool        bNullable       : 1;    // Can the field be NULL?
      49             :         sal_Bool        bCaseSensitive  : 1;    // Is the type case sensitive?
      50             :         sal_Bool        bUnsigned       : 1;    // Is the type unsigned?
      51             : 
      52          22 :         OTypeInfo()
      53             :                 :nPrecision(0)
      54             :                 ,nMaximumScale(0)
      55             :                 ,nMinimumScale(0)
      56             :                 ,nType( ::com::sun::star::sdbc::DataType::OTHER)
      57             :                 ,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL)
      58             :                 ,bCurrency(sal_False)
      59             :                 ,bAutoIncrement(sal_False)
      60             :                 ,bNullable(sal_True)
      61             :                 ,bCaseSensitive(sal_False)
      62          22 :                 ,bUnsigned(sal_False)
      63          22 :         {}
      64             : 
      65             :         inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(())
      66             :             { return ::rtl_allocateMemory( nSize ); }
      67             :         inline static void * SAL_CALL operator new( size_t /*nSize*/,void* _pHint ) SAL_THROW(())
      68             :             { return _pHint; }
      69             :         inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(())
      70             :             { ::rtl_freeMemory( pMem ); }
      71             :         inline static void SAL_CALL operator delete( void * /*pMem*/,void* /*_pHint*/ ) SAL_THROW(())
      72             :             {  }
      73             : 
      74             :         sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
      75             :         sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
      76             : 
      77             :         inline OUString getDBName() const { return aTypeName; }
      78             :     };
      79             : }
      80             : #endif // _CONNECTIVITY_OTYPEINFO_HXX_
      81             : 
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10