update credits
[LibreOffice.git] / connectivity / source / inc / OTypeInfo.hxx
blob754f791be320673e46623c2ca15340d559a3ef28
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _CONNECTIVITY_OTYPEINFO_HXX_
21 #define _CONNECTIVITY_OTYPEINFO_HXX_
23 #include <com/sun/star/sdbc/ColumnSearch.hpp>
24 #include <com/sun/star/sdbc/DataType.hpp>
25 #include "connectivity/dbtoolsdllapi.hxx"
27 namespace connectivity
29 struct OTypeInfo
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;
37 sal_Int32 nPrecision; // Length of the type
39 sal_Int16 nMaximumScale; // Decimal places
40 sal_Int16 nMinimumScale; // Minimum decimal places
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
46 sal_Bool bCurrency : 1, // Currency
47 bAutoIncrement : 1, // Is it an autoincrementing field?
48 bNullable : 1, // Can the field be NULL?
49 bCaseSensitive : 1, // Is the type case sensitive?
50 bUnsigned : 1, // Is the type unsigned?
51 bEmpty_1 : 1, // for later use
52 bEmpty_2 : 1;
54 OTypeInfo()
55 :nPrecision(0)
56 ,nMaximumScale(0)
57 ,nMinimumScale(0)
58 ,nType( ::com::sun::star::sdbc::DataType::OTHER)
59 ,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL)
60 ,bCurrency(sal_False)
61 ,bAutoIncrement(sal_False)
62 ,bNullable(sal_True)
63 ,bCaseSensitive(sal_False)
64 ,bUnsigned(sal_False)
67 inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(())
68 { return ::rtl_allocateMemory( nSize ); }
69 inline static void * SAL_CALL operator new( size_t /*nSize*/,void* _pHint ) SAL_THROW(())
70 { return _pHint; }
71 inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(())
72 { ::rtl_freeMemory( pMem ); }
73 inline static void SAL_CALL operator delete( void * /*pMem*/,void* /*_pHint*/ ) SAL_THROW(())
74 { }
76 sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
77 sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
79 inline OUString getDBName() const { return aTypeName; }
82 #endif // _CONNECTIVITY_OTYPEINFO_HXX_
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */