LibreOffice Module connectivity (master) 1
pq_statics.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * Effective License of whole file:
5 *
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.
9 *
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.
14 *
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,
18 * MA 02111-1307 USA
19 *
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
21 *
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
24 *
25 * Copyright: 2000 by Sun Microsystems, Inc.
26 *
27 * Contributor(s): Joerg Budischewski
28 *
29 * All parts contributed on or after August 2011:
30 *
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/.
34 *
35 ************************************************************************/
36
37#pragma once
38
39#include <unordered_map>
40#include <utility>
41#include <vector>
42
43#include <com/sun/star/uno/Any.hxx>
44#include <com/sun/star/uno/Sequence.hxx>
45
47
48namespace pq_sdbc_driver
49{
50
52{
54 OUString _columnName,
55 OUString _tableName,
56 OUString _schemaTableName,
57 OUString _typeName,
58 sal_Int32 _type,
59 sal_Int32 _precision,
60 sal_Int32 _scale,
61 bool _isCurrency,
62 bool _isNullable,
63 bool _isAutoIncrement ) :
64 columnName(std::move( _columnName )),
65 tableName(std::move( _tableName )),
66 schemaTableName(std::move( _schemaTableName )),
67 typeName(std::move( _typeName )),
68 type( _type ),
69 precision( _precision ),
70 scale( _scale ),
71 isCurrency( _isCurrency ),
72 isNullable( _isNullable ),
73 isAutoIncrement( _isAutoIncrement )
74 {}
75
76 OUString columnName;
77 OUString tableName;
79 OUString typeName;
80 sal_Int32 type;
81 sal_Int32 precision;
82 sal_Int32 scale;
86};
87
88typedef std::vector< ColumnMetaData > ColumnMetaDataVector;
89
90typedef std::unordered_map
91<
92 OUString,
93 sal_Int32
95
97{
99 pProps(nullptr)
100 {}
101
102 OUString implName;
103 css::uno::Sequence< OUString > serviceNames;
105 css::uno::Sequence< css::uno::Type > types;
106};
107
109{
126};
127
128const sal_Int32 TABLE_INDEX_CATALOG = 0;
129const sal_Int32 TABLE_INDEX_SCHEMA = 1;
130const sal_Int32 TABLE_INDEX_NAME = 2;
131const sal_Int32 TABLE_INDEX_TYPE = 3;
132const sal_Int32 TABLE_INDEX_REMARKS = 4;
133
135{
136 OUString SYSTEM_TABLE;
137 OUString TABLE;
138 OUString VIEW;
139 OUString UNKNOWN;
140 OUString YES;
141 OUString NO;
142 OUString NO_NULLS;
143 OUString NULABLE;
145 OUString SELECT;
146 OUString UPDATE;
147 OUString INSERT;
148 OUString DELETE;
149 OUString RULE;
150 OUString REFERENCES;
151 OUString TRIGGER;
152 OUString EXECUTE;
153 OUString USAGE;
154 OUString CREATE;
155 OUString TEMPORARY;
156 OUString INDEX;
157 OUString INDEX_COLUMN;
158
159 OUString NAME;
160 OUString SCHEMA_NAME;
161 OUString CATALOG_NAME;
162 OUString DESCRIPTION;
163 OUString TYPE;
164 OUString TYPE_NAME;
165 OUString PRIVILEGES;
166
169 OUString IS_CURRENCY;
170 OUString IS_NULLABLE;
172 OUString PRECISION;
173 OUString SCALE;
174
175 OUString cPERCENT;
176
177 OUString BEGIN;
178 OUString ROLLBACK;
179 OUString COMMIT;
180
181 OUString KEY;
183 OUString UPDATE_RULE;
184 OUString DELETE_RULE;
187
188 OUString KEY_COLUMN;
190
191 OUString PASSWORD;
192 OUString USER;
193
194 OUString CURSOR_NAME;
197 OUString FETCH_SIZE;
201
202 OUString COMMAND;
203 OUString CHECK_OPTION;
204
205 OUString TRUE;
206 OUString FALSE;
207
209 OUString IS_CLUSTERED;
210 OUString IS_UNIQUE;
212 OUString HELP_TEXT;
213
214 OUString CATALOG;
215 OUString IS_ASCENDING;
217
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;
227
231private:
232 Statics( const Statics & ) = delete;
233 Statics & operator = ( const Statics & ) = delete;
234};
235
237
238}
239
240/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Statics & getStatics()
Definition: pq_statics.cxx:112
const sal_Int32 TABLE_INDEX_SCHEMA
Definition: pq_statics.hxx:129
const sal_Int32 TABLE_INDEX_TYPE
Definition: pq_statics.hxx:131
const sal_Int32 TABLE_INDEX_REMARKS
Definition: pq_statics.hxx:132
const sal_Int32 TABLE_INDEX_NAME
Definition: pq_statics.hxx:130
const sal_Int32 TABLE_INDEX_CATALOG
Definition: pq_statics.hxx:128
std::unordered_map< OUString, sal_Int32 > BaseTypeMap
Definition: pq_statics.hxx:94
std::vector< ColumnMetaData > ColumnMetaDataVector
Definition: pq_statics.hxx:88
ColumnMetaData(OUString _columnName, OUString _tableName, OUString _schemaTableName, OUString _typeName, sal_Int32 _type, sal_Int32 _precision, sal_Int32 _scale, bool _isCurrency, bool _isNullable, bool _isAutoIncrement)
Definition: pq_statics.hxx:53
css::uno::Sequence< OUString > serviceNames
Definition: pq_statics.hxx:103
cppu::IPropertyArrayHelper * pProps
Definition: pq_statics.hxx:104
css::uno::Sequence< css::uno::Type > types
Definition: pq_statics.hxx:105
struct ImplementationStatics viewDescriptor
Definition: pq_statics.hxx:121
struct ImplementationStatics indexDescriptor
Definition: pq_statics.hxx:123
struct ImplementationStatics user
Definition: pq_statics.hxx:118
struct ImplementationStatics keycolumnDescriptor
Definition: pq_statics.hxx:117
struct ImplementationStatics key
Definition: pq_statics.hxx:114
struct ImplementationStatics keycolumn
Definition: pq_statics.hxx:116
struct ImplementationStatics column
Definition: pq_statics.hxx:112
struct ImplementationStatics keyDescriptor
Definition: pq_statics.hxx:115
struct ImplementationStatics table
Definition: pq_statics.hxx:110
struct ImplementationStatics indexColumn
Definition: pq_statics.hxx:124
struct ImplementationStatics index
Definition: pq_statics.hxx:122
struct ImplementationStatics view
Definition: pq_statics.hxx:120
struct ImplementationStatics tableDescriptor
Definition: pq_statics.hxx:111
struct ImplementationStatics columnDescriptor
Definition: pq_statics.hxx:113
struct ImplementationStatics indexColumnDescriptor
Definition: pq_statics.hxx:125
struct ImplementationStatics userDescriptor
Definition: pq_statics.hxx:119
std::vector< OUString > typeinfoColumnNames
Definition: pq_statics.hxx:223
std::vector< OUString > tableTypeNames
Definition: pq_statics.hxx:222
std::vector< OUString > indexinfoColumnNames
Definition: pq_statics.hxx:224
std::vector< OUString > columnRowNames
Definition: pq_statics.hxx:219
Statics & operator=(const Statics &)=delete
ColumnMetaDataVector typeInfoMetaData
Definition: pq_statics.hxx:228
std::vector< OUString > primaryKeyNames
Definition: pq_statics.hxx:220
ReflectionImplementations refl
Definition: pq_statics.hxx:216
std::vector< OUString > tablesRowNames
Definition: pq_statics.hxx:218
OUString PRIVATE_FOREIGN_COLUMNS
Definition: pq_statics.hxx:186
std::vector< std::vector< css::uno::Any > > tableTypeData
Definition: pq_statics.hxx:226
std::vector< OUString > schemaNames
Definition: pq_statics.hxx:221
std::vector< OUString > resultSetArrayColumnNames
Definition: pq_statics.hxx:225
Statics(const Statics &)=delete