1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * Effective License of whole file:
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software Foundation.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
25 * Copyright: 2000 by Sun Microsystems, Inc.
27 * Contributor(s): Joerg Budischewski
29 * All parts contributed on or after August 2011:
31 * This Source Code Form is subject to the terms of the Mozilla Public
32 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
35 ************************************************************************/
37 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATICS_HXX
38 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATICS_HXX
40 #include <boost/unordered_map.hpp>
43 #include <com/sun/star/uno/Any.hxx>
44 #include <com/sun/star/uno/Sequence.hxx>
45 #include <com/sun/star/sdbc/DataType.hpp>
47 #include <cppuhelper/propshlp.hxx>
49 namespace pq_sdbc_driver
55 const OUString
&_columnName
,
56 const OUString
&_tableName
,
57 const OUString
&_schemaTableName
,
58 const OUString
&_typeName
,
64 bool _isAutoIncrement
,
67 columnName( _columnName
),
68 tableName( _tableName
),
69 schemaTableName( _schemaTableName
),
70 typeName( _typeName
),
72 precision( _precision
),
74 isCurrency( _isCurrency
),
75 isNullable( _isNullable
),
76 isAutoIncrement( _isAutoIncrement
),
77 isReadOnly( _isReadOnly
),
83 OUString schemaTableName
;
95 typedef std::vector
< ColumnMetaData
> ColumnMetaDataVector
;
101 sal_Int32 maxScale
; // in case nothing is given in getTypeInfo
102 bool isAutoIncrement
;
106 typedef ::boost::unordered_map
111 ::std::equal_to
< OUString
>
116 struct ImplementationStatics
118 ImplementationStatics() :
123 com::sun::star::uno::Sequence
< OUString
> serviceNames
;
124 cppu::IPropertyArrayHelper
*pProps
;
125 com::sun::star::uno::Sequence
< com::sun::star::uno::Type
> types
;
128 struct ReflectionImplementations
130 struct ImplementationStatics table
;
131 struct ImplementationStatics tableDescriptor
;
132 struct ImplementationStatics column
;
133 struct ImplementationStatics columnDescriptor
;
134 struct ImplementationStatics key
;
135 struct ImplementationStatics keyDescriptor
;
136 struct ImplementationStatics keycolumn
;
137 struct ImplementationStatics keycolumnDescriptor
;
138 struct ImplementationStatics user
;
139 struct ImplementationStatics userDescriptor
;
140 struct ImplementationStatics view
;
141 struct ImplementationStatics viewDescriptor
;
142 struct ImplementationStatics index
;
143 struct ImplementationStatics indexDescriptor
;
144 struct ImplementationStatics indexColumn
;
145 struct ImplementationStatics indexColumnDescriptor
;
147 struct ImplementationStatics updateableResultSet
;
148 struct ImplementationStatics resultSet
;
151 static const sal_Int32 TABLE_INDEX_CATALOG
= 0;
152 static const sal_Int32 TABLE_INDEX_SCHEMA
= 1;
153 static const sal_Int32 TABLE_INDEX_NAME
= 2;
154 static const sal_Int32 TABLE_INDEX_TYPE
= 3;
155 static const sal_Int32 TABLE_INDEX_REMARKS
= 4;
159 OUString SYSTEM_TABLE
;
167 OUString NULLABLE_UNKNOWN
;
180 OUString INDEX_COLUMN
;
183 OUString SCHEMA_NAME
;
184 OUString CATALOG_NAME
;
185 OUString DESCRIPTION
;
190 OUString DEFAULT_VALUE
;
191 OUString IS_AUTO_INCREMENT
;
192 OUString IS_CURRENCY
;
193 OUString IS_NULLABLE
;
194 OUString IS_ROW_VERSISON
;
205 OUString REFERENCED_TABLE
;
206 OUString UPDATE_RULE
;
207 OUString DELETE_RULE
;
208 OUString PRIVATE_COLUMNS
;
209 OUString PRIVATE_FOREIGN_COLUMNS
;
212 OUString RELATED_COLUMN
;
217 OUString CURSOR_NAME
;
218 OUString ESCAPE_PROCESSING
;
219 OUString FETCH_DIRECTION
;
221 OUString IS_BOOKMARKABLE
;
222 OUString RESULT_SET_CONCURRENCY
;
223 OUString RESULT_SET_TYPE
;
226 OUString CHECK_OPTION
;
231 OUString IS_PRIMARY_KEY_INDEX
;
232 OUString IS_CLUSTERED
;
234 OUString PRIVATE_COLUMN_INDEXES
;
238 OUString IS_ASCENDING
;
239 ReflectionImplementations refl
;
241 com::sun::star::uno::Sequence
< OUString
> tablesRowNames
;
242 com::sun::star::uno::Sequence
< OUString
> columnRowNames
;
243 com::sun::star::uno::Sequence
< OUString
> primaryKeyNames
;
244 com::sun::star::uno::Sequence
< OUString
> tablePrivilegesNames
;
245 com::sun::star::uno::Sequence
< OUString
> schemaNames
;
246 com::sun::star::uno::Sequence
< OUString
> tableTypeNames
;
247 com::sun::star::uno::Sequence
< OUString
> typeinfoColumnNames
;
248 com::sun::star::uno::Sequence
< OUString
> indexinfoColumnNames
;
249 com::sun::star::uno::Sequence
< OUString
> importedKeysColumnNames
;
250 com::sun::star::uno::Sequence
< OUString
> resultSetArrayColumnNames
;
251 com::sun::star::uno::Sequence
< com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> > tableTypeData
;
253 ColumnMetaDataVector typeInfoMetaData
;
254 BaseTypeMap baseTypeMap
;
257 Statics( const Statics
& );
258 Statics
& operator = ( const Statics
& );
261 Statics
& getStatics();
266 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */