1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OTypeInfo.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CONNECTIVITY_OTYPEINFO_HXX_
32 #define _CONNECTIVITY_OTYPEINFO_HXX_
34 #include <com/sun/star/sdbc/ColumnSearch.hpp>
35 #include <com/sun/star/sdbc/DataType.hpp>
36 #include "connectivity/dbtoolsdllapi.hxx"
38 namespace connectivity
42 ::rtl::OUString aTypeName
; // Name des Types in der Datenbank
43 ::rtl::OUString aLiteralPrefix
; // Prefix zum Quoten
44 ::rtl::OUString aLiteralSuffix
; // Suffix zum Quoten
45 ::rtl::OUString aCreateParams
; // Parameter zum Erstellen
46 ::rtl::OUString aLocalTypeName
;
48 sal_Int32 nPrecision
; // Laenge des Types
50 sal_Int16 nMaximumScale
; // Nachkommastellen
51 sal_Int16 nMinimumScale
; // Min Nachkommastellen
53 sal_Int16 nType
; // Datenbanktyp
54 sal_Int16 nSearchType
; // kann nach dem Typen gesucht werden
55 sal_Int16 nNumPrecRadix
; // indicating the radix, which is usually 2 or 10
57 sal_Bool bCurrency
: 1, // Waehrung
58 bAutoIncrement
: 1, // Ist es ein automatisch incrementierendes Feld
59 bNullable
: 1, // Kann das Feld NULL annehmen
60 bCaseSensitive
: 1, // Ist der Type Casesensitive
61 bUnsigned
: 1, // Ist der Type Unsigned
62 bEmpty_1
: 1, // for later use
69 ,nType( ::com::sun::star::sdbc::DataType::OTHER
)
70 ,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL
)
72 ,bAutoIncrement(sal_False
)
74 ,bCaseSensitive(sal_False
)
78 inline static void * SAL_CALL
operator new( size_t nSize
) SAL_THROW( () )
79 { return ::rtl_allocateMemory( nSize
); }
80 inline static void * SAL_CALL
operator new( size_t /*nSize*/,void* _pHint
) SAL_THROW( () )
82 inline static void SAL_CALL
operator delete( void * pMem
) SAL_THROW( () )
83 { ::rtl_freeMemory( pMem
); }
84 inline static void SAL_CALL
operator delete( void * /*pMem*/,void* /*_pHint*/ ) SAL_THROW( () )
87 sal_Bool
operator == (const OTypeInfo
& lh
) const { return lh
.nType
== nType
; }
88 sal_Bool
operator != (const OTypeInfo
& lh
) const { return lh
.nType
!= nType
; }
90 inline ::rtl::OUString
getDBName() const { return aTypeName
; }
93 #endif // _CONNECTIVITY_OTYPEINFO_HXX_