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 ************************************************************************/
39 #include <unordered_map>
43 #include <com/sun/star/uno/Any.hxx>
44 #include <com/sun/star/uno/Sequence.hxx>
46 #include <cppuhelper/propshlp.hxx>
48 namespace pq_sdbc_driver
56 OUString _schemaTableName
,
63 bool _isAutoIncrement
) :
64 columnName(std::move( _columnName
)),
65 tableName(std::move( _tableName
)),
66 schemaTableName(std::move( _schemaTableName
)),
67 typeName(std::move( _typeName
)),
69 precision( _precision
),
71 isCurrency( _isCurrency
),
72 isNullable( _isNullable
),
73 isAutoIncrement( _isAutoIncrement
)
78 OUString schemaTableName
;
88 typedef std::vector
< ColumnMetaData
> ColumnMetaDataVector
;
90 typedef std::unordered_map
96 struct ImplementationStatics
98 ImplementationStatics() :
103 css::uno::Sequence
< OUString
> serviceNames
;
104 cppu::IPropertyArrayHelper
*pProps
;
105 css::uno::Sequence
< css::uno::Type
> types
;
108 struct ReflectionImplementations
110 struct ImplementationStatics table
;
111 struct ImplementationStatics tableDescriptor
;
112 struct ImplementationStatics column
;
113 struct ImplementationStatics columnDescriptor
;
114 struct ImplementationStatics key
;
115 struct ImplementationStatics keyDescriptor
;
116 struct ImplementationStatics keycolumn
;
117 struct ImplementationStatics keycolumnDescriptor
;
118 struct ImplementationStatics user
;
119 struct ImplementationStatics userDescriptor
;
120 struct ImplementationStatics view
;
121 struct ImplementationStatics viewDescriptor
;
122 struct ImplementationStatics index
;
123 struct ImplementationStatics indexDescriptor
;
124 struct ImplementationStatics indexColumn
;
125 struct ImplementationStatics indexColumnDescriptor
;
128 const sal_Int32 TABLE_INDEX_CATALOG
= 0;
129 const sal_Int32 TABLE_INDEX_SCHEMA
= 1;
130 const sal_Int32 TABLE_INDEX_NAME
= 2;
131 const sal_Int32 TABLE_INDEX_TYPE
= 3;
132 const sal_Int32 TABLE_INDEX_REMARKS
= 4;
136 OUString SYSTEM_TABLE
;
144 OUString NULLABLE_UNKNOWN
;
157 OUString INDEX_COLUMN
;
160 OUString SCHEMA_NAME
;
161 OUString CATALOG_NAME
;
162 OUString DESCRIPTION
;
167 OUString DEFAULT_VALUE
;
168 OUString IS_AUTO_INCREMENT
;
169 OUString IS_CURRENCY
;
170 OUString IS_NULLABLE
;
171 OUString IS_ROW_VERSISON
;
182 OUString REFERENCED_TABLE
;
183 OUString UPDATE_RULE
;
184 OUString DELETE_RULE
;
185 OUString PRIVATE_COLUMNS
;
186 OUString PRIVATE_FOREIGN_COLUMNS
;
189 OUString RELATED_COLUMN
;
194 OUString CURSOR_NAME
;
195 OUString ESCAPE_PROCESSING
;
196 OUString FETCH_DIRECTION
;
198 OUString IS_BOOKMARKABLE
;
199 OUString RESULT_SET_CONCURRENCY
;
200 OUString RESULT_SET_TYPE
;
203 OUString CHECK_OPTION
;
208 OUString IS_PRIMARY_KEY_INDEX
;
209 OUString IS_CLUSTERED
;
211 OUString PRIVATE_COLUMN_INDEXES
;
215 OUString IS_ASCENDING
;
216 ReflectionImplementations refl
;
218 std::vector
< OUString
> tablesRowNames
;
219 std::vector
< OUString
> columnRowNames
;
220 std::vector
< OUString
> primaryKeyNames
;
221 std::vector
< OUString
> schemaNames
;
222 std::vector
< OUString
> tableTypeNames
;
223 std::vector
< OUString
> typeinfoColumnNames
;
224 std::vector
< OUString
> indexinfoColumnNames
;
225 std::vector
< OUString
> resultSetArrayColumnNames
;
226 std::vector
< std::vector
< css::uno::Any
> > tableTypeData
;
228 ColumnMetaDataVector typeInfoMetaData
;
229 BaseTypeMap baseTypeMap
;
232 Statics( const Statics
& ) = delete;
233 Statics
& operator = ( const Statics
& ) = delete;
236 Statics
& getStatics();
240 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */