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 <unordered_map>
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
) :
65 columnName( _columnName
),
66 tableName( _tableName
),
67 schemaTableName( _schemaTableName
),
68 typeName( _typeName
),
70 precision( _precision
),
72 isCurrency( _isCurrency
),
73 isNullable( _isNullable
),
74 isAutoIncrement( _isAutoIncrement
)
79 OUString schemaTableName
;
89 typedef std::vector
< ColumnMetaData
> ColumnMetaDataVector
;
91 typedef std::unordered_map
97 struct ImplementationStatics
99 ImplementationStatics() :
104 css::uno::Sequence
< OUString
> serviceNames
;
105 cppu::IPropertyArrayHelper
*pProps
;
106 css::uno::Sequence
< css::uno::Type
> types
;
109 struct ReflectionImplementations
111 struct ImplementationStatics table
;
112 struct ImplementationStatics tableDescriptor
;
113 struct ImplementationStatics column
;
114 struct ImplementationStatics columnDescriptor
;
115 struct ImplementationStatics key
;
116 struct ImplementationStatics keyDescriptor
;
117 struct ImplementationStatics keycolumn
;
118 struct ImplementationStatics keycolumnDescriptor
;
119 struct ImplementationStatics user
;
120 struct ImplementationStatics userDescriptor
;
121 struct ImplementationStatics view
;
122 struct ImplementationStatics viewDescriptor
;
123 struct ImplementationStatics index
;
124 struct ImplementationStatics indexDescriptor
;
125 struct ImplementationStatics indexColumn
;
126 struct ImplementationStatics indexColumnDescriptor
;
128 struct ImplementationStatics updateableResultSet
;
129 struct ImplementationStatics resultSet
;
132 static const sal_Int32 TABLE_INDEX_CATALOG
= 0;
133 static const sal_Int32 TABLE_INDEX_SCHEMA
= 1;
134 static const sal_Int32 TABLE_INDEX_NAME
= 2;
135 static const sal_Int32 TABLE_INDEX_TYPE
= 3;
136 static const sal_Int32 TABLE_INDEX_REMARKS
= 4;
140 OUString SYSTEM_TABLE
;
148 OUString NULLABLE_UNKNOWN
;
161 OUString INDEX_COLUMN
;
164 OUString SCHEMA_NAME
;
165 OUString CATALOG_NAME
;
166 OUString DESCRIPTION
;
171 OUString DEFAULT_VALUE
;
172 OUString IS_AUTO_INCREMENT
;
173 OUString IS_CURRENCY
;
174 OUString IS_NULLABLE
;
175 OUString IS_ROW_VERSISON
;
186 OUString REFERENCED_TABLE
;
187 OUString UPDATE_RULE
;
188 OUString DELETE_RULE
;
189 OUString PRIVATE_COLUMNS
;
190 OUString PRIVATE_FOREIGN_COLUMNS
;
193 OUString RELATED_COLUMN
;
198 OUString CURSOR_NAME
;
199 OUString ESCAPE_PROCESSING
;
200 OUString FETCH_DIRECTION
;
202 OUString IS_BOOKMARKABLE
;
203 OUString RESULT_SET_CONCURRENCY
;
204 OUString RESULT_SET_TYPE
;
207 OUString CHECK_OPTION
;
212 OUString IS_PRIMARY_KEY_INDEX
;
213 OUString IS_CLUSTERED
;
215 OUString PRIVATE_COLUMN_INDEXES
;
219 OUString IS_ASCENDING
;
220 ReflectionImplementations refl
;
222 std::vector
< OUString
> tablesRowNames
;
223 std::vector
< OUString
> columnRowNames
;
224 std::vector
< OUString
> primaryKeyNames
;
225 std::vector
< OUString
> schemaNames
;
226 std::vector
< OUString
> tableTypeNames
;
227 std::vector
< OUString
> typeinfoColumnNames
;
228 std::vector
< OUString
> indexinfoColumnNames
;
229 std::vector
< OUString
> resultSetArrayColumnNames
;
230 std::vector
< std::vector
< css::uno::Any
> > tableTypeData
;
232 ColumnMetaDataVector typeInfoMetaData
;
233 BaseTypeMap baseTypeMap
;
236 Statics( const Statics
& ) = delete;
237 Statics
& operator = ( const Statics
& ) = delete;
240 Statics
& getStatics();
245 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */